<?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" style="padding-left:20;">
								<xsl:call-template name="HEADER-LOGO"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td valign="top"><xsl:apply-templates select="VIEW-CONTENT/REGISTRATION-CONTENT"/></td>
			</tr>
		</table>
		
	</xsl:template>

	
	<xsl:template match="REGISTRATION-CONTENT">
		
		<script type="text/javascript" src="/js/Admin/Registration.js?{$version}.{$build}"/>
	
		<script type="text/javascript">
			<xsl:comment>
				function submitForm() {
					return validateForm(
						'<xsl:value-of select="$baseUrl"/>/Admin/License/Activate', 
						'<xsl:value-of select="$baseUrl"/>/Admin/License/Register', 
						'<xsl:value-of select="$baseUrl"/>/Admin/Desktop'
					);
				}
			</xsl:comment>
		</script>
	
		<table width="100%" height="100%">
			<tr>
				<td class="sb-page" align="middle">
					<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>
					
					<form name="registration" id="registration" method="post" onsubmit="javascript:return submitForm();">
						<xsl:attribute name="action"><xsl:value-of select="@ACTION"/></xsl:attribute>
					
            			<xsl:apply-templates/>
            			
            			<!-- input image needed for work default submit via Enter -->
						<input type="image" style="border-width: 0px; height: 0px; width: 0px;"/>
            		</form>

            		<table cellspacing="0" cellpadding="0" width="85%" border="0">
            			<tr>
							<td align="left" style="padding-left: 30px"><xsl:call-template name="REQUIRED-FIELDS"/></td>
            				<td>
			            		<xsl:call-template name="OK-CANCEL-BUTTONS">
									<xsl:with-param name="okAction">javascript:return submitForm();</xsl:with-param>
									<xsl:with-param name="cancelAction">document.location.href="<xsl:value-of select="$baseUrl"/>/Admin/Desktop";</xsl:with-param>
								</xsl:call-template>
							</td>
						</tr>
					</table>
            		
				</td>
			</tr>
		</table>
		
	</xsl:template>
	
	
	<xsl:template match="RADIO-GROUP-BOX">
		<table cellspacing="0" cellpadding="0" width="85%">
			
			<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-page" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px;">
						<input type="radio">
							<xsl:attribute name="id"><xsl:value-of select="@NAME"/></xsl:attribute>
							<xsl:attribute name="value"><xsl:value-of select="@NAME"/></xsl:attribute>
							<xsl:attribute name="name"><xsl:value-of select="../@NAME"/></xsl:attribute>
							<xsl:if test="@CHECKED = 1">
								<xsl:attribute name="checked">true</xsl:attribute>
							</xsl:if>
						</input>
                        <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="ACTIVATION-BOX-CONTENT">
	
		<table width="100%" cellspacing="0" border="0">
			<tbody>
				<tr>
					<td colspan="3"><xsl:value-of select="@HINT"/></td>
				</tr>
				
				<tr>
					<td style="width: 20%;">
						<xsl:value-of select="@INPUT-LABEL"/>
						<span class="sb-requiredlabel">*</span>
					</td>
					
					<td style="width: 30%; white-space: nowrap;">						
						<xsl:apply-templates select="CONTROL[@NAME='activationCode']" mode="TITLE-LEFT">
							<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
							<xsl:with-param name="onChange">javascript:document.getElementById('radioBoxActivation').checked=true;</xsl:with-param>
							<xsl:with-param name="maxLength">255</xsl:with-param>
						</xsl:apply-templates>
					</td>
					
					<td style="width: 50%;"><xsl:value-of select="@EXAMPLE"/></td>
				</tr>
			</tbody>
		</table>
	
	</xsl:template>
	
	
	<xsl:template match="REGISTER-BOX-CONTENT">
	
		<table width="100%" cellspacing="0" border="0">
			<tbody>
				<tr>
					<td colspan="2" style="width: 50%;"><xsl:value-of select="@HINT"/></td>
					
					<td valign="top" align="left" rowspan="2" style="width: 50%;">
						<table width="100%" cellspacing="0" cellpadding="0">
							<tbody>
								<tr>
									<td class="sb-table-border-top-left">&#160;</td>
									<td align="left" class="sb-table-border-middle-top">&#160;</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 width="100%" cellspacing="0">
											<tbody>
												<tr>
													<td>
														<span class="sb-text"><xsl:value-of select="@HINT2"/></span>
													</td>
												</tr>
												
												<tr>
													<td>
														<table cellspacing="0" border="0" style="border-collapse: collapse;">
															<tbody>
																<tr>
																	<td>
																		<img src="{$skinPath}/icons/checked.png" style="border-width: 0px;"/>
																		<span class="sb-text"><xsl:value-of select="@FEATURE"/></span>
																	</td>
																</tr>
																
																<tr>
																	<td>
																		<img src="{$skinPath}/icons/checked.png" style="border-width: 0px;"/>
																		<span class="sb-text"><xsl:value-of select="@FEATURE2"/></span>
																	</td>
																</tr>
																
																<tr>
																	<td>
																		<img src="{$skinPath}/icons/checked.png" style="border-width: 0px;"/>
																		<span class="sb-text"><xsl:value-of select="@FEATURE3"/></span>
																	</td>
																</tr>
																
																<tr>
																	<td>
																		<img src="{$skinPath}/icons/checked.png" style="border-width: 0px;"/>
																		<span class="sb-text"><xsl:value-of select="@FEATURE4"/></span>
																	</td>
																</tr>
															</tbody>
														</table>
														
													</td>
												</tr>
											</tbody>
										</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>
								
							</tbody>
						</table>
	
					</td>
				</tr>
	
				<tr>
	
					<td valign="top" style="width: 50%;">
					
						<table width="100%">
							<tbody>
								<tr>
									<td style="width: 40%;">
										First Name:
										<span class="sb-requiredlabel">*</span>
									</td>
									
									<td style="width: 60%; white-space: nowrap;">
										<xsl:apply-templates select="CONTROL[@NAME='inputFirstName']" mode="TITLE-LEFT">
											<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
											<xsl:with-param name="onChange">javascript:document.getElementById('radioBoxRegister').checked=true;</xsl:with-param>
											<xsl:with-param name="maxLength">255</xsl:with-param>
										</xsl:apply-templates>
										
									</td>
								</tr>
								
								<tr>
									<td style="width: 40%;">
										Last Name:
										<span class="sb-requiredlabel">*</span>
									</td>
									
									<td style="width: 60%; white-space: nowrap;">
										<xsl:apply-templates select="CONTROL[@NAME='inputLastName']" mode="TITLE-LEFT">
											<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
											<xsl:with-param name="onChange">javascript:document.getElementById('radioBoxRegister').checked=true;</xsl:with-param>
											<xsl:with-param name="maxLength">255</xsl:with-param>
										</xsl:apply-templates>
									</td>
								</tr>
								
								<tr>
									<td style="width: 40%;">Company:</td>
									
									<td style="width: 60%; white-space: nowrap;">
										<xsl:apply-templates select="CONTROL[@NAME='inputCompany']" mode="TITLE-LEFT">
											<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
											<xsl:with-param name="onChange">javascript:document.getElementById('radioBoxRegister').checked=true;</xsl:with-param>
											<xsl:with-param name="maxLength">255</xsl:with-param>
										</xsl:apply-templates>
									</td>
								</tr>
	
								<tr>
									<td style="width: 40%;">
										Email:
										<span class="sb-requiredlabel">*</span>
									</td>
									
									<td style="width: 60%; white-space: nowrap;">
										<xsl:apply-templates select="CONTROL[@NAME='inputEmail']" mode="TITLE-LEFT">
											<xsl:with-param name="controlClass">sb-control-input-input</xsl:with-param>
											<xsl:with-param name="onChange">javascript:document.getElementById('radioBoxRegister').checked=true;</xsl:with-param>
											<xsl:with-param name="maxLength">255</xsl:with-param>
										</xsl:apply-templates>
									</td>
								</tr>
								
							</tbody>
						</table>
						
					</td>
				</tr>
				
				<tr class="sb-formview-topseparator">
					<td colspan="3">&#160;</td>
				</tr>
				
				
				<tr>
					<td colspan="3"><xsl:value-of select="@HINT3"/></td>
				</tr>

				<tr>
					<td colspan="3">
						<span id="ctl00_Content_CheckBoxListNews">
														
							<xsl:apply-templates select="CHECK-BOX[@NAME='checkPlesk']"/>
							<xsl:apply-templates select="CHECK-BOX[@NAME='checkVirtuozzo']"/>
							<xsl:apply-templates select="CHECK-BOX[@NAME='checkSiteBuilder']"/>
							<xsl:apply-templates select="CHECK-BOX[@NAME='checkHSPComplete']"/>
							<xsl:apply-templates select="CHECK-BOX[@NAME='checkPEM']"/>
							
							<br/>
							
							<xsl:apply-templates select="CHECK-BOX[@NAME='checkReciveNews']"/>

						</span>

					</td>

				</tr>
			</tbody>
		</table>
	
	</xsl:template>
	
	
	<xsl:template match="DECLINE-BOX-CONTENT">
	
		<table width="100%" cellspacing="0" border="0">
			<tbody>
				<tr>
					<td colspan="2" style="width: 50%;"><xsl:value-of select="@HINT"/></td>
					
					<td valign="top" align="left" rowspan="2" style="width: 50%;">
						<table width="100%" cellspacing="0" cellpadding="0">
							<tbody>
								<tr>
									<td class="sb-table-border-top-left">&#160;</td>
									<td align="left" class="sb-table-border-middle-top">&#160;</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 width="100%" cellspacing="0">
											<tbody>
												<tr>
													<td><xsl:value-of select="@HINT3"/></td>
												</tr>

												<tr>
													<td>
														<table cellspacing="0" border="0" style="border-collapse: collapse;">
															<tbody>
																<tr>
																	<td>
																		<img src="{$skinPath}/icons/unchecked.png" style="border-width: 0px;"/>
																		<xsl:value-of select="@FEATURE"/>
																	</td>
																</tr>
																
																<tr>
																	<td>
																		<img src="{$skinPath}/icons/unchecked.png" style="border-width: 0px;"/>
																		<xsl:value-of select="@FEATURE2"/>
																	</td>
																</tr>
																
																<tr>
																	<td>
																		<img src="{$skinPath}/icons/unchecked.png" style="border-width: 0px;"/>
																		<xsl:value-of select="@FEATURE3"/>
																	</td>
																</tr>

																<tr>
																	<td>
																		<img src="{$skinPath}/icons/unchecked.png" style="border-width: 0px;"/>
																		<xsl:value-of select="@FEATURE4"/>
																	</td>
																</tr>
																																
															</tbody>
														</table>
														
													</td>
												</tr>
											</tbody>
										</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>
								
							</tbody>
						</table>
					
					</td>
					
				</tr>
				
				<tr>
					<td valign="top" style="width: 50%;">
						<table width="100%">
							<tbody>
								<tr>
									<td><xsl:value-of select="@HINT2"/></td>
								</tr>
							</tbody>
						</table>
					</td>
				</tr>
				
			</tbody>
		</table>
	
	</xsl:template>	
	
	
	<xsl:template match="CHECK-BOX">
		<input type="checkbox">
			<xsl:attribute name="name"><xsl:value-of select="@NAME"/></xsl:attribute>
			<xsl:attribute name="id"><xsl:value-of select="@NAME"/></xsl:attribute>
			<xsl:attribute name="onChange">javascript:document.getElementById('radioBoxRegister').checked=true;</xsl:attribute>
		</input>
		<label>
			<xsl:attribute name="for"><xsl:value-of select="@NAME"/></xsl:attribute>
			
			<xsl:value-of select="@TITLE"/>
		</label>
	</xsl:template>
			
	
</xsl:stylesheet>
