<!--  $Id$  -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

  <xsl:include href="/app/tools/support/templates/global.xsl" />
  <xsl:include href="/app/tools/support/templates/list.xsl" />
  <xsl:include href="/app/tools/support/templates/search.xsl" />
  <xsl:include href="/app/tools/support/templates/shared.xsl" />

  <xsl:template name="body" >
      <body>
        <xsl:call-template name="pickLayout" />
      </body>
  </xsl:template>

  <xsl:template name="pickLayout" >
    <div id="wrapper">
      <xsl:call-template name="sessionLayout" />
    </div>
  </xsl:template>

  <xsl:template name="sessionLayout" >
    <xsl:call-template name="mainHeader" />
    <xsl:call-template name="mainNavigation" />
    <div id="body">
      <xsl:call-template name="mainBody" />
    </div>
    <xsl:call-template name="mainFooter" />
  </xsl:template>

  <xsl:template name="mainHeader">
    <DIV id="header">
      <table width="100%">
        <tr>
          <td align="left">
            <img src="/logo.gif" />
          </td>
          <td align="right" valign="top">
            Hello <xsl:value-of select="User/FirstName" />,<a href="/support/logout">logout</a>
            <xsl:call-template name="clientSelectForm" />
          </td>
        </tr>
      </table>
    </DIV>

  </xsl:template>

  <xsl:template name="mainFooter">
    <DIV id="footer">
      <P>&#169; 2026 RoyaltyShare, Inc. All rights reserved. (<xsl:value-of select="Hostname" />)</P>
    </DIV>
  </xsl:template>

  <xsl:template name="mainNavigation">
    <DIV id="navigation">
      <xsl:for-each select="Navigation/Module">
        <xsl:variable name="moduleURL">/<xsl:value-of select="/Root/App" />/<xsl:value-of select="Slug" />?c=</xsl:variable>
        <h3><xsl:value-of select="Name" /></h3>
          <ul>
            <xsl:for-each select="Pages/Page">
              <li><a href="{$moduleURL}{Command}"><xsl:value-of select="Name" /></a><xsl:if test="Development > 0"> *</xsl:if></li>
            </xsl:for-each>
          </ul>
      </xsl:for-each>
    </DIV>
  </xsl:template>


</xsl:stylesheet>
