﻿<?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="ItemID" select="normalize-space(AjaxRequest/Params/ItemID)"></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="GoalStep" select="normalize-space(AjaxRequest/Params/GoalStep)"></xsl:variable>
     <xsl:variable name="TournamentItemID" select="normalize-space(AjaxRequest/Params/TournamentItemID)"></xsl:variable>
     <xsl:variable name="TournamentName" select="normalize-space(AjaxRequest/Params/TournamentName)"></xsl:variable>
     <xsl:variable name="HostID" select="normalize-space(AjaxRequest/Params/HostID)"></xsl:variable>
     <xsl:variable name="PortalName" select="normalize-space(AjaxRequest/Brand/Detail/BrandKey)"></xsl:variable>

    <table class="tableMaster" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2" class="startGoalPopupBackground marginLeft20">
          <div class="marginTop20">
            <xsl:call-template name="CreateTournamentWizardThirdStep">
              <xsl:with-param name="templateURL" select="$templateURL"></xsl:with-param>
              <xsl:with-param name="TournamentName" select="$TournamentName"></xsl:with-param>
              <xsl:with-param name="TournamentItemID" select="$TournamentItemID"></xsl:with-param>
              <xsl:with-param name="HostName" select="$HostName"></xsl:with-param>
              <xsl:with-param name="PortalName" select="$PortalName"></xsl:with-param>
            </xsl:call-template>
          </div>
         </td>
      </tr>
    </table>

  </xsl:template>

  <xsl:template name="CreateTournamentWizardThirdStep">
    <xsl:param name ="templateURL" select="'N/A'"></xsl:param>
    <xsl:param name ="TournamentItemID" select="'N/A'"></xsl:param>
    <xsl:param name ="TournamentName" select="'N/A'"></xsl:param>
    <xsl:param name ="HostName" select="'N/A'"></xsl:param>
    <xsl:param name ="PortalName" select="'N/A'"></xsl:param>

    <table width="757px" cellpadding="0" cellspacing="0" align="center">
     
     
      <tr>
        <td colspan="2">
          <div class="createGoalWizardHeadline" align="center">
            Tell Everyone About It!
          </div>
          <div class="createGoalWizardHeadlineSubText" align="center" style="margin-bottom:25px;">
            Go ahead! Simply share this tournament.
          </div>
        </td>
      </tr>
      <tr>
        <td colspan="2">
          <div class="graySeperatorLine marginBottom15"></div>
        </td>
      </tr>
      <tr>
        <td width="300px">
          <div class="marginLeft25 marginRight20">
            <div>
              <span class="emailFriendsText">Email friends</span>
            </div>
            <div class="marginBottom15">
              <input id="txt_Email" type="text" class="notificationTypeText" style="width:377px;height:25px;" value="ENTER FRIENDS EMAILS"
							   onfocus="SetTextAreaValue('txt_Email','ENTER FRIENDS EMAILS','focus');"
							   onBlur='SetTextAreaValue("txt_Email","ENTER FRIENDS EMAILS","blur")'></input>
            </div>
            <div class="marginBottom20">
              <textarea id="emailContent" style="width:377px;" class="notificationTypeText" rows="4"
									  onfocus="removeWhiteSpace('emailContent');
                                                   SetTextAreaValue('emailContent','ADD A MESSAGE','focus');"
									  onBlur='SetTextAreaValue("emailContent","ADD A MESSAGE","blur")'>
                <xsl:text>ADD A MESSAGE</xsl:text>
              </textarea>
            </div>
            <div align='right'>
              <table class="" cellpadding="0" cellspacing="0">
                <tr>
                  <td class="verticallyMiddle onMouseOver divBrowseGradient spanBrowseGradientTextGray" style="width:90px;height:30px;padding-left:10px;"
									  onmouseover="document.getElementById('img_SendInvite').src='{$templateURL}Web/Images/Ver_2_0/BT_arrow_hover.png';"
									  onmouseout="document.getElementById('img_SendInvite').src='{$templateURL}Web/Images/Ver_2_0/BT_arrow.png';"
                    onclick="Email_InviteUsers_Ver_2_0('txt_Email', 'emailContent', 
                                                                {$TournamentItemID},'','{$TournamentName}','');">
                    <img id="img_SendInvite" src="{$templateURL}Web/Images/Ver_2_0/BT_arrow.png" class="verticallyMiddle" align="absmiddle"></img>
                    <span id="span_SendInvite" class="verticallyMiddle">SEND INVITE</span>
                  </td>
                </tr>
              </table>
            </div>
          </div>
        </td>
        <td width="457px">
          <table cellpadding="0" cellspacing="0">
            <tr>
              <td>
                <span class="emailFriendsText">Get Social</span>
              </td>
            </tr>
            <tr>
              <td class="verticallyMiddle">
                <a id="linkFacebook" target="_blank"
								  href="http://www.facebook.com/share.php?u=http://{$HostName}/{$PortalName}/Tournaments/{$TournamentItemID}">
                  <img src="{$templateURL}Web/Images/Ver_2_0/BT_facebook_60.png"
										 class="marginRight5 marginBottom10"  align="absmiddle"/>
                </a>
                <span class="FBTWText">Share it on facebook</span>
              </td>
            </tr>
            <tr>
              <td class="verticallyMiddle">
                <a id="linkTwitter" target="_blank"
								href="http://twitter.com/intent/tweet?status=http://{$HostName}/{$PortalName}/Tournaments/{$TournamentItemID}">
                  <img src="{$templateURL}Web/Images/Ver_2_0/BT_twitter_60.png" class="marginRight5" align="absmiddle"/>
                </a>
                <span class="FBTWText">Tweet it</span>
              </td>
            </tr>
          </table>
        </td>
      </tr>
      <tr>
        <td colspan="2">
          <div class="graySeperatorLineBold marginTop25 marginBottom20"></div>
        </td>
      </tr>
      <tr>
        <td colspan="2">
          <div class="marginLeft25 marginBottom10">
            <span class="emailFriendsText">Copy And Paste</span>
          </div>
          <div class="marginLeft25" style="margin-bottom:20px;">
            <input id="text_templateURL" type="text" class="copyPasteText onMouseOver" style="width:457px;height:25px;"
							   onClick="SelectAll('text_templateURL');"
							   value="http://{$HostName}/{$PortalName}/Tournaments/{$TournamentItemID}"></input>
          </div>
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
