﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

    <xsl:import href="BrandMemoControl.xslt"/>
    
    <xsl:template match="/">
        <xsl:variable name="BrandProfileID" select="normalize-space(Brand/HeaderFooterHTML/BrandProfileID)"></xsl:variable>
        <xsl:variable name="BrandID" select="normalize-space(Brand/HeaderFooterHTML/BrandID)"></xsl:variable>
        <xsl:variable name="BrandTabID" select="normalize-space(Brand/HeaderFooterHTML/BrandTabID)"></xsl:variable>
        <xsl:variable name="BrandProfileSectionID" select="normalize-space(Brand/HeaderFooterHTML/BrandProfileSectionID)"></xsl:variable>
        <xsl:variable name="SortOrder" select="normalize-space(Brand/HeaderFooterHTML/SortOrder)"></xsl:variable>
        <xsl:variable name="Section" select="normalize-space(Brand/HeaderFooterHTML/Section)"></xsl:variable>
        <xsl:variable name="SectionName" select="normalize-space(Brand/HeaderFooterHTML/SectionName)"></xsl:variable>
        <xsl:variable name="SectionHTML" select="normalize-space(Brand/HeaderFooterHTML/SectionHTML)"></xsl:variable>
        <xsl:variable name="SectionSummary" select="normalize-space(Brand/HeaderFooterHTML/SectionSummary)"></xsl:variable>
        <xsl:variable name="TimeStamp" select="normalize-space(Brand/HeaderFooterHTML/TimeStamp)"></xsl:variable>
        <xsl:variable name="BrandPermissionID" select="normalize-space(Brand/HeaderFooterHTML/BrandPermissionID)"></xsl:variable>

        <div id="divHeaderFooterHTML">
            <xsl:if test="$BrandPermissionID = 4">
                <input type="Button" class="button" value="Add {$SectionName}"
                       onclick="Brand_SectionEdit('divHeaderHTMLContainer','divBrandHeaderFooterProfileOperations');">
                </input>
            </xsl:if>

            <div id="divBrandHeaderFooterProfileOperations" class="divEdit">
                <xsl:call-template name="BrandMemo">
                    <xsl:with-param name="BrandProfileID" select="$BrandProfileID"></xsl:with-param>
                    <xsl:with-param name="BrandID" select="$BrandID"></xsl:with-param>
                    <xsl:with-param name="BrandTabID" select="$BrandTabID"></xsl:with-param>
                    <xsl:with-param name="BrandProfileSectionID" select="$BrandProfileSectionID"></xsl:with-param>
                    <xsl:with-param name="SortOrder" select="$SortOrder"></xsl:with-param>
                    <xsl:with-param name="Section" select="$Section"></xsl:with-param>
                    <xsl:with-param name="SectionName" select="$SectionName"></xsl:with-param>
                    <xsl:with-param name="SectionHTML" select="$SectionHTML"></xsl:with-param>
                    <xsl:with-param name="SectionSummary" select="$SectionSummary"></xsl:with-param>
                    <xsl:with-param name="TimeStamp" select="$TimeStamp"></xsl:with-param>
                    <xsl:with-param name="BrandPermissionID" select="$BrandPermissionID"></xsl:with-param>
                    <xsl:with-param name="DivOperationID">
                        <xsl:text>divBrandHeaderFooterProfileOperations</xsl:text>
                    </xsl:with-param>
                    <xsl:with-param name="DivContainerID">
                        <xsl:text>divHeaderHTMLContainer</xsl:text>
                    </xsl:with-param>
                </xsl:call-template>
            </div>
        </div>

        
    </xsl:template>
</xsl:stylesheet>
