﻿<?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:include href="../../Version_2_0/PopUpHeader.xslt"/>
	<xsl:output method="xml" indent="yes"/>

	<xsl:template match="/">
		<xsl:variable name="HostName" select="normalize-space(AjaxRequest/HostName)"></xsl:variable>
		<xsl:variable name="ItemID" select="normalize-space(AjaxRequest/Params/ItemID)"></xsl:variable>
		<xsl:variable name="TemplateURL" select="normalize-space(AjaxRequest/TemplateURL)"></xsl:variable>
		<xsl:variable name="CurrentDate" select="normalize-space(AjaxRequest/Params/SelectedDate)"></xsl:variable>
		<xsl:variable name="Origin" select="normalize-space(AjaxRequest/Params/Origin)"></xsl:variable>
		<xsl:variable name="Mode" select="normalize-space(AjaxRequest/Params/Mode)"></xsl:variable>


		<xsl:if test="$Mode = 'planner' or $Mode = 'dayplanner'">
			<xsl:call-template name="PopUpHeader">
				<xsl:with-param name="ItemID" select="$ItemID"></xsl:with-param>
				<xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
				<xsl:with-param name="HeaderText">
					<xsl:text>Tournament Quick Add</xsl:text>
				</xsl:with-param>
			</xsl:call-template>
		</xsl:if>
		<div id="divCreateBrand" class="padding10">
			<table class="tableMaster" cellpadding="2" cellspacing="2" style="width:100%;margin-top:20px;margin-left:10px;">
				<tr>
					<td width="20%">
						<span class="actionCountText">Add: </span>
					</td>
					<td width="80%">
						<input id="txt_TournamentNo" class="text" type="text" value="1" style="width:70px;"></input>
						<img src="{normalize-space($TemplateURL)}Web/Images/big_spacer.gif"></img>
						<span class="actionCountText"> Tournament(s) </span>
						<select class="smallDropdown" name="TournamentPeriod" id="ddlTournamentPeriod" style="color:gray;"
							  onFocus="this.style.color='black';" onchange='setDropDownStyle("ddlTournamentPeriod");'>
							<!--<option value="0">Daily</option>-->
							<option selected="selected" value="0">Weekly</option>
							<!--<option value="2">Monthly</option>-->
						</select>
					</td>
				</tr>
				<tr>
					<td width="20%">
						<span class="actionCountText">Starting Date: </span>
					</td>
					<td width="80%">
						<input id="txt_MTournamentDate" type="text" onblur="checkdate(this)" class="text" style="width:70px;" value ="{$CurrentDate}"
					 name="&lt;OperationalData&gt;&lt;Mode&gt;MultipleTournament&lt;/Mode&gt;&lt;/OperationalData&gt;"/>
						<img src="{normalize-space($TemplateURL)}Web/Images/big_spacer.gif"></img>
						<img id="img_MTournamentDate" class="onMouseOver" width="20"
						   height="20" align="absmiddle" onclick='dp("txt_MTournamentDate", "img_MTournamentDate");'
				   src="{$TemplateURL}Web/Images/Ver_2_0/BT_startDate.png" style="padding-bottom:4px;"/>
					</td>
				</tr>
				<tr>
					<td width="20%">
						<span class="actionCountText">Tournament Time: </span>
					</td>
					<td width="80%">
						<select id="ddl_MTournament_Hours" class="marginRight10">
							<option value="0">-Select-</option>
							<option value="1">01</option>
							<option value="2">02</option>
							<option value="3">03</option>
							<option value="4">04</option>
							<option value="5">05</option>
							<option value="6">06</option>
							<option value="7">07</option>
							<option value="8">08</option>
							<option value="9">09</option>
							<option value="10">10</option>
							<option value="11">11</option>
							<option value="12">12</option>
						</select>
						<select id="ddl_MTournament_Minutes" class="marginRight10">
							<option value="0">00</option>
							<option value="1">15</option>
							<option value="2">30</option>
							<option value="3">45</option>
						</select>
						<select id="ddl_MTournament_Shift">
							<option value="1">AM</option>
							<option selected="selected" value="2">PM</option>
						</select>
					</td>
				</tr>
				<tr>
					<td width="20%">
						<span class="actionCountText">Location: </span>
					</td>
					<td width="80%">
						<select class="largeDropdown" name="HostBrandName" id="ddlHostBrandName" style="color:gray;"
						   onFocus="this.style.color='black';" onchange='setDropDownStyle("ddlHostBrandName");'>
							<xsl:choose>
								<xsl:when test ='count(AjaxRequest/Brands/Brand) &gt; 0'>
									<option selected="selected" value="0">Select your Host Brand Name..</option>
									<xsl:for-each select ="AjaxRequest/Brands/Brand">
										<option value="{ItemID}">
											<xsl:value-of select ="normalize-space(Item)"/>
										</option>
									</xsl:for-each>
								</xsl:when>
								<xsl:when test ='count(AjaxRequest/Brands/Brand) = 0'>
									<option value="0">Select your Host Brand Name..</option>
									<xsl:for-each select ="AjaxRequest/Items/Item">
										<option selected="selected" value="{ItemID}">
											<xsl:value-of select ="normalize-space(Item)"/>
										</option>
									</xsl:for-each>
								</xsl:when>
							</xsl:choose>
						</select>
					</td>
				</tr>
				<tr>
					<td width="20%">
					</td>
					<td width="80%">
						<table align="right" style="margin-right:20px;">
							<tr>
								<td class="verticallyMiddle onMouseOver divBrowseGradient spanBrowseGradientTextGray"
								onclick="MTournament_SaveData('txt_TournamentNo', 'ddlTournamentPeriod', 'txt_MTournamentDate', '{$ItemID}', 'ddl_MTournament_Hours', 'ddl_MTournament_Minutes', 'ddl_MTournament_Shift', '{$Origin}', '{$Mode}', 'ddlHostBrandName');"
								onmouseout="document.getElementById('img_Next').src='{$TemplateURL}Web/Images/Ver_2_0/icon_Add.png';"
								onmouseover="document.getElementById('img_Next').src='{$TemplateURL}Web/Images/Ver_2_0/icon_add_over.png';"
								  style="width:70px;height:30px;">
									<img id="img_Next" class="marginRight5" align="absmiddle" style="padding-left:8px;" src="{$TemplateURL}Web/Images/Ver_2_0/icon_Add.png"></img>
									<span id="span_Next" class="capitalFont">SAVE</span>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
	</xsl:template>
</xsl:stylesheet>
