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

	<xsl:template match="INTERFACE-CONTENT">
		<script type="text/javascript" src="/js/Admin/InterfaceSettings.js?{$version}.{$build}"/>
	
    	<table width="100%" cellpadding="0" cellspacing="0"  border="0">
        	<tr>
            	<td>
					<xsl:apply-templates/>
            	</td>
        	</tr>
         </table>
         
         <xsl:call-template name="OK-CANCEL-BUTTONS">
			<xsl:with-param name="okAction">javascript:return validateEditForm();</xsl:with-param>
			<xsl:with-param name="cancelAction">document.location.href="<xsl:value-of select="$baseUrl"/>/Admin/Server";</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<xsl:template match="GENERAL-CARD-CONTENT">		
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td>
					<xsl:call-template name="LOGO-PREVIEW"/>
				</td>
			</tr>
		
			<tr><td><img src="{$skinPath}/images/white_pixel.gif" width="1" height="4"/></td></tr>
			
			<tr>
				<td>
					<xsl:call-template name="UPLOAD-LOGO"/>
				</td>
			</tr>
			
			<tr><td><img src="{$skinPath}/images/white_pixel.gif" width="1" height="4"/></td></tr>
		</table>
				
		<form name="editInterfaceSettings" method="post" id="editInterfaceSettings" onsubmit="javascript:return validateEditForm();">
			<xsl:attribute name="action"><xsl:value-of select="@UPDATE-ACTION"/></xsl:attribute>
			
			<table width="100%" cellpadding="0" cellspacing="0" border="0">	
				<tr>
					<td>
						<xsl:apply-templates select="CONTROL[@NAME='link']" mode="TITLE-LEFT">
							<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
							<xsl:with-param name="maxLength">255</xsl:with-param>
							<xsl:with-param name="controlStyle">width: 300px;</xsl:with-param>
							<xsl:with-param name="onChange">top.sbApplyChangesObject.registerChange();</xsl:with-param>
						</xsl:apply-templates>
					</td>
				</tr>
				
				<tr><td><img src="{$skinPath}/images/white_pixel.gif" width="1" height="4"/></td></tr>
				
				<tr>
					<td>
						<xsl:apply-templates select="CONTROL[@NAME='title']" mode="TITLE-LEFT">
							<xsl:with-param name="controlClass">SB_Control_Input_Input</xsl:with-param>
							<xsl:with-param name="maxLength">255</xsl:with-param>
							<xsl:with-param name="controlStyle">width: 300px;</xsl:with-param>
							<xsl:with-param name="onChange">top.sbApplyChangesObject.registerChange();</xsl:with-param>
						</xsl:apply-templates>
					</td>
				</tr>
				
			
				
				<tr><td><img src="{$skinPath}/images/white_pixel.gif" width="1" height="4"/></td></tr>
			</table>
		</form>
			
		<form name="restoreSettings" method="post" id="restoreSettings">
			<xsl:attribute name="action"><xsl:value-of select="@RESTORE-ACTION"/></xsl:attribute>
			
			<table width="100%" cellpadding="0" cellspacing="0" border="0">	
				<tr>
					<td>
						<xsl:apply-templates select="CONTROL[@NAME='restoreButton']">
							<xsl:with-param name="style">width: 140px;color: Black; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; font-weight: normal;</xsl:with-param>
							<xsl:with-param name="action">javascript: if (confirm(SbGetLocaleByKey('SURE-TO-RESTORE'))) { return document.forms['restoreSettings'].submit(); } return false;</xsl:with-param>
						</xsl:apply-templates>
					</td>
				</tr>
			</table>
		</form>
		
	</xsl:template>
	
	<xsl:template name="LOGO-PREVIEW">
		<xsl:if test="LOGO-PREVIEW/@NEED-APPLY-CHANGES = '1'">
			<script type="text/javascript" language="javascript">
				top.sbApplyChangesObject.registerChange();
			</script>
		</xsl:if>
	
		<table width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td width="50%">
					<xsl:value-of select="LOGO-PREVIEW/@VALUE"/>
				</td>
				<td width="50%">
					<table cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td valign="middle" align="center" style="width: 150px; height: 40px;" class="logotype_layer">
								<img style="border-width: 0px;">
									<xsl:attribute name="src">
										<xsl:choose>
											<xsl:when test="LOGO-PREVIEW/@IMAGE">
											<!-- hard code must be removed! -->
												<xsl:value-of select="LOGO-PREVIEW/@IMAGE"/>
											</xsl:when>
											<xsl:otherwise>
												<xsl:value-of select="$skinPath"/>/images/<xsl:value-of select="LOGO-PREVIEW/@DEFAULT-IMAGE"/>
											</xsl:otherwise>
										</xsl:choose>
									</xsl:attribute>
								</img>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>	
	</xsl:template>
	
	<xsl:template name="UPLOAD-LOGO">
		<form name="uploadLogo" method="post" enctype="multipart/form-data" id="uploadLogo" onsubmit="javascript:return validateUploadForm();">
			<xsl:attribute name="action"><xsl:value-of select="UPLOAD-LOGO/@ACTION"/></xsl:attribute>
	
			<input type="hidden" name="MAX_FILE_SIZE">
				<xsl:attribute name="value"><xsl:value-of select="UPLOAD-LOGO/@MAX-FILE-SIZE"/></xsl:attribute>
			</input>
			
			<input type="hidden" name="savedLink" id="savedLink"/>
			<input type="hidden" name="savedTitle" id="savedTitle"/>
			
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td width="50%">
						<xsl:value-of select="UPLOAD-LOGO/@VALUE"/>
					</td>
					<td width="50%">
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td>
									<input type="file" style="border: 1px solid rgb(153, 158, 161); color: Black; font-family: Arial; font-size: 11px;" id="idUploadLogo">
										<xsl:attribute name="name">
											<xsl:value-of select="UPLOAD-LOGO/@NAME"/>
										</xsl:attribute>
									</input>
								</td>
								
								<td><img src="/images/blank.gif" width="16" height="1"/></td>
								
								<td>
									<xsl:apply-templates select="UPLOAD-LOGO/CONTROL[@NAME='uploadButton']">
										<xsl:with-param name="action">javascript:submitForUpload();</xsl:with-param>
										<xsl:with-param name="style">width: 100px;color: Black; font-family: Tahoma,Arial,Helvetica,sans-serif; font-size: 11px; font-weight: normal;</xsl:with-param>
									</xsl:apply-templates>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</xsl:template>
	
</xsl:stylesheet>

                              
