﻿<?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="ClubLogin.xslt"/>
	<xsl:output method="xml" indent="yes"/>

	<xsl:template match="/">
		<xsl:variable name="DateOfBirthMasterData" select="AjaxRequest/DateOfBirth"></xsl:variable>
		<xsl:variable name="BrandID" select="AjaxRequest/Params/BrandID"></xsl:variable>
		<xsl:variable name="ItemID" select="AjaxRequest/Params/ItemID"></xsl:variable>
		<xsl:variable name="Authenticate" select="normalize-space(AjaxRequest/IsAuthenticated)"></xsl:variable>
		<xsl:variable name="IsRegistrationComplete" select="normalize-space(AjaxRequest/IsRegistrationComplete)"></xsl:variable>
		<xsl:variable name="ClubName" select="AjaxRequest/Brand/PortalItem"></xsl:variable>
		<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="Origin">
			<xsl:text>clubloginregister</xsl:text>
		</xsl:variable>

		<table class="tableMaster" cellpadding="0" cellspacing="0">
			<tr>
				<td>
					<div class="paddingLeft10 TournamentShareHeader" align="left" style="background-color:#47B5E7;line-height:25px;">
						The <xsl:value-of select="$ClubName"></xsl:value-of> Membership
					</div>
				</td>
				<td width="5px">
					&#xa0;
				</td>
				<td width="50%">
					<div class="paddingLeft10 TournamentShareHeader" align="left" style="background-color:#47B5E7;line-height:25px;">
						Membership Form
					</div>
				</td>
			</tr>
			<tr>
				<td class="TournamentClubBackground">
					<div class="textCenter margin10 paddingTop10">
						<iframe src="http://player.vimeo.com/video/42235159" width="500" height="283" frameborder="0" webkitAllowFullScreen="" mozallowfullscreen="" allowFullScreen=""></iframe>
					</div>
					<div class="labelGoalTopicsText margin15 textJustify">
						The Party Pong Club is a <span class="barHeaderText">FREE</span> program where Club Members compete in <span class="barHeaderText">FREE</span> Party Pong Tournaments at Participating Bars and earn points based on tournament placement, then redeem those points online for 1,000s of prizes.
					</div>
				</td>
				<td width="5px">
					&#xa0;
				</td>

				<xsl:choose>
					<xsl:when test="$Authenticate = 'True' and $IsRegistrationComplete = 1">
						<td width="50%" class="TournamentClubBackground">
							<div id="divClubLoginContainer">
								<div class="margin10 labelGoalTopicsText">
									You are logged in.
								</div>
							</div>
						</td>
					</xsl:when>
					<xsl:otherwise>
						<td width="50%" style="background:white;">
							<div id="divClubLoginContainer">
								<xsl:call-template name="ClubLogin">
									<xsl:with-param name="DateOfBirthMasterData" select="$DateOfBirthMasterData"></xsl:with-param>
									<xsl:with-param name="Origin" select="$Origin"></xsl:with-param>
									<xsl:with-param name="Mode" select="normalize-space(AjaxRequest/Mode)"></xsl:with-param>
									<xsl:with-param name="BrandID" select="$BrandID"></xsl:with-param>
									<xsl:with-param name="ClubName" select="$ClubName"></xsl:with-param>
									<xsl:with-param name="HostName" select="$HostName"></xsl:with-param>
									<xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
									<xsl:with-param name="LoginRegisterMode" select="normalize-space(AjaxRequest/Params/LoginRegisterMode)"></xsl:with-param>
									<xsl:with-param name="IsRegistrationComplete" select="$IsRegistrationComplete"></xsl:with-param>
									<xsl:with-param name="Email" select="AjaxRequest/User/UserData/Email"></xsl:with-param>
								</xsl:call-template>
							</div>
						</td>
					</xsl:otherwise>
				</xsl:choose>

			</tr>
		</table>

	</xsl:template>
</xsl:stylesheet>
