﻿<?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="FirstName" select="EmailNotifications/FirstName"></xsl:variable>
		<xsl:variable name="Points" select="EmailNotifications/UserPoints"></xsl:variable>
		<xsl:variable name="TotalPoints" select="EmailNotifications/TotalPoints"></xsl:variable>
		<xsl:variable name="MBrandID" select="EmailNotifications/MBrandID"></xsl:variable>
		<xsl:variable name="Ticket" select="EmailNotifications/Ticket"></xsl:variable>

		<HTML>
			<Body>
				<div style="margin:15px;">
					<xsl:choose>
						<xsl:when test="$MBrandID = 0">
							<div style="margin-top:15px;">
								Congratulations <span style="color:#376092;margin-right:3px;">
									<xsl:value-of select="$FirstName"/>
								</span><xsl:text>!</xsl:text>
								<div style="margin-top:15px;">
									<span style="color:#376092;margin-right:3px;">
										<xsl:value-of select="$Points"/>
									</span>
									<span>
										Points have been added to your LifeSpace Account. You now have a total of <span style="color:#376092;">
											<xsl:value-of select="$TotalPoints"/>
										</span> Points!
									</span>
								</div>
								<div style="margin-top:25px;">
									<span>You can earn more points by</span>
									<ol type="a" style="margin-left:30px;padding:0px;">

										<xsl:choose>
											<xsl:when test="$Ticket">												
												<li>
													Logging into <a href="https://www.coachsimple.net/?ticket={$Ticket}">CoachSimple</a> daily
												</li>
												<li>
													<a href="https://www.coachsimple.net/GoalPlans.aspx?ticket={$Ticket}">Creating goals</a>
												</li>
											</xsl:when>
											<xsl:otherwise>
												<li>
													Logging into <a href="https://www.coachsimple.net">coachsimple.net</a> daily
												</li>
												<li>
													<a href="https://www.coachsimple.net/GoalPlans.aspx">Creating goals</a>
												</li>
											</xsl:otherwise>
										</xsl:choose>									
										
										<li>Checking in on your existing goals and adding notes</li>
										<li>Marking actions complete in your goals</li>
										<li>Sharing LifeSpace on Facebook and other social networks</li>
									</ol>
								</div>
								<div style="margin-top:20px;">
									<p>
										Keep earning points to move up the LifeSpace leader-board and to become eligible to start earning bonuses such as gift cards and other cool prizes.
									</p>
								</div>
								<div style="margin-top:20px;">
									<p>
										Great work!
									</p>
								</div>
								<div style="margin-top:30px;">
									LifeSpace Account Services
								</div>
							</div>
						</xsl:when>
						<xsl:otherwise>
							<div style="margin-top:15px;">
								Congratulations <span style="color:#376092;margin-right:3px;">
									<xsl:value-of select="$FirstName"/>
								</span><xsl:text>!</xsl:text>
								<span style="color:#376092;margin-left:20px;margin-right:3px;">
									<xsl:value-of select="$Points"/>
								</span> Points have been added to your Party Pong Club Account.
							</div>
							<div style="color:red;margin-top:20px;font-weight:bold;">
								Earn More Points!
							</div>
							<div style="margin-top:20px;">
								<xsl:choose>
									<xsl:when test="$Ticket">
										<a href="http://PartyPongClub.Com/?ticket={$Ticket}&amp;returnurl=http://PartyPongClub.Com/FindTournaments">
											RSVP to next week’s tournament
										</a>
									</xsl:when>
									<xsl:otherwise>
										<a href="http://PartyPongClub.Com/FindTournaments">
											RSVP to next week’s tournament
										</a>
									</xsl:otherwise>
								</xsl:choose>
							</div>
							<div style="margin-top:20px;">
								<xsl:choose>
									<xsl:when test="$Ticket">										
										<a href="http://PartyPongClub.Com/?ticket={$Ticket}&amp;returnurl=http://PartyPongClub.Com/EarnFreePoints">
											Invite Friends
										</a>
									</xsl:when>
									<xsl:otherwise>
										<a href="http://PartyPongClub.Com/EarnFreePoints">
											Invite Friends
										</a>
									</xsl:otherwise>
								</xsl:choose>								
							</div>
							<div style="color:red;margin-top:25px;font-weight:bold;">
								Redeem Your Points!
							</div>
							<div style="margin-top:15px;">
								<xsl:choose>
									<xsl:when test="$Ticket">
										<a href="http://PartyPongClub.Com/?ticket={$Ticket}&amp;returnurl=http://PartyPongClub.Com/PrizeCatalog">
											Explore the Prize Catalog
										</a>
									</xsl:when>
									<xsl:otherwise>
										<a href="http://PartyPongClub.Com/PrizeCatalog">
											Explore the Prize Catalog
										</a>
									</xsl:otherwise>
								</xsl:choose>
							</div>
							<div style="margin-top:30px;">
								Party Pong Club
							</div>
						</xsl:otherwise>
					</xsl:choose>
				</div>
			</Body>
		</HTML>

	</xsl:template>
</xsl:stylesheet>
