﻿<?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:import href="CoachWizardButtons.xslt"/>

    <xsl:import href="../Brand/Agreement.xslt"/>
    <xsl:import href="../GenericTemplates/Notes_LineBreak.xslt"/>

    <xsl:output method="xml" indent="yes"/>


    <xsl:template match="/">
        <xsl:variable name="TemplateURL" select="normalize-space(AjaxRequest/TemplateURL)"></xsl:variable>
        <xsl:variable name="HostName" select="normalize-space(AjaxRequest/HostName)"></xsl:variable>
        <xsl:variable name="BrandID" select="normalize-space(AjaxRequest/BrandID)"></xsl:variable>
        <xsl:variable name="IsCommunityAdmin" select="normalize-space(AjaxRequest/IsCommunityAdmin)"></xsl:variable>
        <xsl:variable name="CreatedBrandCompanyName" select="normalize-space(AjaxRequest/CreatedBrand/CompanyName)"></xsl:variable>
        <xsl:variable name="CreatedBrandBrandKey" select="normalize-space(AjaxRequest/CreatedBrand/BrandKey)"></xsl:variable>
        <xsl:variable name="CreatedBrandDescription" select="normalize-space(AjaxRequest/CreatedBrand/BrandDescription)"></xsl:variable>
        <xsl:variable name="CreatedBrandCoachingStyle" select="normalize-space(AjaxRequest/CreatedBrand/CoachingStyle)"></xsl:variable>
        <xsl:variable name="CreatedBrandSpeciality" select="normalize-space(AjaxRequest/CreatedBrand/SpecialityFocus)"></xsl:variable>
        <xsl:variable name="CreatedBrandExperience" select="normalize-space(AjaxRequest/CreatedBrand/ExperienceCertifications)"></xsl:variable>
        <xsl:variable name="CreatedBrandIdealClient" select="normalize-space(AjaxRequest/CreatedBrand/IdealClient)"></xsl:variable>
        <xsl:variable name="PromoteKey" select="normalize-space(AjaxRequest/BrandDetails/Detail/PromoteKey)"></xsl:variable>
        <xsl:variable name="Origin" select="normalize-space(AjaxRequest/Origin)"></xsl:variable>


        <xsl:if test="$Origin != 'CoachingPortal'">
            <xsl:call-template name="CoachWizardButtons">
                <xsl:with-param name="TemplatePathURL" select="$TemplateURL"></xsl:with-param>
                <xsl:with-param name ="Source" >
                    <xsl:text>CreateCoach</xsl:text>
                </xsl:with-param>
                <xsl:with-param name ="HostName" select="$HostName"></xsl:with-param>
                <xsl:with-param name="BrandID" select="$BrandID"></xsl:with-param>
                <xsl:with-param name="IsCommunityAdmin" select="$IsCommunityAdmin"></xsl:with-param>
                <xsl:with-param name="PromoteKey" select="$PromoteKey"></xsl:with-param>
            </xsl:call-template>


            <div style="color: #376092; margin-top: 20px;">
                <table class="tableMaster" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td>
                            <div id="divHeader">
                                <span class="labelSize14">
                                    Step 1 of 3 – About Me
                                </span>
                            </div>
                            <div style="padding-top:10px">
                                <span class="labelSize13">
                                    "The first step is to setup your profile and secure your brand within LifeSpace. In this important step, you will identify what type of organization you are, tell the world a little about yourself and secure your LifeSpace Brand identity and Community URL."
                                </span>
                            </div>
                        </td>
                        <td>
                            <div>
                                <img src="{normalize-space($TemplateURL)}Web/Images/AdPerson_Left.jpg" height="150px" title="Register_Girl" BORDER="0"></img>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </xsl:if>

        <xsl:choose>
            <xsl:when test="$BrandID = 0">
                <div>
                    <table class="tableMaster" cellpadding="3">
                        <tr>
                            <td style="width:25%">
                                <span class="labelSize10" >
                                    Choose the Best Community:
                                </span>
                            </td>
                            <td>
                                <select class="largeDropdown" id="ddlCommunity" style="color:gray;"
                                        onFocus="this.style.color='black';"
                                        onchange='setDropDownStyle("ddlCommunity");'>
                                    <option selected="selected" value="0">Select your community..</option>
                                    <xsl:for-each select ="AjaxRequest/BrandTypes/BrandTypeNode">
                                        <option value="{BrandTypeID/.}">
                                            <xsl:value-of select ="normalize-space(BrandType/.)"/>
                                        </option>
                                    </xsl:for-each>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Name:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <input type="text" name="CoachName" id="txtCoachName" style="width:100%;color:gray;" class="text" maxlength="50"
                                           value="Enter your name here.." onFocus='clearTextBox("txtCoachName","Enter your name here..");'
                                           onBlur='setTextBoxStyle("txtCoachName","Enter your name here.."); setBrandSuggestedName(this); 
                                       CreateBrand_CheckAvailable("txtCommunityURL"); setTextBoxStyle("txtCommunityURL","Name Here");'/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td valign="bottom">
                                <span class="labelSize10">
                                    Community URL*:
                                </span>
                            </td>
                            <td>
                                <div style="width:100%; border:0px;">
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="width:85%;">
                                                <table  cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td style="vertical-align: middle;" valign="middle">
                                                            <span class ="labelSize10">http://www.lifespace.com/</span>
                                                        </td>
                                                        <td style="width:100%">
                                                            <input type="text" name=" CommunityURL" id ="txtCommunityURL" style="width:100%;  color:gray;" class="text" maxlength="50"
                                                                       value="Name Here" onFocus='clearTextBox("txtCommunityURL","Name Here");' onKeyPress='return disableEnterKey(event)'
                                                                       onBlur='CreateBrand_CheckAvailable("txtCommunityURL"); setTextBoxStyle("txtCommunityURL","Name Here");'/>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td>
                                                &#xa0;&#xa0;<span id='errMessage' class ="labelSize10" style="color:green; display:none;">OK</span>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Description:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <textarea rows="4" id="txtDescription" style="width:100%; color:gray;" class="textAreaBox"
                                           onFocus='clearTextBox("txtDescription","Enter your description here..");'
                                              onBlur='setTextBoxStyle("txtDescription","Enter your description here..");'>
                                        Enter your description here..
                                    </textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Coaching Style:
                                </span>
                            </td>
                            <td class="labelSize10">
                                <div class="labelSize10">
                                    <textarea id="txtCoachingStyle" class="textArea"
                                           rows="1" style="width:358px;"
                                              onClick="return ExpandOnClick('txtCoachingStyle');"
                                              onFocus="return ExpandOnClick('txtCoachingStyle');"
                                              onBlur="return CollapseOnClick('txtCoachingStyle');"></textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Speciality/Focus:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10">
                                    <textarea id="txtSpeciality" class="textArea"
                                           rows="1" style="width:358px;"
                                              onClick="return ExpandOnClick('txtSpeciality');"
                                              onFocus="return ExpandOnClick('txtSpeciality');"
                                              onBlur="return CollapseOnClick('txtSpeciality');"></textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Experience/Certifications:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10">
                                    <textarea id="txtExperience" class="textArea"
                                           rows="1" style="width:358px;"
                                              onClick="return ExpandOnClick('txtExperience');"
                                              onFocus="return ExpandOnClick('txtExperience');"
                                              onBlur="return CollapseOnClick('txtExperience');"></textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Ideal Client:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10">
                                    <textarea id="txtIdealClient" class="textArea"
                                           rows="1" style="width:358px;"
                                              onClick="return ExpandOnClick('txtIdealClient');"
                                              onFocus="return ExpandOnClick('txtIdealClient');"
                                              onBlur="return CollapseOnClick('txtIdealClient');"></textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Primary Address:
                                </span>
                            </td>
                            <td class="labelSize10">
                                <div style="width:85%;">
                                    <input type="text" id="txtAddress1" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="Address1"
                                           onblur="setTextBoxStyle(&quot;txtAddress1&quot;,&quot;Address 1&quot;);"
                                           onfocus="clearTextBox(&quot;txtAddress1&quot;,&quot;Address 1&quot;);"
                                           value="Address 1"
                                           maxlength="50"></input>
                                </div>
                                <div style="width:85%;">
                                    <input type="text" id="txtAddress2" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="Address2"
                                           onblur="setTextBoxStyle(&quot;txtAddress2&quot;,&quot;Address 2&quot;);"
                                           onfocus="clearTextBox(&quot;txtAddress2&quot;,&quot;Address 2&quot;);"
                                           value="Address 2"
                                           maxlength="50"></input>
                                </div>
                                <div style="width:85%;">
                                    <input type="text" id="txtCity" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="City"
                                           onblur="setTextBoxStyle(&quot;txtCity&quot;,&quot;City&quot;);"
                                           onfocus="clearTextBox(&quot;txtCity&quot;,&quot;City&quot;);"
                                           value="City"
                                           maxlength="50"></input>
                                </div>
                                <div style="width:85%;">
                                    <input type="text" id="txtState" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="State"
                                                  onblur="setTextBoxStyle(&quot;txtState&quot;,&quot;State&quot;);"
                                                  onfocus="clearTextBox(&quot;txtState&quot;,&quot;State&quot;);"
                                                  value="State"
                                                  maxlength="50"></input>
                                </div>
                                <div style="width:85%;">
                                    <input type="text" id="txtPostalCode" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="PostalCode"
                                                  onblur="setTextBoxStyle(&quot;txtPostalCode&quot;,&quot;Postal Code&quot;);"
                                                  onfocus="clearTextBox(&quot;txtPostalCode&quot;,&quot;Postal Code&quot;);"
                                                  value="Postal Code"
                                                  maxlength="50"></input>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Primary Phone:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10" style="width:85%;">
                                    <input type="text" id="txtMainPhone" class="text" style="width:100%; color: gray; margin-bottom:5px;" name="MainPhone"
                                                  onblur="setTextBoxStyle(&quot;txtMainPhone&quot;,&quot;Main Phone&quot;);"
                                                  onfocus="clearTextBox(&quot;txtMainPhone&quot;,&quot;Main Phone&quot;);"
                                                  value="Main Phone"
                                                  maxlength="50"></input>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Website URL:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <input type="text" name="Website" id="txtWebsite" style="width:100%;  color:gray;" class="text" maxlength="255"
                                           value="Enter your company website here.." onFocus='clearTextBox("txtWebsite","Enter your company website here..");'
                                           onBlur='setTextBoxStyle("txtWebsite","Enter your company website here..");'/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Company E-mail:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <input type="text" name="CompanyEmail" id ="txtCompanyEmail" style="width:100%;  color:gray;" class="text" maxlength="255"
                                           value="name@yourcompany.com" onFocus='clearTextBox("txtCompanyEmail","name@yourcompany.com");'
                                           onBlur='setTextBoxStyle("txtCompanyEmail","name@yourcompany.com"); CheckEmail("txtCompanyEmail");'/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Public:
                                </span>
                            </td>
                            <td>
                                <div>
                                    <select id ="ddlBrandSecure" name="Public" class="smallDropdown"
                                            style="color:gray;" onFocus="this.style.color='black';"
                                            onchange='setDropDownStyle("ddlBrandSecure");'>
                                        <option value="1" selected="selected">
                                            <xsl:text>Yes</xsl:text>
                                        </option>
                                        <option value="0">
                                            <xsl:text>No</xsl:text>
                                        </option>
                                    </select>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div calss="label" style="color:#003366; width:95%; padding-top:10px;">
                                    * See our <a href="#">
                                        <u>Brand Reservation Policies</u>
                                    </a>. For questions regarding reserving your brand, please contact <a href="mailto:AccountServices@LifeSpace.com" class="link">
                                        <u>AccountServices@LifeSpace.com</u>
                                    </a>
                                </div>
                            </td>
                            <td></td>
                        </tr>

                    </table>
                </div>
            </xsl:when>
            <xsl:otherwise>
                <div>
                    <table class="tableMaster" cellpadding="3">
                        <tr>
                            <td style="width:25%">
                                <span class="labelSize10" >
                                    Choose the Best Community:
                                </span>
                            </td>
                            <td>
                                <select class="largeDropdown" id="ddlCommunity"
                                        onFocus="this.style.color='black';"
                                        onchange='setDropDownStyle("ddlCommunity");'>
                                    <option value="0">Select your community..</option>
                                    <xsl:for-each select ="AjaxRequest/BrandTypes/BrandTypeNode">

                                        <xsl:if test="BrandTypeID = ../../CreatedBrand/BrandTypeID">
                                            <option selected="selected" value="{BrandTypeID/.}">
                                                <xsl:value-of select ="normalize-space(BrandType/.)"/>
                                            </option>
                                        </xsl:if>

                                        <xsl:if test="BrandTypeID != ../../CreatedBrand/BrandTypeID">
                                            <option value="{BrandTypeID/.}">
                                                <xsl:value-of select ="normalize-space(BrandType/.)"/>
                                            </option>
                                        </xsl:if>

                                    </xsl:for-each>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Name:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <input type="text" name="CoachName" readonly="readonly" id="txtCoachName" style="width:100%; " class="text" maxlength="50"
                                           value="{$CreatedBrandCompanyName}"
                                           onFocus='clearTextBox("txtCoachName","Enter your name here..");'
                                           onBlur='setTextBoxStyle("txtCoachName","Enter your name here..");'/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td valign="bottom">
                                <span class="labelSize10">
                                    Community URL*:
                                </span>
                            </td>
                            <td>
                                <div style="width:100%; border:0px;">
                                    <table width="100%" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="width:85%;">
                                                <table  cellpadding="0" cellspacing="0">
                                                    <tr>
                                                        <td style="vertical-align: middle;" valign="middle">
                                                            <span class ="labelSize10">
                                                                http://www.lifespace.com/<xsl:value-of select="$CreatedBrandBrandKey"/>
                                                            </span>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Description:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <textarea rows="4" id="txtDescription" style="width:100%;"  class="textAreaBox"
                                           onFocus='clearTextBox("txtDescription","Enter your description here..");' onBlur='setTextBoxStyle("txtDescription","Enter your description here..");'>
                                        <xsl:call-template name="break">
                                            <xsl:with-param name="text" select="$CreatedBrandDescription" />
                                        </xsl:call-template>
                                        <!--<xsl:value-of select="$CreatedBrandDescription"></xsl:value-of>-->
                                    </textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Coaching Style:
                                </span>
                            </td>
                            <td class="labelSize10">
                                <div class="labelSize10">
                                    <textarea id="txtCoachingStyle" class="textArea"
                                           rows="4" style="width:358px;"
                                              onClick="return ExpandOnClick('txtCoachingStyle');"
                                              onFocus="return ExpandOnClick('txtCoachingStyle');"
                                              onBlur="return CollapseOnClick('txtCoachingStyle');">
                                        <xsl:value-of select="$CreatedBrandCoachingStyle"></xsl:value-of>
                                    </textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Speciality/Focus:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10">
                                    <textarea id="txtSpeciality" class="textArea"
                                           rows="4" style="width:358px;"
                                              onClick="return ExpandOnClick('txtSpeciality');"
                                              onFocus="return ExpandOnClick('txtSpeciality');"
                                              onBlur="return CollapseOnClick('txtSpeciality');">
                                        <xsl:value-of select="$CreatedBrandSpeciality"></xsl:value-of>
                                    </textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Experience/Certifications:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10">
                                    <textarea id="txtExperience" class="textArea"
                                           rows="4" style="width:358px;"
                                              onClick="return ExpandOnClick('txtExperience');"
                                              onFocus="return ExpandOnClick('txtExperience');"
                                              onBlur="return CollapseOnClick('txtExperience');">
                                        <xsl:value-of select="$CreatedBrandExperience"></xsl:value-of>
                                    </textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Ideal Client:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10">
                                    <textarea id="txtIdealClient" class="textArea"
                                           rows="4" style="width:358px;"
                                              onClick="return ExpandOnClick('txtIdealClient');"
                                              onFocus="return ExpandOnClick('txtIdealClient');"
                                              onBlur="return CollapseOnClick('txtIdealClient');">
                                        <xsl:value-of select="$CreatedBrandIdealClient"></xsl:value-of>
                                    </textarea>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Primary Address:
                                </span>
                            </td>
                            <td class="labelSize10">
                                <div style="width:85%;">
                                    <xsl:choose>
                                        <xsl:when test="normalize-space(AjaxRequest/CreatedBrand/Address1) != ''">
                                            <input type="text" id="txtAddress1" class="text" style="width:100%; margin-bottom:5px;" name="Address1"
                                               onblur="setTextBoxStyle(&quot;txtAddress1&quot;,&quot;Address 1&quot;);"
                                               onfocus="clearTextBox(&quot;txtAddress1&quot;,&quot;Address 1&quot;);"
                                               maxlength="50"
                                               value="{AjaxRequest/CreatedBrand/Address1}"></input>
                                        </xsl:when>
                                        <xsl:otherwise>
                                            <input type="text" id="txtAddress1" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="Address1"
                                              onblur="setTextBoxStyle(&quot;txtAddress1&quot;,&quot;Address 1&quot;);"
                                              onfocus="clearTextBox(&quot;txtAddress1&quot;,&quot;Address 1&quot;);"
                                              value="Address 1"
                                              maxlength="50"></input>
                                        </xsl:otherwise>
                                    </xsl:choose>
                                </div>
                                <div style="width:85%;">
                                    <xsl:choose>
                                        <xsl:when test="normalize-space(AjaxRequest/CreatedBrand/Address2) != ''">
                                            <input type="text" id="txtAddress2" class="text" style="width:100%; margin-bottom:5px;" name="Address2"
                                                   onblur="setTextBoxStyle(&quot;txtAddress2&quot;,&quot;Address 2&quot;);"
                                                   onfocus="clearTextBox(&quot;txtAddress2&quot;,&quot;Address 2&quot;);"
                                                   value="{AjaxRequest/CreatedBrand/Address2}"
                                                   maxlength="50"></input>
                                        </xsl:when>
                                        <xsl:otherwise>
                                            <input type="text" id="txtAddress2" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="Address2"
                                                   onblur="setTextBoxStyle(&quot;txtAddress2&quot;,&quot;Address 2&quot;);"
                                                   onfocus="clearTextBox(&quot;txtAddress2&quot;,&quot;Address 2&quot;);"
                                                   value="Address 2"
                                                   maxlength="50"></input>
                                        </xsl:otherwise>
                                    </xsl:choose>
                                </div>
                                <div style="width:85%;">
                                    <xsl:choose>
                                        <xsl:when test="normalize-space(AjaxRequest/CreatedBrand/City) != ''">
                                            <input type="text" id="txtCity" class="text" style="width:100%; margin-bottom:5px;" name="City"
                                                   onblur="setTextBoxStyle(&quot;txtCity&quot;,&quot;City&quot;);"
                                                   onfocus="clearTextBox(&quot;txtCity&quot;,&quot;City&quot;);"
                                                   value="{AjaxRequest/CreatedBrand/City}"
                                                   maxlength="50"></input>
                                        </xsl:when>
                                        <xsl:otherwise>
                                            <input type="text" id="txtCity" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="City"
                                                  onblur="setTextBoxStyle(&quot;txtCity&quot;,&quot;City&quot;);"
                                                  onfocus="clearTextBox(&quot;txtCity&quot;,&quot;City&quot;);"
                                                  value="City"
                                                  maxlength="50"></input>
                                        </xsl:otherwise>
                                    </xsl:choose>

                                </div>
                                <div style="width:85%;">
                                    <xsl:choose>
                                        <xsl:when test="normalize-space(AjaxRequest/CreatedBrand/State) != ''">
                                            <input type="text" id="txtState" class="text" style="width:100%; margin-bottom:5px;" name="State"
                                                onblur="setTextBoxStyle(&quot;txtState&quot;,&quot;State&quot;);"
                                                onfocus="clearTextBox(&quot;txtState&quot;,&quot;State&quot;);"
                                                value="{AjaxRequest/CreatedBrand/State}"
                                                maxlength="50"></input>
                                        </xsl:when>
                                        <xsl:otherwise>
                                            <input type="text" id="txtState" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="State"
                                                onblur="setTextBoxStyle(&quot;txtState&quot;,&quot;State&quot;);"
                                                onfocus="clearTextBox(&quot;txtState&quot;,&quot;State&quot;);"
                                                value="State"
                                                maxlength="50"></input>
                                        </xsl:otherwise>
                                    </xsl:choose>
                                </div>
                                <div style="width:85%;">
                                    <xsl:choose>
                                        <xsl:when test="normalize-space(AjaxRequest/CreatedBrand/PostalCode) != ''">
                                            <input type="text" id="txtPostalCode" class="text" style="width:100%; margin-bottom:5px;" name="PostalCode"
                                                 onblur="setTextBoxStyle(&quot;txtPostalCode&quot;,&quot;Postal Code&quot;);"
                                                 onfocus="clearTextBox(&quot;txtPostalCode&quot;,&quot;Postal Code&quot;);"
                                                  value="{AjaxRequest/CreatedBrand/PostalCode}"
                                                 maxlength="50"></input>
                                        </xsl:when>
                                        <xsl:otherwise>
                                            <input type="text" id="txtPostalCode" class="text" style="width:100%; color: gray;  margin-bottom:5px;" name="PostalCode"
                                                   onblur="setTextBoxStyle(&quot;txtPostalCode&quot;,&quot;Postal Code&quot;);"
                                                   onfocus="clearTextBox(&quot;txtPostalCode&quot;,&quot;Postal Code&quot;);"
                                                   value="Postal Code"
                                                   maxlength="50"></input>
                                        </xsl:otherwise>
                                    </xsl:choose>

                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="width:30%">
                                <span class="labelSize10" >
                                    Primary Phone:
                                </span>
                            </td>
                            <td>
                                <div class="labelSize10" style="width:85%;">
                                    <xsl:choose>
                                        <xsl:when test="normalize-space(AjaxRequest/CreatedBrand/PhoneMain) != ''">
                                            <input type="text" id="txtMainPhone" class="text" style="width:100%; margin-bottom:5px;" name="MainPhone"
                                                onblur="setTextBoxStyle(&quot;txtMainPhone&quot;,&quot;Main Phone&quot;);"
                                                onfocus="clearTextBox(&quot;txtMainPhone&quot;,&quot;Main Phone&quot;);"
                                                value="{AjaxRequest/CreatedBrand/PhoneMain}"
                                                maxlength="50"></input>
                                        </xsl:when>
                                        <xsl:otherwise>
                                            <input type="text" id="txtMainPhone" class="text" style="width:100%; color: gray; margin-bottom:5px;" name="MainPhone"
                                                onblur="setTextBoxStyle(&quot;txtMainPhone&quot;,&quot;Main Phone&quot;);"
                                                onfocus="clearTextBox(&quot;txtMainPhone&quot;,&quot;Main Phone&quot;);"
                                                value="Main Phone"
                                                maxlength="50"></input>
                                        </xsl:otherwise>
                                    </xsl:choose>

                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Website URL:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <input type="text" name="Website" id="txtWebsite" style="width:100%;" class="text" maxlength="50"
                                           value="{AjaxRequest/CreatedBrand/CompanyWebsiteURL}"
                                           onFocus='clearTextBox("txtWebsite","Enter your company website here..");'
                                           onBlur='setTextBoxStyle("txtWebsite","Enter your company website here..");'/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Company E-mail:
                                </span>
                            </td>
                            <td>
                                <div style="width:85%;">
                                    <input type="text" name="CompanyEmail" id ="txtCompanyEmail" style="width:100%; " class="text" maxlength="50"
                                           value="{AjaxRequest/CreatedBrand/CompanyEmail}"
                                           onFocus='clearTextBox("txtCompanyEmail","name@yourcompany.com");'
                                           onBlur='setTextBoxStyle("txtCompanyEmail","name@yourcompany.com");
                                                       CheckEmail("txtCompanyEmail");'/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span class="labelSize10">
                                    Public:
                                </span>
                            </td>
                            <td>
                                <div>
                                    <select id ="ddlBrandSecure" name="Public" class="smallDropdown"
                                            onFocus="this.style.color='black';"
                                            onchange='setDropDownStyle("ddlBrandSecure");'>
                                        <xsl:if test="AjaxRequest/CreatedBrand/PublicYN = 1">
                                            <option value="1" selected="selected">
                                                <xsl:text>Yes</xsl:text>
                                            </option>
                                            <option value="0">
                                                <xsl:text>No</xsl:text>
                                            </option>
                                        </xsl:if>

                                        <xsl:if test="AjaxRequest/CreatedBrand/PublicYN = 0">
                                            <option value="1">
                                                <xsl:text>Yes</xsl:text>
                                            </option>
                                            <option value="0" selected="selected">
                                                <xsl:text>No</xsl:text>
                                            </option>
                                        </xsl:if>
                                    </select>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div calss="label" style="color:#003366; width:95%; padding-top:10px;">
                                    * See our <a href="#">
                                        <u>Brand Reservation Policies</u>
                                    </a>. For questions regarding reserving your brand, please contact <a href="mailto:AccountServices@LifeSpace.com" class="link">
                                        <u>AccountServices@LifeSpace.com</u>
                                    </a>
                                </div>
                            </td>
                            <td></td>
                        </tr>

                    </table>
                </div>
            </xsl:otherwise>
        </xsl:choose>

        <xsl:choose>
            <xsl:when test="$Origin != 'CoachingPortal'">
                <xsl:choose>
                    <xsl:when test="$BrandID = 0">
                        <div align="right" style="padding:10px;display:block;" id="btnAddBrandContent">
                            <a class ="link" onClick='Brand_CreateCoach(
                                    "ddlCommunity", "txtCoachName", "txtCommunityURL", "txtDescription", 
                                    "txtCoachingStyle", "txtSpeciality","txtExperience","txtIdealClient",
                                    "txtAddress1", "txtAddress2", "txtCity", "txtState", "txtPostalCode", "txtMainPhone",
                                    "ddlBrandSecure", "txtWebsite", "txtCompanyEmail", "errMessage", 
                                    "{$IsCommunityAdmin}","Brand_HiddenAggrementXML");'>
                                <img src="{normalize-space($TemplateURL)}Web/Images/BtnContinue.png" title="Continue Button" style="cursor: pointer; border:0px;"/>
                            </a>
                        </div>
                    </xsl:when>
                    <xsl:otherwise>
                        <div align="right" style="padding:10px;">
                            <a class ="link"
                               onClick='Brand_UpdateCoach(
                                    "ddlCommunity", "txtCoachName", "txtCommunityURL", "txtDescription", 
                                    "txtCoachingStyle", "txtSpeciality","txtExperience","txtIdealClient",
                                    "txtAddress1", "txtAddress2", "txtCity", "txtState", "txtPostalCode", "txtMainPhone",
                                    "ddlBrandSecure", "txtWebsite", "txtCompanyEmail", 
                                    "{$BrandID}","{$Origin}");'>
                                <img src="{normalize-space($TemplateURL)}Web/Images/BtnContinue.png" title="Continue Button" style="cursor: pointer; border:0px;">
                                </img>
                            </a>
                        </div>
                    </xsl:otherwise>
                </xsl:choose>

                <xsl:call-template name="MarketPlaceAgreement"></xsl:call-template>

            </xsl:when>
            <xsl:otherwise>
                <div align="right" style="padding-right:70px;display:block;" id="btnAddBrandContent">
                    <input type="button" class="button" value="Save"
                                onclick='Brand_UpdateCoach(
                                    "ddlCommunity", "txtCoachName", "txtCommunityURL", "txtDescription", 
                                    "txtCoachingStyle", "txtSpeciality","txtExperience","txtIdealClient",
                                    "txtAddress1", "txtAddress2", "txtCity", "txtState", "txtPostalCode", "txtMainPhone",
                                    "ddlBrandSecure", "txtWebsite", "txtCompanyEmail", 
                                    "{$BrandID}","{$Origin}");'></input>
                </div>
            </xsl:otherwise>
        </xsl:choose>
       
    </xsl:template>
</xsl:stylesheet>
