<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:strip-space elements="*"/>
	<xsl:output method="html" indent="yes" encoding="utf-8"/>

	<xsl:template match="VIEW-CONTENT">
		<script type="text/javascript" language="javascript">
			function resizeIframePreview() {
				var iframePreview = document.getElementById("iframePreview");
				var trHeader = document.getElementById("TRHeader");
				var trFooter = document.getElementById("TRFooter");

				height = document.body.clientHeight - trHeader.clientHeight - trFooter.clientHeight ;
				iframePreview.style.height = height;
			}
			RegisterOnloadAction('resizeIframePreview()');
		</script>
		<table border="0" cellpadding="0" cellspacing="0" style="height: 100%; width: 100%;" align="center">
			<tr>
				<td style="vertical-align: top;" align="center">
					<div id="panelPreview">
						<iframe id="iframePreview" frameborder="no" style="background-color: white; width: 100%; height: 100%; border-top-width: 0px; padding-right: 0px; padding-left: 0px; border-left-width: 0px; border-bottom-width: 0px; padding-bottom: 0px; margin: 0px; overflow: auto; padding-top: 0px; border-right-width: 0px;">
							<xsl:attribute name="src"><xsl:value-of select="/SITEBUILDER-PAGE/VIEW-CONTENT/PAGE"/></xsl:attribute>
						</iframe>
					</div>
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template match="PUBLISH-MODAL-FORM" mode="initAfterBody">
		<script src='/js/Wizard/Publish.js?{$version}.{$build}' type='text/javascript'></script>
		<xsl:apply-templates select="/SITEBUILDER-PAGE/VIEW-CONTENT/PUBLISH-SETTINGS" mode="initAfterBody"/>
		<xsl:apply-templates select="/SITEBUILDER-PAGE/VIEW-CONTENT/SEND-EMAIL" mode="initAfterBody"/>
		<xsl:apply-templates select="/SITEBUILDER-PAGE/VIEW-CONTENT/PUBLISH-RESULT" mode="initAfterBody"/>
		<xsl:apply-templates select="/SITEBUILDER-PAGE/VIEW-CONTENT/DISABLE-PUBLISH" mode="initAfterBody"/>
	</xsl:template>

	<xsl:template match="DISABLE-PUBLISH" mode="initAfterBody">
		<xsl:call-template name="MODAL-FORM">
			<xsl:with-param name="formName">publishSettings</xsl:with-param>
			<xsl:with-param name="formTitle">Publish</xsl:with-param>
			<xsl:with-param name="additionalFormStyle">width: 360px; height: 200px; display: none;</xsl:with-param>
			<xsl:with-param name="content" select="current()" />
			<xsl:with-param name="onCloseAction">sb_publish.hideSettings();return false;</xsl:with-param>
			<xsl:with-param name="paddingOn">0</xsl:with-param>
		</xsl:call-template>
	</xsl:template>


	<xsl:template match="SEND-EMAIL" mode="initAfterBody">
		<xsl:variable name="display">
			<xsl:choose>
				<xsl:when test="/SITEBUILDER-PAGE/VIEW-CONTENT/PUBLISH-ACTION = 1">block</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>			
		</xsl:variable>

		<xsl:call-template name="MODAL-FORM">
			<xsl:with-param name="formName">publishSettings</xsl:with-param>
			<xsl:with-param name="formTitle">Publish</xsl:with-param>
			<xsl:with-param name="additionalFormStyle">width: 560px; height: 380px; display: <xsl:value-of select="$display"/>;</xsl:with-param>
			<xsl:with-param name="content" select="current()" />
			<xsl:with-param name="onCloseAction">sb_publish.hideSettings();return false;</xsl:with-param>
			<xsl:with-param name="paddingOn">0</xsl:with-param>
		</xsl:call-template>
	</xsl:template>


	<xsl:template match="PUBLISH-SETTINGS" mode="initAfterBody">
		<xsl:variable name="display">
			<xsl:choose>
				<xsl:when test="/SITEBUILDER-PAGE/VIEW-CONTENT/PUBLISH-ACTION = 1">block</xsl:when>
				<xsl:otherwise>none</xsl:otherwise>
			</xsl:choose>			
		</xsl:variable>

		<xsl:call-template name="MODAL-FORM">
			<xsl:with-param name="formName">publishSettings</xsl:with-param>
			<xsl:with-param name="formTitle">Publish</xsl:with-param>
			<xsl:with-param name="additionalFormStyle">width: 660px; height: 540px; display: <xsl:value-of select="$display"/>;</xsl:with-param>
			<xsl:with-param name="content" select="current()" />
			<xsl:with-param name="onCloseAction">sb_publish.hideSettings();return false;</xsl:with-param>
			<xsl:with-param name="paddingOn">0</xsl:with-param>
			<xsl:with-param name="showStatus">0</xsl:with-param>
		</xsl:call-template>
	</xsl:template>


	<xsl:template match="PUBLISH-SETTINGS" mode="content">
		<script type="text/javascript" language="javascript">
			sb_publish = new SB_Publish();
		</script>
		<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
			<xsl:call-template name="PUBLISH-STATUS" />
			<tr>
				<td class="SB_General_spacer" style="height: 1px;">
				</td>
			</tr>
			<tr>
				<td align="center" height="100%" style="padding: 0pt 14px; vertical-align: top;" bgcolor="#f7f7f7">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<xsl:choose>
						<xsl:when test="/SITEBUILDER-PAGE/VIEW-CONTENT/PUBLISH-SETTINGS/CONTROL[@NAME='defaultScenario']/@VALUE=2">
							<xsl:call-template name="PUBLISH-SCENARIO"/>
							<xsl:call-template name="PUBLISH-KNOWN-HOST">
								<xsl:with-param name="display">block</xsl:with-param>
							</xsl:call-template>
						</xsl:when>
						<xsl:when test="/SITEBUILDER-PAGE/VIEW-CONTENT/PUBLISH-SETTINGS/CONTROL[@NAME='defaultScenario']/@VALUE=1 and /SITEBUILDER-PAGE/ACTION-STATUS[@STATUS=2]">
	  						<xsl:call-template name="PUBLISH-SETTINGS-FORM"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:call-template name="PUBLISH-SCENARIO"/>
							<xsl:call-template name="PUBLISH-KNOWN-HOST">
								<xsl:with-param name="display">none</xsl:with-param>
							</xsl:call-template>
						</xsl:otherwise>
						</xsl:choose>
					</table>
				</td>
			</tr>
			<tr>
				<td class="SB_General_spacer" style="height: 1px;"></td>
			</tr>
			<tr>
				<td style="padding: 12px 0pt 15px; background-color: #ffffff; vertical-align: top;" align="center">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tr>
							<td style="width: 50%; padding-right: 5px;" align="right">
								<xsl:call-template name="OK-BUTTON">
									<xsl:with-param name="action">javascript: sb_publish.validatePublishSettings(); return false;</xsl:with-param>
								</xsl:call-template>
							</td>
							<td style="width: 50%; padding-left: 5px;" align="left">
								<xsl:call-template name="CANCEL-BUTTON">
									<xsl:with-param name="action">sb_publish.hideSettings(); return false;</xsl:with-param>
								</xsl:call-template>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template name="PUBLISH-SCENARIO">
		<tr>
			<td align="center" valign="top">
				<div id="PanelPublishScenario">
					<table border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td>
								<span style="color:Black;font-family:Arial;">
									<input id="standardScenario" type="radio" name="defaultScenario" value="1" onclick="sb_publish.changeScenario('1');">
										<xsl:if test="CONTROL[@NAME='defaultScenario']/@VALUE = 1 or (CONTROL[@NAME='defaultScenario']/@VALUE != 1 and CONTROL[@NAME='defaultScenario']/@VALUE != 2)">
											<xsl:attribute name="checked">checked</xsl:attribute>
										</xsl:if>
									</input>
									<label for="standardScenario"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/PUBLISHING-SCENARIO1"/></label>
								</span>
							</td>
						</tr>
						<tr>
							<td>
								<span style="color:Black;font-family:Arial;">
									<input id="anyFtpScenario" type="radio" name="defaultScenario" value="2" onclick="sb_publish.changeScenario('2');">
										<xsl:if test="CONTROL[@NAME='defaultScenario']/@VALUE = 2">
											<xsl:attribute name="checked">checked</xsl:attribute>
										</xsl:if>
									</input>
									<label for="anyFtpScenario"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/PUBLISHING-SCENARIO2"/></label>
								</span>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
	</xsl:template>

	<!-- Publishing to known FTP host form -->
	<xsl:template name="PUBLISH-KNOWN-HOST">
		<xsl:param name="display"/>
		<!--
			:INFO: abelyaev@ 20060713: do not change this style
				   see https://bugzilla.mozilla.org/show_bug.cgi?id=226933 for details
		-->
		<xsl:variable name="style">
			<xsl:choose>
				<xsl:when test="$browserEngine = 'Gecko'">overflow:auto; width:100%; height:18px;</xsl:when>
				<xsl:otherwise>width:100%; height:18px;</xsl:otherwise>
			</xsl:choose>	
		</xsl:variable>
		
		<tr>
			<td align="right"  bgcolor="#f7f7f7" valign="top">
				<div id="panelPublishParameters">
					<!--
						:INFO: abelyaev@ 20060713: do not change this style
							   see https://bugzilla.mozilla.org/show_bug.cgi?id=226933 for details
					-->
					<xsl:attribute name="style">display: <xsl:value-of select="$display"/>; overflow:auto; z-index:300;</xsl:attribute>
					<fieldset class="SB_Form_FieldSet">
						<legend>
							<span style="color:Black;font-family:Arial;font-size:11px;">
								<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/SPECIFY-PARAMETERS"/>
							</span>
						</legend>
						<table border="0" cellspacing="0" cellpadding="0" width="98%" align="center">
							<tr valign="top">
								<td style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='knownHost']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">on</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr valign="top">
								<td style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='knownUrl']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">on</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr>
								<td style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='knownDirectory']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">off</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>

							<tr>
								<td>
									<table id="FtpCredentials_TableCredentials" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
										<tr id="FtpCredentials_rowLoginType">
											<td width="50%" valign="top">
												<span id="FtpCredentials_LabelAuthenticationType" style="color:Black;font-family:Arial;font-size:11px;">
													<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/AUTH-TYPE"/>
												</span><br />
												<span id="FtpCredentials_LabelCredentialsHelp" style="color:#474747;font-family:Arial;font-size:11px;">
													<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/AUTH-TYPE-DESC"/>
												</span>
											</td>
											<td width="50%" valign="top">
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td style="padding-bottom: 4px;">
															<input type="radio" id="FtpCredentials_RadioButtonSpecified" name="knownIsAnonymous" value="0" onclick="sb_publish.changeAuthType(2,'');" style="margin: 0px;">
																<xsl:if test="CONTROL[@NAME='knownIsAnonymous']/@VALUE = 0 or not(CONTROL[@NAME='knownIsAnonymous']/@VALUE)">
																	<xsl:attribute name="checked">checked</xsl:attribute>
																</xsl:if>
															</input>
														</td>
														<td align="left">
															<label for="FtpCredentials_RadioButtonSpecified">
																<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/SPECIFY-ACCOUNT"/>
															</label>
														</td>
													</tr>

													<tr id="FtpCredentials_rowLogin">
														<td></td>
														<td style="padding-bottom: 4px;">
															<xsl:apply-templates select="CONTROL[@NAME='knownLogin']" mode="TITLE-LEFT">
																<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
																<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
																<xsl:with-param name="require">on</xsl:with-param>
																<xsl:with-param name="id">knownLogin</xsl:with-param>
															</xsl:apply-templates>
														</td>
													</tr>

													<tr id="FtpCredentials_rowPassword">
														<td></td>
														<td style="padding-bottom: 4px;">
															<xsl:apply-templates select="CONTROL[@NAME='knownPassword']" mode="TITLE-LEFT">
																<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
																<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
																<xsl:with-param name="type">password</xsl:with-param>
																<xsl:with-param name="require">on</xsl:with-param>
																<xsl:with-param name="id">knownPassword</xsl:with-param>
															</xsl:apply-templates>
														</td>
													</tr>


													<tr id="FtpCredentials_rowPassword2Confirm">
														<td></td>
														<td style="padding-bottom: 4px;">
															<xsl:apply-templates select="CONTROL[@NAME='confirmKnownPassword']" mode="TITLE-LEFT">
																<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
																<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
																<xsl:with-param name="type">password</xsl:with-param>
																<xsl:with-param name="require">on</xsl:with-param>
																<xsl:with-param name="id">confirmKnownPassword</xsl:with-param>
															</xsl:apply-templates>
														</td>
													</tr>
													<tr>
														<td>
															<input id="FtpCredentials_RadioButtonAnonymous" type="radio" name="knownIsAnonymous" value="1" onclick="sb_publish.changeAuthType(2,'anonym');" style="margin: 0px;">
																<xsl:if test="CONTROL[@NAME='knownIsAnonymous']/@VALUE = 1">
																	<xsl:attribute name="checked">true</xsl:attribute>
																</xsl:if>
															</input>
														</td>
														<td align="left">
															<label for="FtpCredentials_RadioButtonAnonymous">
																<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/USE-ANONYMOUS-ACCOUNT"/>
															</label>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<tr>
								<td style="padding-top: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='fullPublish']" mode="TITLE-LEFT">
											<xsl:with-param name="id">fullPublish</xsl:with-param>
											<xsl:with-param name="controlStyle">margin: 0px;</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
						</table>
					</fieldset>
					<br/>
				</div>
				<script type="text/javascript" language="javascript">
					sb_publish.setDefaultScenario('<xsl:value-of select="CONTROL[@NAME='defaultScenario']/@VALUE"/>');
				</script>
				<xsl:if test="CONTROL[@NAME='knownIsAnonymous']/@VALUE = 1">
					<script type="text/javascript">sb_publish.changeAuthType(2, 'anonym');</script>
				</xsl:if>
			</td>
		</tr>
	</xsl:template>

	<!-- Input fields for VPS, FTP, XCOPY settings  -->
	<xsl:template name="PUBLISH-SETTINGS-FORM">
		<xsl:variable name="style">overflow:auto; width:260px; height:18px;</xsl:variable>
		<tr>
			<td style="height: 100%; vertical-align: top; padding-top: 14px;" align="center" bgcolor="#f7f7f7">

				<script type="text/javascript" language="javascript">
					sb_publish = new SB_Publish();
					sb_publish.publishScenario = 1;
					sb_publish.validateSettings = true;
				</script>
				<input type="hidden" name="changeDefaultScenario" value="1" />
				<input type="hidden" name="defaultScenario" value="1" />

				<div id="panelPublishParameters">
					<xsl:attribute name="style">height: 375px; display: none; overflow:auto; z-index:300;</xsl:attribute>
					<fieldset class="SB_Form_FieldSet">
						<legend><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/HOSTING-LEGEND"/></legend>
						<table width="98%" cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td colspan="2" style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='publishModeId' and @TYPE='COMBO-BOX']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="onChange">sb_publish.showPublishFields();</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr id="rowHost">
								<xsl:if test="CONTROL[@NAME='hostId' and @HIDDEN]">
									<xsl:attribute name="style">display : none;</xsl:attribute>
								</xsl:if>
								<td colspan="2" style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='hostId' and @TYPE='COMBO-BOX']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr>
								<td colspan="2" style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='hostingUrl']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">on</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr id="rowVpsId">
								<xsl:if test="CONTROL[@NAME='vpsId' and @HIDDEN]">
									<xsl:attribute name="style">display : none;</xsl:attribute>
								</xsl:if>
								<td colspan="2" style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='vpsId']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">on</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr id="rowDirectory">
								<xsl:if test="CONTROL[@NAME='directory' and @HIDDEN]">
									<xsl:attribute name="style">display : none;</xsl:attribute>
								</xsl:if>
								<td colspan="2" style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='directory']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">on</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr id="rowUser">
								<xsl:if test="CONTROL[@NAME='user' and @HIDDEN]">
									<xsl:attribute name="style">display : none;</xsl:attribute>
								</xsl:if>
								<td colspan="2" style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='user']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">on</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<tr id="rowGroup">
								<xsl:if test="CONTROL[@NAME='group' and @HIDDEN]">
									<xsl:attribute name="style">display : none;</xsl:attribute>
								</xsl:if>
								<td colspan="2" style="padding-bottom: 4px;">
									<xsl:apply-templates select="CONTROL[@NAME='group']" mode="TITLE-LEFT">
										<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
										<xsl:with-param name="controlStyle"><xsl:value-of select="$style"/></xsl:with-param>
										<xsl:with-param name="require">on</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
							<!-- START password -->
							<tr id="tableAuth" style="padding-bottom: 4px;">
								<xsl:if test="CONTROL[@NAME='password' and @HIDDEN]">
									<xsl:attribute name="style">display : none;</xsl:attribute>
								</xsl:if>
								<td width="50%" valign="top"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/AUTH-TYPE"/>
									<div style="color:#474747;font-family:Arial;font-size:11px;"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/AUTH-TYPE-DESC"/></div>
								</td>
								<td width="50%">
									<table border="0" width="100%">
										<tr>
											<td style="padding-bottom: 4px;">
												<input type="radio" id="FtpCredentials_RadioButtonSpecified" name="hostingIsAnonymous" value="0" onclick="sb_publish.changeAuthType(1,'');" style="margin: 0px;">
													<xsl:if test="CONTROL[@NAME='hostingIsAnonymous']/@VALUE = 0 or not(CONTROL[@NAME='hostingIsAnonymous']/@VALUE)">
														<xsl:attribute name="checked">true</xsl:attribute>
													</xsl:if>
												</input>
											</td>
											<td>
												<label for="FtpCredentials_RadioButtonSpecified">
													<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/SPECIFY-ACCOUNT"/>
												</label>
											</td>
										</tr>
										<tr>
											<td></td>
											<td style="padding-bottom: 4px;">
												<xsl:apply-templates select="CONTROL[@NAME='login']" mode="TITLE-LEFT">
													<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
													<xsl:with-param name="controlStyle">overflow:auto; width:100%; height:18px;</xsl:with-param>
													<xsl:with-param name="require">on</xsl:with-param>
												</xsl:apply-templates>
											</td>
										</tr>
										<tr id="rowPassword">
											<td></td>
											<td style="padding-bottom: 4px;">
												<xsl:apply-templates select="CONTROL[@NAME='password']" mode="TITLE-LEFT">
													<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
													<xsl:with-param name="controlStyle">overflow:auto; width:100%; height:18px;</xsl:with-param>
													<xsl:with-param name="type">password</xsl:with-param>
													<xsl:with-param name="require">on</xsl:with-param>
												</xsl:apply-templates>
											</td>
										</tr>
										<tr id="rowConfirmPassword">
											<td></td>
											<td style="padding-bottom: 4px;">
												<xsl:apply-templates select="CONTROL[@NAME='confirmPassword']" mode="TITLE-LEFT">
													<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
													<xsl:with-param name="controlStyle">overflow:auto; width:100%; height:18px;</xsl:with-param>
													<xsl:with-param name="type">password</xsl:with-param>
													<xsl:with-param name="require">on</xsl:with-param>
												</xsl:apply-templates>
											</td>
										</tr>
										<tr>
											<td style="padding-bottom: 4px;">
												<input type="radio" id="FtpCredentials_RadioButtonAnonymous" name="hostingIsAnonymous" value="1" onclick="sb_publish.changeAuthType(1,'anonym');" style="margin: 0px;">
													<xsl:if test="CONTROL[@NAME='hostingIsAnonymous']/@VALUE = 1">
														<xsl:attribute name="checked">true</xsl:attribute>
													</xsl:if>
												</input>
											</td>
											<td>
												<label for="FtpCredentials_RadioButtonAnonymous" >
													<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/USE-ANONYMOUS-ACCOUNT"/>
												</label>
											</td>
										</tr>
									</table>
								</td>
							</tr>
							<!-- END password -->
						</table>
					</fieldset>
				</div>
				<br/>
				<xsl:if test="CONTROL[@NAME='hostingIsAnonymous']/@VALUE = 1">
					<script type="text/javascript">
						sb_publish.changeAuthType(1, 'anonym');
					</script>
				</xsl:if>
				<script type="text/javascript">
					sb_publish.setDefaultPublicationMode('<xsl:value-of select="CONTROL[@NAME='publishModeId']/CONTROL[@SELECTED='1']/@VALUE"/>');
					showElement(document.getElementById("panelPublishParameters"), true);
				</script>
			</td>
		</tr>
	</xsl:template>



	<xsl:template match="SEND-EMAIL" mode="content">
		<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td align="center" valign="middle" style="padding: 0pt 14px; height: 10%;" bgcolor="#F7F7F7">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td align="center" bgcolor="#F7F7F7" style="height: 80%; vertical-align: top; padding-top:14px">
								<script type="text/javascript" language="javascript">
									sb_publish = new SB_Publish();
								</script>
								<div>
									<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
										<tr>
											<td align="center">
												<table cellspacing="0" cellpadding="0" border="0" style="padding-top: 20px; padding-bottom: 20px;">
													<tr>
														<td align="center">
															<span style="color:Black;font-family:Arial;font-size:11px;">
																<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/PUBLISH-SCREEN-HELP-MESSAGE" disable-output-escaping="yes"/>
															</span>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
								<div>
									<table cellspacing="0" cellpadding="0" border="0" style="width: 100%">
										<tr>
											<td align="center">
												<table cellspacing="0" cellpadding="0" border="0" style="padding-top: 20px; padding-bottom: 20px;">
													<tr>
														<td>
															<span id="ctl00_ContentStep_LabelPublishMessageToAppear" style="color:Black;font-family:Arial;font-size:11px;">
																<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/PUBLISH-SCREEN-MESSAGE" disable-output-escaping="yes"/>
															</span>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
								<div>
									<table cellspacing="0" cellpadding="0" border="0" align="center" width="80%">
										<tr>
											<td nowrap="nowrap">
												<xsl:apply-templates select="CONTROL[@NAME='email']" mode="TITLE-LEFT">
													<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
													<xsl:with-param name="require">on</xsl:with-param>
												</xsl:apply-templates>
											</td>
										</tr>
										<tr>
											<td style="padding-top: 20px; padding-bottom: 24px" colspan="3">
												<table cellpadding="0" cellspacing="0" width="100%" border="0">
													<tr>
														<td style="width: 50%; padding-right: 5px;" align="right">
															<xsl:call-template name="SEND-BUTTON">
																<xsl:with-param name="action">javascript: sb_publish.validateEmail(); return false;</xsl:with-param>
															</xsl:call-template>
														</td>
														<td style="width: 50%; padding-left: 5px;" align="left">
															<xsl:call-template name="CANCEL-BUTTON">
																<xsl:with-param name="action">sb_publish.hideSettings(); return false;</xsl:with-param>
															</xsl:call-template>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template name="SEND-BUTTON">
	<xsl:param name="action"/>
	<table cellspacing="0" cellpadding="0" border="0" style="cursor: pointer; width: 90px;" onclick="{$action}">
		<tr>
			<td style="width: 1px;"><img src="{$skinPath}/images/button_ok_left.gif"/></td>
			<td style="background-image: url({$skinPath}/images/button_ok_middle.gif); background-repeat:repeat-x; width: 1px; padding-left: 5px;"><img src="{$skinPath}/icons/send.gif"/></td>
			<td style="background-image: url({$skinPath}/images/button_ok_middle.gif);" align="center" class="SB_Button_Ok"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/SEND"/></td>
			<td style="width: 1px;"><img src="{$skinPath}/images/button_ok_right.gif"/></td>
		</tr>
	</table>
	</xsl:template>

	<xsl:template match="DISABLE-PUBLISH" mode="content">
		<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td align="center" valign="middle">
					<script type="text/javascript" language="javascript">
						sb_publish = new SB_Publish();
					</script>
					<table width="80%" border="0" cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td>
									<img src="{$skinPath}/images/error.gif" style="border-width: 0px;" align="absmiddle" />
								</td>
								<td width="10">
								</td>
								<td>
									<xsl:value-of select="/SITEBUILDER-PAGE/VIEW-CONTENT/DISABLE-PUBLISH"/>
								</td>
							</tr>
						</tbody>
					</table>					
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template name="PUBLISH-STATUS">
		<xsl:choose>
			<xsl:when test="/SITEBUILDER-PAGE/ACTION-STATUS[@STATUS &lt;= 1]">
				<tr>
					<td style="padding: 0pt 13px;" align="left" height="68">
						<table border="0" cellpadding="0" cellspacing="0">
							<tbody>
							<tr>
								<td>
									<img src="{$skinPath}/images/info.gif" style="border-width: 0px;" align="absmiddle" />
								</td>
								<td width="10">
								</td>
								<td>
									<span style="color: Black; font-family: Arial; font-size: 11px;">
										<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/PUBLISH-SETTINGS-MESSAGE" disable-output-escaping="yes"/>
									</span>
								</td>
							</tr>
							</tbody>
						</table>					
					</td>
				</tr>
			</xsl:when>
			<xsl:otherwise>
				<tr>
					<td style="padding: 0pt 13px;" align="left" height="68">
						<xsl:apply-templates select="/SITEBUILDER-PAGE/ACTION-STATUS" mode="modalForm">
							<xsl:with-param name="showClickHere">1</xsl:with-param>
						</xsl:apply-templates>
					</td>
				</tr>
			</xsl:otherwise>
		</xsl:choose>

	</xsl:template>

	<!-- Publish status message -->
	<xsl:template match="ACTION-STATUS[@STATUS!=0]" mode="modalForm">
		<xsl:param name="showClickHere" select="1"/>
		<table border="0" style="padding-top: 5px; padding-bottom: 5px; width: 100%; padding-left: 10px; background-color: white; font-family: Arial; font-size: 11px;">
			<xsl:if test="/SITEBUILDER-PAGE/ACTION-STATUS/DETAILS/MESSAGE-DETAILED">
				<xsl:attribute name="onclick">sb_status.showDetails();</xsl:attribute>
				<xsl:attribute name="style">cursor: pointer;</xsl:attribute>
			</xsl:if>
			<tr>
				<td valign="top" style="padding-right: 10px;">
					<xsl:apply-templates select="current()" mode="modalFormIcon"/>
				</td>
				<td width="100%">
					<xsl:value-of select="MESSAGE" mode="modalForm"/>
					<xsl:if test="/SITEBUILDER-PAGE/ACTION-STATUS/DETAILS/MESSAGE-DETAILED and $showClickHere='1'">
						<xsl:text> </xsl:text>
						<xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/DETAILED-CLICK-HERE"/>
					</xsl:if>
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template match="ACTION-STATUS[@STATUS=0][MESSAGE]" mode="modalForm">
	</xsl:template>

	<xsl:template match="ACTION-STATUS" mode="modalFormIcon">
		<img id="StatusIcon" style="border-width:0px;">
			<xsl:attribute name="src">
				<xsl:value-of select="$skinPath"/>
				<xsl:choose>
					<xsl:when test="@STATUS='3' and MESSAGE">/images/warning.gif</xsl:when>
					<xsl:when test="@STATUS='2' and MESSAGE">/images/error.gif</xsl:when>
					<xsl:when test="@STATUS='1' and MESSAGE">/images/info.gif</xsl:when>
					<xsl:otherwise>/images/info.gif</xsl:otherwise>
				</xsl:choose>
			</xsl:attribute>
		</img>
	</xsl:template>

</xsl:stylesheet>
