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

	<xsl:template match="SITEBUILDER-PAGE">
		<table cellpadding="0" cellspacing="0" border="0" style="width: 100%; height: 100%">
			<tr>
				<td class="sb-adminpanel-header">
					<table class="sb-adminpanel-header-inner" border="0" width="100%">
						<tr>
							<td valign="middle">
								<xsl:call-template name="HEADER-LOGO"/>
							</td>
							<td align="right" class="sb-header-copyright" style="padding-right: 15px;"><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/COPYRIGHT"/><br/><xsl:value-of select="/SITEBUILDER-PAGE/LOCALE/ALL-RIGHTS-RESERVED"/></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td valign="top"><xsl:apply-templates select="VIEW-CONTENT/FORM-CONTENT"/></td>
			</tr>
		</table>
	</xsl:template>

	
	<xsl:template match="FORM-CONTENT">
		<script type="text/javascript" src="/js/Admin/ChangeSiteOwner.js?{$version}.{$build}"/>
	
		<table width="100%" height="100%">
			<tr>
				<td class="sb-page" align="center" valign="top">
					<table width="95%">
						<tr>
							<td>
								<img border="0" src="{$skinPath}/images/arrow_right_black.gif"/>
								<span class="sb-registration-title"><xsl:value-of select="@TITLE"/></span>
							</td>
						</tr>
						
						<tr class="sb-formview-topseparator">
							<td>&#160;</td>
						</tr>
						
						<tr>
							<td>
								<xsl:apply-templates select="/SITEBUILDER-PAGE/STATUS" mode="admin"/>
							</td>
						</tr>
					</table>
					
					<xsl:apply-templates/>
				</td>
			</tr>
		</table>
	</xsl:template>

	<xsl:template match="NAMED-BOX">
		<table cellspacing="0" cellpadding="0" width="480">
			
			<tr>
				<td class="sb-table-border-top-left">&#160;</td>
				<td class="sb-table-border-middle-top" style="padding-left: 10px; vertical-align: bottom; white-space: nowrap" align="left">
					<span class="sb-input-reg-option">
						<b>
							<label class="sb-text">
								<xsl:attribute name="for"><xsl:value-of select="@NAME"/></xsl:attribute>
								<xsl:value-of select="@TITLE"/>
							</label>
						</b>
					</span> 
				</td>
				<td class="sb-table-border-top-right">&#160;</td>
			</tr>
			
			<tr>
				<td class="sb-table-border-middle-left-right">&#160;</td>
				<td style="padding: 10px;">
					<table  cellspacing="0" cellpadding="0" width="100%" border="0">
						<tr>
							<td><xsl:apply-templates/></td>
						</tr>
					</table>
				</td>
				<td class="sb-table-border-middle-left-right">&#160;</td>
			</tr>
			
			<tr>
				<td class="sb-table-border-bottom-left">&#160;</td>
				<td class="sb-table-border-middle-bottom">&#160;</td>
				<td class="sb-table-border-bottom-right">&#160;</td>
			</tr>
			
		</table>
	</xsl:template>
	
	<xsl:template match="ADD-SITE-BOX-CONTENT">	
		<form name="addSiteForm" method="post" onsubmit="javascript:return onAddSiteClick();">
			<xsl:attribute name="action"><xsl:value-of select="@ACTION"/></xsl:attribute>
			
			<table width="100%" cellpadding="2" border="0">
				<tr>
					<td><img width="32" height="32" src="{$skinPath}/images/TakeTrialSite.gif"/></td>
					<td><xsl:value-of select="@DESCRIPTION"/></td>
				</tr>
			</table>
			
			<table cellpadding="0" cellspacing="0" border="0" class="control-title-input">
				<tr>
					<td class="title-block">
						<xsl:apply-templates select="CONTROL[@NAME='siteName']" mode="label">
							<xsl:with-param name="require">true</xsl:with-param>
						</xsl:apply-templates>
					</td>
					<td class="input-block">
						<xsl:apply-templates select="CONTROL[@NAME='siteName']" mode="control">
							<xsl:with-param name="require">true</xsl:with-param>
						</xsl:apply-templates>
					</td>
				</tr>
			</table>
			<table width="100%" cellpadding="2" border="0">
				<tr>
					<td><span class="sb-requiredlabel">*</span> <xsl:value-of select="CONTROL[@NAME='requiredFields']"/></td>
					<td align="right">
						<xsl:apply-templates select="CONTROL[@TYPE='BUTTON']">
							<xsl:with-param name="style">width:90px;</xsl:with-param>
							<xsl:with-param name="action">javascript:onAddSiteClick();</xsl:with-param>
						</xsl:apply-templates>
					</td>
				</tr>
			</table>
			
			<!-- input image needed for work default submit via Enter -->
			<input type="image" style="border-width: 0px; height: 0px; width: 0px;"/>
		</form>
	</xsl:template>
	
	<xsl:template match="DONT-ADD-SITE-BOX-CONTENT">
		<form name="continueForm" method="post" onsubmit="javascript:return onContinueClick();">
			<xsl:attribute name="action"><xsl:value-of select="@ACTION"/></xsl:attribute>
			
			<table width="100%" cellpadding="2" border="0">
				<tr>
					<td><img width="16" height="16" src="{$skinPath}/icons/warning.png"/></td>
					<td><xsl:value-of select="@DESCRIPTION"/></td>
				</tr>
			</table>
			<table cellpadding="0" cellspacing="0" border="0" class="control-input-title">
				<tr>
					<td class="input-block">
						<xsl:apply-templates select="CONTROL[@TYPE='CHECKBOX']" mode="control"/>
					</td>
					<td class="title-block">
						<xsl:apply-templates select="CONTROL[@TYPE='CHECKBOX']" mode="label"/>
					</td>
				</tr>
			</table>
			<table width="100%" cellpadding="2" border="0">
				<tr>
					<td colspan="2" align="right">
						<xsl:apply-templates select="CONTROL[@TYPE='BUTTON']">
							<xsl:with-param name="style">width:90px;</xsl:with-param>
							<xsl:with-param name="action">javascript:onContinueClick();</xsl:with-param>
						</xsl:apply-templates>
					</td>
				</tr>
			</table>
		</form>
	</xsl:template>	
	
</xsl:stylesheet>
