<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:include href="/app/tools/common/production/templates/global.xsl" />

    <!-- Moved from common/production/templates/globals.xsl -->

    <xsl:include href="/app/tools/rps/templates/variables.xsl" />
    <xsl:include href="/app/tools/rps/templates/id_to_name.xsl" />
    <xsl:include href="/app/tools/common/production/templates/inline_pop.xsl" />
    <xsl:include href="/app/tools/rps/templates/list.xsl" />
    <xsl:include href="/app/tools/rps/templates/messaging.xsl" />
    <xsl:include href="/app/tools/rps/templates/navigation.xsl" />
    <xsl:include href="/app/tools/rps/templates/raptor.xsl" />
    <xsl:include href="/app/tools/rps/templates/shared_templates.xsl" />
    <xsl:include href="/app/tools/rps/templates/royalty_run_status.xsl" />
    <xsl:include href="/app/tools/rps/templates/base_includes.xsl" />
    <xsl:include href="/app/tools/rps/templates/search.xsl" />


    <xsl:template name="body">
        <xsl:if test="$area = 'statement' and $cmd != 'main'">
            <xsl:attribute name="id">statement</xsl:attribute>
        </xsl:if>
        <xsl:call-template name="rpsBaseIncludes" />

            <xsl:choose>

                <xsl:when test="not(Params/_inline)">
                    <xsl:call-template name="inlinePop" />
                    <xsl:call-template name="header" />
                    <div class="Layout-base-navigation">
                        <xsl:choose>
                            <xsl:when test="$hideLinks = 0">
                                <xsl:call-template name="navigation" />
                            </xsl:when>
                            <xsl:otherwise>
                                <div id="loginTop">&#160;</div><div class="loginSpacer"></div>
                            </xsl:otherwise>
                        </xsl:choose>
                    </div>
                    <div class="Layout Layout-base-content" id="content">
                        <div class="Layout-wrapper">
                            <xsl:call-template name="sectionHeader" />
                            <div class="Layout-body-simple">
                                <xsl:choose>
                                    <xsl:when test="$accessDenied = 1">
                                        <xsl:call-template name="accessDeniedLayout" />
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <xsl:call-template name="pickLayout" />
                                    </xsl:otherwise>
                                </xsl:choose>
                            </div>
                        </div>
                    </div>
                    <xsl:call-template name="footer" />
                </xsl:when>

                <xsl:otherwise>
                    <xsl:call-template name="inlinePopLayout" />
                </xsl:otherwise>

            </xsl:choose>
    </xsl:template>



</xsl:stylesheet>
