﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <xsl:include href="GenericTemplates\BoxLayout.xslt"/>
    <xsl:template match="/">
        <xsl:call-template name="BoxLayout">
            <xsl:with-param name="Title_TopLeft" >
                <xsl:value-of select="normalize-space(AjaxRequest/Params/Title/Title_TopLeft)" />
            </xsl:with-param>
            <xsl:with-param name="Title_TopLeftStyle" >
                <xsl:value-of select="normalize-space(AjaxRequest/Params/Title/Title_TopLeftStyle)" />
            </xsl:with-param>            
            <xsl:with-param name="Title_TopLeft_Link" >
                <xsl:value-of select="normalize-space(AjaxRequest/Params/Title/Title_TopLeft_Link)" />
            </xsl:with-param>
            <xsl:with-param name="Title_TopRight">
                <xsl:value-of select="normalize-space(AjaxRequest/Params/Title/Title_TopRight)" />
            </xsl:with-param>
            <xsl:with-param name="Content_LeftMargin">
                <xsl:if test ="normalize-space(AjaxRequest/Params/Content_LeftMargin) != ''">
                    <xsl:value-of select="normalize-space(AjaxRequest/Params/Content_LeftMargin)" />
                </xsl:if>
                <xsl:if test ="normalize-space(AjaxRequest/Params/Content_LeftMargin) = ''">
                    <xsl:text>20</xsl:text>
                </xsl:if>
            </xsl:with-param>
            <xsl:with-param name="Content">
                <xsl:value-of select="normalize-space(AjaxRequest/Params/Content/Html)" />
            </xsl:with-param>
            <xsl:with-param name ="ShowCrossButton">
                <xsl:value-of select="normalize-space(AjaxRequest/Params/ShowCrossButton)"/>
            </xsl:with-param>
            <xsl:with-param name ="ShowCrossButtonFunction">
                <xsl:value-of select="normalize-space(AjaxRequest/Params/ShowCrossButtonFunction)"/>
            </xsl:with-param>
            <xsl:with-param name ="IdPrefix">
                <xsl:value-of select="normalize-space(AjaxRequest/Params/IdPrefix)"/>
            </xsl:with-param>
            <xsl:with-param name="HeaderLinks">
                <HeaderLinks>
                    <xsl:for-each select="AjaxRequest/Params/Title/HeaderLinks/HeaderLink">
                        <HeaderLink>
                            <LinkUrl><xsl:value-of select="LinkUrl"/></LinkUrl>
                            <DisplayText><xsl:value-of select="DisplayText"/></DisplayText>
                            <Type><xsl:value-of select="Type"/></Type>
                        </HeaderLink>
                    </xsl:for-each>
                </HeaderLinks>
            </xsl:with-param>
          <xsl:with-param name="TitleBackround">
            <xsl:value-of select="normalize-space(AjaxRequest/Params/Title/TitleBackround)" />
          </xsl:with-param>
        </xsl:call-template>
    </xsl:template>
</xsl:stylesheet>
