﻿<?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="HostBrandWizardButtons.xslt"/>		
	<xsl:include href="../../Version_2_0/PopUpHeader.xslt"/>

	<xsl:output method="xml" indent="yes"/>

	<xsl:template match="/">
		<xsl:variable name="ParentPortalItemID" select="AjaxRequest/Portal/PortalItemID"></xsl:variable>
		<xsl:variable name="BrandID" select="AjaxRequest/Params/BrandID"></xsl:variable>
		<xsl:variable name="BrandLogo" select="AjaxRequest/Portal/BrandLogoSmallURL"></xsl:variable>
		<xsl:variable name="Portal" select="AjaxRequest/Portal/PortalName"></xsl:variable>
		<xsl:variable name="TemplateURL" select="AjaxRequest/TemplateURL"></xsl:variable>
		<xsl:variable name="HostName" select="AjaxRequest/HostName"></xsl:variable>
		<xsl:variable name="IsCommunityAdmin" select="AjaxRequest/IsCommunityAdmin"></xsl:variable>
		<xsl:variable name="PromoteKey" select="AjaxRequest/Brand/PromoteKey"></xsl:variable>

		<xsl:call-template name="PopUpHeader">
			<xsl:with-param name="ItemID" select="$BrandID"></xsl:with-param>
			<xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
			<xsl:with-param name="HeaderText">
				<xsl:text>Create Host</xsl:text>
			</xsl:with-param>
		</xsl:call-template>		
		
		<div class="padding15" id="divCreateBrand">
			<xsl:call-template name="HostBrandWizardButtons">
				<xsl:with-param name="TemplateURL" select="$TemplateURL"></xsl:with-param>
				<xsl:with-param name="HostName" select="$HostName"></xsl:with-param>
				<xsl:with-param name="Source" >
					<xsl:text>CreateBrand</xsl:text>
				</xsl:with-param>								
				<xsl:with-param name="BrandID">
					<xsl:text>0</xsl:text>
				</xsl:with-param>
				<xsl:with-param name="PromoteKey" select="$PromoteKey"></xsl:with-param>				
			</xsl:call-template>
			
			<div style="color: #376092; margin-top: 10px; margin-bottom: 5px;">
				<table class="tableMaster" cellpadding="0" cellspacing="0" border="0">
					<tr>
						<td>
							<div id="divHeader">
								<span class="labelSize14">
									Step 1 of 2 – Create Your Brand in <xsl:value-of select="$Portal"/>
								</span>
							</div>
							<div style="padding-top:10px">
								<span class="labelSize13">
									“The first step is to secure your brand within <xsl:value-of select="$Portal"/>.  In this important step, you will identify what type of organization you are and will secure your <xsl:value-of select="$Portal"/> Brand identity.“
								</span>
							</div>
						</td>
						<td>
							<div>
								<img src="{$TemplateURL}Web/Images/AdPerson_Left.jpg" title="AdPerson" BORDER="0"></img>
								<!--<img src="{$BrandLogo}" alt="" height="150px" title="{$Portal}" BORDER="0"></img>-->
							</div>
						</td>
					</tr>
				</table>
			</div>
			<table class="tableMaster" cellpadding="3">
				<tr>
					<td style="width:25%">
						<span class="labelSize10" >
							Type:
						</span>
					</td>
					<td>
						<select class="largeDropdown" name="BrandType" id="ddlBrandType" style="color:gray;"
								onFocus="this.style.color='black';"
								onchange='setDropDownStyle("ddlBrandType");'>
							<option selected="selected" value="0">Select your brand type..</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="BrandName" id="txtBrandName" style="width:100%; color:gray;" class="text" maxlength="50"
								   value="Enter your brand name here.." onFocus='clearTextBox("txtBrandName","Enter your brand name here..");'
								   onBlur='setTextBoxStyle("txtBrandName","Enter your brand name here.."); setBrandSuggestedName(this); 
                                   CreateBrand_CheckAvailable("txtCommunityURL"); setTextBoxStyle("txtCommunityURL","Brand Here");'/>
						</div>
					</td>
				</tr>
				<tr>
					<td valign="bottom">
						<span class="labelSize10">
							Community URL*:
						</span>
					</td>
					<td>
						<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="Brand Here" onFocus='clearTextBox("txtCommunityURL","Brand Here");' onKeyPress='return disableEnterKey(event)'
													   onBlur='CreateBrand_CheckAvailable("txtCommunityURL"); setTextBoxStyle("txtCommunityURL","Brand Here");'/>
											</td>
										</tr>
									</table>
								</td>
								<td>
									&#xa0;&#xa0;<span id='errMessage' class ="labelSize10" style="color:green; display:none;">OK</span>
								</td>
							</tr>
						</table>
					</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 brand description here..");'
									  onBlur='setTextBoxStyle("txtDescription","Enter your brand description here..");'>
								<xsl:text>Enter your brand description here..</xsl:text>
							</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">
							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>
						<span class="labelSize10">
							Publish:
						</span>
					</td>
					<td>
						<xsl:choose>
							<xsl:when test="AjaxRequest/UserRoles/Role[RoleName = 'Brand Admin']">
								<div>
									<select id ="ddlPublish" name="Public" class="smallDropdown"
											style="color:gray;" onFocus="this.style.color='black';"
											onchange='setDropDownStyle("ddlPublish");'>
										<option value="1" selected="selected">
											<xsl:text>Yes</xsl:text>
										</option>
										<option value="0">
											<xsl:text>No</xsl:text>
										</option>
									</select>
								</div>
							</xsl:when>
							<xsl:otherwise>
								<span class="smallDropdown">
									<xsl:text>No</xsl:text>
								</span>
							</xsl:otherwise>
						</xsl:choose>
					</td>
				</tr>
				<tr>
					<td>
						<span class="labelSize10">
							Logo URL:
						</span>
					</td>
					<td>
						<div  style="width:85%;">
							<input type="text" name="Logo" id="txtLogo" style="width:100%;color:gray; " class="text" maxlength="255"
								   value="Enter your brand logo here.." onFocus='clearTextBox("txtLogo","Enter your brand logo here..");'
								   onBlur='setTextBoxStyle("txtLogo","Enter your brand logo here..");'/>
						</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 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 align="right" style="padding:10px;display:block;" id="btnAddBrandContent">
				<a class ="link" onClick='Brand_CreateHost(
                                    "ddlBrandType", "txtBrandName", "txtWebsite", "txtCompanyEmail", 
                                    "txtCommunityURL", "errMessage", "txtDescription", "ddlBrandSecure", "txtLogo", 
                                    "Brand_HiddenAggrementXML","{$IsCommunityAdmin}","txtAddress1", "txtAddress2", "txtCity", "txtState", "txtPostalCode", "txtMainPhone","ddlPublish","{$ParentPortalItemID}");'>
					<img src="{normalize-space($TemplateURL)}Web/Images/BtnContinue.png" title="Continue Button" style="cursor: pointer; border:0px;"/>
				</a>
			</div>
		</div>
	</xsl:template>
</xsl:stylesheet>
