{include file="$admingentemplates/admin_top.tpl"}
<div class="back">
    <a href="{$site_url}{$site_root}/admin/admin_modules.php">{$lang.button.back}</a>
</div>
<div class="cr"></div>
<div class="show_help" style="display: none;">&nbsp;</div>
<div class="red_header">{$header.facetalk}</div>
<div class="cr">&nbsp;</div>
<div class="help_text" style="display:block;">
    <div class="close_help">
        <img src="{$site_root}{$template_root}/images/close_help.png" alt="">
    </div>
    <div class="help_body">
        <span class="help_title">{$lang.help}:</span>{$lang.facetalk.settings_help}
    </div>
</div>
<div class="cr">&nbsp;</div>
<ul class="tabs">
    <li>
        <a class="current">{$lang.admin_menu.facetalk_settings}</a>
    </li>
</ul>
    <div class="panel_section" style="width: 100%;">
		<div class="panel_content" style="width: 97%;margin-top: 15px;">			
			{if $form.error}<font class="error_msg">* {$form.error}</font>{/if}
			<form action="admin_facetalk.php" method="post" enctype="multipart/form-data" name="settings">
			{$form.hiddens}
			<table cellpadding="0" cellspacing="0" class="admin_edit_form">
			<tr>
				<td class="text_head" width="18%">{$lang.facetalk.affcode}:</td>
				<td><input type="text" name="affcode" value="{$affCode}" /></td>
			</tr>
			<tr>
				<td class="text_head" width="18%">{$lang.facetalk.ftlangcode}:</td>
				<td><input type="text" name="ftlangcode" value="{$ftLangCode}" /></td>
			</tr>
			{*	<tr>
					<td colspan="3">			
						<a class="admin_button_major" onclick="javascript:checkForm(document.settings);">{$lang.button.save}<span>&nbsp;</span></a>
					</td>
				</tr>*}
			</table>
			</form>
		</div>
	</div><a class="admin_button_major" onclick="javascript:checkForm(document.settings);">{$lang.button.save}<span>&nbsp;</span></a>
<script type="text/javascript">
{literal}
function checkForm(form)
{
	form.affcode.value = trimAll(form.affcode.value);
	if (form.affcode.value == '')
	{
		alert('{/literal}{$lang.facetalk.err_empty_affcode}{literal}');
		return false;
	}
	form.ftlangcode.value = trimAll(form.ftlangcode.value);
	form.submit();
}
function trimAll(sString)
{
	while (sString.substring(0,1) == ' ')
	{
		sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' ')
	{
	sString = sString.substring(0,sString.length-1);
	}
	return sString;
}
{/literal}
</script>
{include file="$admingentemplates/admin_bottom.tpl"}
