{if $ajax eq 0}
{include file="$admin_nl_gentemplates/admin_nl_site_head.tpl"}{/if}
<script language="JavaScript" type="text/javascript" src="{$site_root}{$template_root}/js/area-editor.js"></script>
<script type="text/javascript">
{literal}
$(document).ready(function() {
	var flag = '{/literal}{$flag}{literal}';
	if (flag!='') {ShowEditor('3','forms/create1.php?ajax=1');}
});
var tab_last = '1';
var tab_link = 'settings.php?ajax=1';
var options = { 
	success: function(data){
		ajaxIndicator(0, 'error_box');
		data = data.replace(/\<\/?(head|body)\>/g,'');
		if (data == 'saved'){
			ShowBlock('show_block', tab_link);
		} else {
			$('.error').html(data).fadeIn(100);
			if ( $.browser.msie) {
    			DD_roundies.addRule('div.error', '10px');
			} else {
    			$('div.error').corner();
			}
			$("body").animate({"scrollTop":0},"slow");
			$('.error').oneTime(15000, function() {
				$('.error').fadeOut(500);
			});
		}
		return false;
	},
	beforeSubmit: function() { 
		ajaxIndicator(1, 'error_box');
	}
};
	function EditLang (id){
		document.all['div_lang_name['+id+']'].style.display = '';
		document.all['div_lang_code['+id+']'].style.display = '';
		document.all['div_lang_charset['+id+']'].style.display = '';
		document.all['div_lang_dir['+id+']'].style.display = '';
	}
	function CheckEmpty (name){
		if(document.lang_form[name].value ==""){
				alert({/literal}"{$lang.err.empty_language|escape:javascript}"{literal});
				return false;
			}
	}
			var options = { 
				success: function(data){
					ajaxLoadingImage(0, 'show_block');
					$('#show_block').html(data);
					/*$('#show_block').oneTime(3000, function() {
						$('#show_block').fadeOut(500);
					});*/
					return false;
				},
				beforeSubmit: function() { 
					//ajaxIndicator(1, 'show_block');
					ajaxLoadingImage(1, 'show_block');
				}
			};
			function submit(){
					$('.myform').ajaxSubmit(options);
			}
	
{/literal}
</script>
<div id="show_block" style="width: 100%;overflow:hidden;">
<div class="user_operation_line" id="user_operation_line" style="height:4px;font-size:0px;">
</div>
<div class="cr"></div>
    <div class="user_status_line">
        <div id="tab_1" class="user_status_elem_active" onclick="ShowEditor('1','settings.php?ajax=1');">
            {$lang.admin_menu.nl_general}
        </div>
        <div id="tab_2" class="user_status_elem" onclick="ShowEditor('2','template/index.php?ajax=1');">
            <a>{$lang.admin_menu.nl_templates}</a>
        </div>
        <div id="tab_3" class="user_status_elem" onclick="ShowEditor('3','forms/index.php?ajax=1');">
            <a>{$lang.admin_menu.nl_forms}</a>
        </div>
        <div id="tab_4" class="user_status_elem" onclick="ShowEditor('4','attaches/index.php?ajax=1');">
            <a>{$lang.admin_menu.nl_attachments}</a>
        </div>
        <div id="tab_5" class="user_status_elem" onclick="ShowEditor('5','smtp_servers/index.php?ajax=1');">
            <a>{$lang.admin_menu.nl_smtp_servers}</a>
        </div>
        <div class="cr"></div>
        <div class="panel_subtabs" style="width: 100%">
        	<div class="panel_content" style="width: 97%">
<div style="border:0px;">
<FORM id="myform" class="myform" name="myform" action="settings.php?ajax=1" method="post" style="margin:0px">
	<input type="hidden" name="action" value="change">
<!--
<table>
<tr height="40">
	<td><input type="button" value="SMTP Servers" class="button" onClick="document.location='smtp_servers/index.php'"></div></td>
	<td><input type="button" value="Add SMTP Server" class="button" onClick="document.location='smtp_servers/change.php?id=0'"></td>
</tr>
</table>
-->	
	<div class="fl newletter_form_setting">{$lang.newsletter.sett.timeout}:&nbsp;</div>
	<div class="fl"><INPUT type="text" name="timeout" class="inpBox" size="44" maxlength="50" value="{$row.timeout}">
	<A onmouseover=doTooltip(event,68) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A></div>

	<div class="cr">&nbsp;</div>
	<div class="fl newletter_form_setting">{$lang.newsletter.sett.timeout}:&nbsp;</div>
	<div class="fl"><INPUT type="text" name="smtp_quota" class="inpBox" size="44" maxlength="50" value="{$row.smtp_quota}">
	<A onmouseover=doTooltip(event,66) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A></div>

	<div class="cr">&nbsp;</div>
	<div class="fl newletter_form_setting">{$lang.newsletter.sett.sending_period}:&nbsp;</div>
	<div class="fl"><INPUT type="text" name="send_period" class="inpBox" size="44" maxlength="50" value="{$row.send_period}">
	<A onmouseover=doTooltip(event,67) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A></div>

	<div class="cr">&nbsp;</div>
	<div class="fl newletter_form_setting">{$lang.newsletter.sett.from_name}:&nbsp;</div>
	<div class="fl"><INPUT type="text" name="from_name" class="inpBox" size="44" maxlength="50" value="{$row.from_name}" tabindex="6">
	<A onmouseover=doTooltip(event,71) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A></div>

	<div class="cr">&nbsp;</div>
	<div class="fl newletter_form_setting">{$lang.newsletter.sett.from_email}:&nbsp;</div>
	<div class="fl"><INPUT type="text" name="from_email" class="inpBox" size="44" maxlength="50" value="{$row.from_email}" tabindex="7">
	<A onmouseover=doTooltip(event,72) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A></div>

	<div class="cr">&nbsp;</div>
	<div class="fl newletter_form_setting">{$lang.newsletter.sett.test_email}:&nbsp;</div>
	<div class="fl"><INPUT type="text" name="test_email" class="inpBox" size="44" maxlength="50" value="{$row.test_email}">
	<A onmouseover=doTooltip(event,57) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A></div>
	
<!--	<td><input type="button" value="Cancel" class="button" onClick='{literal}if(confirm("Are you sure?")) { document.location.href="index.php" }{/literal}'></td> -->

</form>
</div>
</div>
</div>
	<div>
		<a class="admin_button_major" onclick="submit();">{$lang.newsletter.button.save}<span>&nbsp;</span></a>
	</div>

</div>
{if $ajax eq 0}{include file="$admin_nl_gentemplates/admin_nl_site_foot.tpl"}{/if}