﻿<?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" exclude-result-prefixes="msxsl">
  <xsl:output method="xml" indent="yes"/>

  <xsl:template match="/">

    <xsl:variable name="HostName" select="normalize-space(AjaxRequest/HostName)"></xsl:variable>
    <xsl:variable name="TemplateURL" select="normalize-space(AjaxRequest/TemplateURL)"></xsl:variable>
    <xsl:variable name="Name" select="normalize-space(AjaxRequest/Params/Name)"></xsl:variable>
    <xsl:variable name="BrandID" select="normalize-space(AjaxRequest/Params/BrandID)"></xsl:variable>

    <xsl:call-template name="ProgramHead">
      <xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
      <xsl:with-param name="HostName" select="$HostName"></xsl:with-param>
      <xsl:with-param name="Name" select="$Name"></xsl:with-param>
      <xsl:with-param name="BrandID" select="$BrandID"></xsl:with-param>
    </xsl:call-template>

  </xsl:template>

  <xsl:template name="ProgramHead">
    <xsl:param name="TemplateURL" select="'N/A'"></xsl:param>
    <xsl:param name="HostName" select="'N/A'"></xsl:param>
    <xsl:param name="Name" select="'N/A'"></xsl:param>
    <xsl:param name="BrandID" select="'N/A'"></xsl:param>


    <xsl:variable name="selectedGroup">
      <xsl:choose>
        <xsl:when test="$Name = 'adultmartial' or $Name = 'kickboxing' or $Name = 'stars'">
          <xsl:text>group2</xsl:text>
        </xsl:when>
        <xsl:when test="$Name = 'playitsafe' or $Name = 'selfdefence' or $Name = 'selfdefense'">          
          <xsl:text>group3</xsl:text>
        </xsl:when>
        <xsl:otherwise>
          <xsl:text>group1</xsl:text>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:variable>

    <table cellpadding="0" cellspacing="0">
      <tr>
        <xsl:choose>
          <xsl:when test="$selectedGroup = 'group2'">
            <!-- Group 2 -->
            <td width="2%" class="verticallyMiddle textCenter">
              <img border="0" alt="" style="height:35px;width:20px;" title="Back" class="onMouseOver" src="{$TemplateURL}web/images/ver_2_0/dragonkick/arrow_back.png"
								 onclick="dragonKick_getPageHeader('tigertots', '{$BrandID}', 'divProgramContentContainer', 'GetProgramHeader');"></img>
            </td>
            <td width="33%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Adult Martial Arts" onload="setWidthAndHeightImage(this, 250);" alt="Adult Martial Arts" src="{$TemplateURL}web/images/ver_2_0/dragonkick/Adult_Carate.png"
								 onclick="dragonKick_getPageHeader('adultmartial', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">Adults</div>
                <div class="partiesHeaderSmallText">Martial Arts</div>
              </div>
            </td>
            <td width="38%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Kickboxing" onload="setWidthAndHeightImage(this, 325);" alt="Kickboxing" src="{$TemplateURL}web/images/ver_2_0/dragonkick/Kickboxing.png"
								 onclick="dragonKick_getPageHeader('kickboxing', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">KickBoxing</div>
                <div class="divDragonSubTitle">Teen/Adults</div>
              </div>
            </td>
            <td width="35%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View S. T. A. R. S." onload="setWidthAndHeightImage(this, 250);" alt="S. T. A. R. S." src="{$TemplateURL}web/images/ver_2_0/dragonkick/star-student-Katherine.png"
								 onclick="dragonKick_getPageHeader('stars', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">S. T. A. R. S.</div>
                <div class="divDragonSubTitle">ages 7-18 special needs</div>
              </div>
            </td>
            <td width="2%" class="verticallyMiddle textCenter">
              <img border="0" alt="" style="height:35px;width:20px;" title="Next" class="onMouseOver" src="{$TemplateURL}web/images/ver_2_0/dragonkick/arrow_next.png"
								 onclick="dragonKick_getPageHeader('playitsafe', '{$BrandID}', 'divProgramContentContainer', 'GetProgramHeader');"></img>
            </td>
          </xsl:when>
          <xsl:when test="$selectedGroup = 'group3'">
            <!-- Group 3 -->
            <td width="2%" class="verticallyMiddle textCenter">
              <img border="0" alt="" style="height:35px;width:20px;" title="Back" class="onMouseOver" src="{$TemplateURL}web/images/ver_2_0/dragonkick/arrow_back.png"
								 onclick="dragonKick_getPageHeader('adultmartial', '{$BrandID}', 'divProgramContentContainer', 'GetProgramHeader');"></img>
            </td>
            <td width="32%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Play It Safe" onload="setWidthAndHeightImage(this, 250);" alt="Play It Safe" src="{$TemplateURL}web/images/ver_2_0/dragonkick/Tracie-Arlington.png"
								 onclick="dragonKick_getPageHeader('playitsafe', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">Play It Safe</div>
                <div class="divDragonSubTitle">children of all ages</div>
              </div>
            </td>
            <td width="32%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Senior Self-Defense" onload="setWidthAndHeightImage(this, 250);" alt="Senior Self-Defense" src="{$TemplateURL}web/images/ver_2_0/dragonkick/Sensei-Davis.png"
								 onclick="dragonKick_getPageHeader('selfdefence', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">Senior Self-Defense</div>
                <div class="divDragonSubTitle">ages 55 and up</div>
              </div>
            </td>
            <td width="34%" class="textCenter">

            </td>
          </xsl:when>
          <xsl:otherwise>
            <!-- Group 1 -->
            <td width="2%" class="verticallyMiddle textCenter">
            </td>
            <td width="22%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Tiger Tots" onload="setWidthAndHeightImage(this, 250);" alt="Tiger Tots" src="{$TemplateURL}web/images/ver_2_0/dragonkick/tiger_tots.png"
								 onclick="dragonKick_getPageHeader('tigertots', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">Tiger Tots</div>
                <div class="divDragonSubTitle">AGE 3</div>
              </div>
            </td>
            <td width="20%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Cool Cats" onload="setWidthAndHeightImage(this, 250);" alt="Cool Cats" src="{$TemplateURL}web/images/ver_2_0/dragonkick/cool_cats.png"
								 onclick="dragonKick_getPageHeader('coolcats', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">Cool Cats</div>
                <div class="divDragonSubTitle">
                  <div>ages 4-5</div>
                  <div>pre-school/kindergarten</div>
                </div>
              </div>
            </td>
            <td width="24%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Karate Kids" onload="setWidthAndHeightImage(this, 250);" alt="Karate Kids" src="{$TemplateURL}web/images/ver_2_0/dragonkick/karate_kids.png"
								 onclick="dragonKick_getPageHeader('karatekids', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">Karate Kids</div>
                <div class="divDragonSubTitle">ages 6-9</div>
              </div>
            </td>
            <td width="28%" class="textCenter">
              <img border="0" style="display:none;" class="onMouseOver" title="View Youth Teen" onload="setWidthAndHeightImage(this, 250);" alt="Youth Teen" src="{$TemplateURL}web/images/ver_2_0/dragonkick/youth_teen.png"
								 onclick="dragonKick_getPageHeader('youthteen', '{$BrandID}', 'divProgramBioDetails', 'LoadProgramBioDetails');"></img>
              <div class="textCenter marginTop5">
                <div class="partiesHeaderText">Youth/Teen</div>
                <div class="divDragonSubTitle">ages 10-14</div>
              </div>
            </td>
            <td width="2%" class="verticallyMiddle textCenter">
              <img border="0" alt="" style="height:35px;width:20px;" title="Next" class="onMouseOver" src="{$TemplateURL}web/images/ver_2_0/dragonkick/arrow_next.png"
								 onclick="dragonKick_getPageHeader('adultmartial', '{$BrandID}', 'divProgramContentContainer', 'GetProgramHeader');"></img>
            </td>
          </xsl:otherwise>
        </xsl:choose>

      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
