@inherits ALayoutComponent
@{try{
<MessageBox @ref=@MessageBoxInstance />
<ModalDialogFrame @ref=@ModalDialogInstance />
<!--=============================================================================================-->
<div @ref=@PageContentDIV>
   @if (!Session.IsOpen)
   {
   <div id="mainlayout_XNavigationFloatRefDIV" style="right: @UMagistral.GetPageContentWidthDiff()px">
      @if (App.IsOnAuthorizationPage)
      {
      <AHRef HRef="/" Title=@ToHomePageHRTile AccessKey=@ToHomePageAccessKey
             Focusable=@false ON_Click=@ToHomePageHR_OnClick>@ToHomePageHRCaption_Markup</AHRef>
      }
      @if (HomePage.IsOnSelectionSubPage)
      {
      <AHRef HRef="/authorization" Title=@ToAuthorizationHRTile AccessKey=@ToAuthorizationAccessKey
             Focusable=@false ON_Click=@ToAuthorizationHR_OnClick>@ToAuthorizationHRCaption_Markup</AHRef>
      }
   </div>
   }
   @if (Session.IsOpen)
   {
   <div id="mainlayout_SessionHeaderDIV">
      <div id="mainlayout_SessionElementsDIV">
         <b>@USR.LoginName</b>: @USR.Initials
         <span class="faint_text">
            @(USR.IsAdministrator ? "(administrator)" : null) |
            Logged-in: <b>@Session.LoginTime.ToShortTimeString()</b> (loc.)&nbsp;
         </span>
      </div>
      <AButton ID="mainlayout_CloseSessionBUTTON" Classes_0=@null TabIndex=-1
               Title="Close session (reset credentials, reload current page)"
               Focusable=@false
               ON_Click=@CloseSessionBUTTON_OnClick>Log-off</AButton>
      <div id="mainlayout_XNavigationHeaderRefDIV">
         @if (App.IsOnAuthorizationPage)
         {
         <AHRef HRef="/" Title=@ToHomePageHRTile
                Focusable=@false NavigateAuto=@true>@ToHomePageHRCaption</AHRef>
         }
         else
         {
         <AHRef HRef="/authorization" Title=@ToAuthorizationHRTile
                Focusable=@false NavigateAuto=@true>@ToAuthorizationHRCaption</AHRef>
         }
      </div>
   </div>
   }
   <div id="mainlayout_BodyDIV">
      @Body
   </div>
</div>
<!--=============================================================================================-->
}catch(Exception e){ProcessRenderingError(GetType(),e,false);}}
