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

<xsl:template match="VIEW-CONTENT">
	<style>
		.sb-pagetitle { border-bottom: solid 1px #776655; }
	</style>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td>&#160;</td>
		</tr>
		<tr>
			<td>
				<xsl:apply-templates select="/SITEBUILDER-PAGE/STATUS" mode="admin"/>
				<xsl:apply-templates/>
			</td>
		</tr>
	</table>
</xsl:template>

<xsl:template match="SITE-CREATE-CONTENT">
	<script type="text/javascript" src="/js/Admin/Sites.js?{$version}.{$build}"/>

	<table width="100%" cellpadding="0" border="0">
		<tr>
			<td>
				<form name="editSite" method="post" id="editSite" action="{$baseUrl}/Admin/Site/Create" onsubmit="submitForm(); return false;">
					<xsl:apply-templates/>
					<input type="hidden" name="tab">
						<xsl:attribute name="value"><xsl:value-of select="TAB-PANEL/TAB-PANEL-CARD[@ACTIVE='1']/@ID"/></xsl:attribute>
					</input>
					<input type="hidden" name="isSavingRequired" value="no"/>
					<script type="text/javascript" language="javascript">
						<xsl:apply-templates select="TAB-PANEL/TAB-PANEL-CARD" mode="initSites"/>
					</script>
					<!-- input image needed for work default submit via Enter -->
					<input type="image" style="border-width: 0px; height: 0px; width: 0px;"/>
				</form>
			</td>
		</tr>
	</table>
	<table border="0" cellpadding="0" cellspacing="0" width="100%">
		<tr>
			<td align="left" style="padding-left: 25px"><xsl:call-template name="REQUIRED-FIELDS"/></td>
			<td>
				<xsl:call-template name="OK-CANCEL-BUTTONS">
					<xsl:with-param name="okAction">submitForm();</xsl:with-param>
					<xsl:with-param name="cancelAction">document.location.href="<xsl:value-of select="$baseUrl"/>/Admin/Site/List";</xsl:with-param>
				</xsl:call-template>
			</td>
		</tr>
	</table>
	
</xsl:template>

	<xsl:template match="TAB-PANEL/TAB-PANEL-CARD" mode="initSites">
		sb_panel.registerPageOnloadAction('<xsl:value-of select="@ID"/>', "document.forms.editSite.tab.value = '<xsl:value-of select="@ID"/>';");
	</xsl:template>

</xsl:stylesheet>