﻿<?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 name="EmailGenericTemplate">
        <xsl:param name="SalesUserName" select="'N/A'"></xsl:param>
        <xsl:param name="PortalName" select="'N/A'"></xsl:param>
        <xsl:param name="LogoURL" select="'N/A'"></xsl:param>
        <xsl:param name="MasterBrandTargetURL" select="'N/A'"></xsl:param>
        <xsl:param name="ContentHTML" select="'N/A'"></xsl:param>
        <xsl:param name="FullWidthHeaderLogo">
            <xsl:number value="0"/>
        </xsl:param>
        
        
        <HTML>
            <Body>
                <table width="100%" cellspacing="0" cellpadding="0" style="width: 100.0%; background: #f2f2f2;">
                    <tbody>
                        <tr>
                            <td valign="top" style="padding: 0in 0in 0in 0in; min-height: 10px">
                                <div align="center">
                                    <xsl:call-template name="EmailHeader">
                                        <xsl:with-param name="LogoURL" select="$LogoURL"></xsl:with-param>
                                        <xsl:with-param name="MasterBrandTargetURL" select="$MasterBrandTargetURL"></xsl:with-param>
                                        <xsl:with-param name="FullWidthHeaderLogo" select="$FullWidthHeaderLogo"></xsl:with-param>
                                    </xsl:call-template>
                                </div>
                                <p align="center" style="text-align: center;margin:0;">

                                </p>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" style="padding: 0in 0in 0in 0in">
                                <div align="center">
                                    <table width="600" cellspacing="0" cellpadding="0" border="0" style="width: 6.25in">
                                        <tbody>
                                            <tr>
                                                <td style="padding: 0in 0in 0in 0in">
                                                    <xsl:call-template name="EmailBody">
                                                        <xsl:with-param name="SalesUserName" select="$SalesUserName"></xsl:with-param>
                                                        <xsl:with-param name="PortalName" select="$PortalName"></xsl:with-param>
                                                        <xsl:with-param name="ContentHTML" select="$ContentHTML"></xsl:with-param>
                                                    </xsl:call-template>
                                                    <xsl:call-template name="EmailFooter"></xsl:call-template>
                                                </td>

                                            </tr>
                                            <tr style="min-height: 15.0pt">
                                                <td colspan="2" style="padding: 0in 0in 0in 0in; min-height: 15.0pt; min-height: 20px">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" style="padding: 0in 0in 0in 0in; min-height: 10px">
                                                    <xsl:call-template name="EmailBottomBorderLine"></xsl:call-template>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </Body>
        </HTML>
    </xsl:template>

    <xsl:template name="EmailHeader">
        <xsl:param name="LogoURL" select="'N/A'"></xsl:param>
        <xsl:param name="MasterBrandTargetURL" select="'N/A'"></xsl:param>
        <xsl:param name="FullWidthHeaderLogo" select="'N/A'"></xsl:param>

        <table width="600" cellspacing="0" cellpadding="0" border="0" style="width: 6.25in;background: #EDEDED">
            <tbody>
                <tr style="min-height: 7.5pt">
                    <td width="25" valign="top" style="width: 18.75pt; padding: 0in 0in 0in 0in; min-height: 7.5pt">
                        <p style="line-height: 0%;margin:0;">
                            <img width="10" height="10" border="0" src="https://www.coachsimple.net/DesktopModules/LifespaceTemplates/Web/Images/Ver_2_0/LtTopInspire.png" />
                        </p>
                    </td>
                    <td style="padding: 0in 0in 0in 0in; min-height: 7.5pt">
                    </td>
                    <td width="25" valign="top" style="width: 18.75pt; padding: 0in 0in 0in 0in; min-height: 7.5pt;min-height: 10px">
                        <p align="right" style="text-align: right; line-height: 0%;margin:0;">
                            <img width="10" height="10" border="0" src="https://www.coachsimple.net/DesktopModules/LifespaceTemplates/Web/Images/Ver_2_0/RtTopInspire.png" />
                        </p>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 0in 0in 0in 0in">
                    </td>
                    <td style="padding: 0in 0in 0in 0in">
                        <table width="100%" cellspacing="0" cellpadding="0" border="0" style="width: 100.0%">
                            <tbody>
                                <tr>
                                    <td style="padding: 0in 0in 0in 0in">
                                        <p style="margin:0;">
                                            <a href="{$MasterBrandTargetURL}/Home.aspx">
                                                <xsl:choose>
                                                    <xsl:when test="$FullWidthHeaderLogo = 1">
                                                        <img border="0" alt="LifeSpace" src="{$LogoURL}" />
                                                    </xsl:when>
                                                    <xsl:otherwise>
                                                        <img height="32" border="0" alt="LifeSpace" src="{$LogoURL}" />
                                                    </xsl:otherwise>
                                                </xsl:choose>
                                            </a>
                                        </p>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                    <td style="padding: 0in 0in 0in 0in">
                    </td>
                </tr>
            </tbody>
        </table>
    </xsl:template>

    <xsl:template name="EmailBody">

        <xsl:param name="SalesUserName" select="'N/A'"></xsl:param>
        <xsl:param name="PortalName" select="'N/A'"></xsl:param>
        <xsl:param name="ContentHTML" select="'N/A'"></xsl:param>

        <table width="100%" cellspacing="0" cellpadding="0"  style="width: 100.0%;
															background: white; border-top: none; border-left: solid #e4e4e4 1.0pt; border-bottom: none;
															border-right: solid #e4e4e4 1.0pt">
            <tbody>
                <tr>
                    <td style="padding: 0.4in 0in 0in 0.3in">
                        <span style="text-decoration:none;font-size: 15.5pt; font-family: Arial,sans-serif; color: #222222; font-weight: normal;">
                            Hi <xsl:value-of select="$SalesUserName"/>,
                        </span>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 0.3in 0in 0in 0.3in">
                        <xsl:copy-of select="$ContentHTML"/>
                    </td>
                </tr>
                <!--<tr>
                    <td style="padding: 0.4in 0in 0in 0.3in">
                        <span style="color: #3088cd; text-decoration: none;font-size: 10.0pt;color: #6D6E71;">
                            Sincerely,
                        </span>
                    </td>
                </tr>
                <tr>
                    <td style="padding: 0.2in 0in 0in 0.3in">
                        <span style="color: #3088cd; text-decoration: none;font-size: 10.0pt;color: #6D6E71;">
                            <xsl:value-of select="$PortalName"/>
                        </span>
                    </td>
                </tr>-->
            </tbody>
        </table>
    </xsl:template>

    <xsl:template name="EmailFooter">
        <table width="100%" cellspacing="0" cellpadding="0" border="0" style="width: 100.0%;background: white">
            <tbody>
                <tr style="min-height: 7.5pt">
                    <td width="10" valign="top" style="width: 7.5pt; background: #f2f2f2; padding: 0in 0in 0in 0in;min-height: 7.5pt; min-height: 10px">
                        <p style="line-height: 0%;margin:0;">
                            <span style="font-size: 1.0pt">
                                <img width="10" height="10" border="0" src="https://www.coachsimple.net/desktopModules/LifespaceTemplates/Web/Images/Ver_2_0/clb_01.png" />

                            </span>
                        </p>
                    </td>
                    <td valign="bottom" style="padding: 0in 0in 0in 0in; min-height: 7.5pt; min-height: 10px">
                        <table width="100%" cellspacing="0" cellpadding="0" border="0" style="width: 100.0%">
                            <tbody>
                                <tr style="min-height: .75pt">
                                    <td style="background: #e4e4e4; padding: 0in 0in 0in 0in; min-height: .75pt; min-height: 1px">
                                        <p style="line-height: 0%;margin:0;">
                                            <span style="font-size: 1.0pt">

                                            </span>
                                        </p>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                    <td width="10" valign="top" style="width: 7.5pt; background: #f2f2f2; padding: 0in 0in 0in 0in;min-height: 7.5pt; min-height: 10px">
                        <p align="right" style="text-align: right; line-height: 0%;margin:0;">
                            <span style="font-size: 1.0pt">
                                <img width="10" height="10" border="0" src="https://www.coachsimple.net/desktopModules/LifespaceTemplates/Web/Images/Ver_2_0/crb_01.png" />
                            </span>
                        </p>
                    </td>
                </tr>
            </tbody>
        </table>
    </xsl:template>

    <xsl:template name="EmailBottomBorderLine">
        <table width="100%" cellspacing="0" cellpadding="0" border="0" style="width: 100.0%;background: white">
            <tbody>
                <tr style="min-height: 7.5pt">
                    <td valign="top" style="padding: 0in 0in 0in 0in; min-height: 7.5pt; min-height: 1px">
                        <table width="100%" cellspacing="0" cellpadding="0" border="0" style="width: 100.0%">
                            <tbody>
                                <tr style="min-height: .75pt">
                                    <td style="background: #e4e4e4; padding: 0in 0in 0in 0in; min-height: .75pt; border-bottom:solid #e4e4e4 1.0pt;">
                                        <p style="line-height: 0%;margin:0;">
                                            <span style="font-size: 1.0pt">

                                            </span>
                                        </p>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </xsl:template>
</xsl:stylesheet>
