{*{if $ajax eq '0'}{include file="$admin_nl_gentemplates/admin_nl_site_head.tpl"}{/if}
<div style="height:4px;font-size:0px;width:99.7%" class="user_operation_line"></div>
<div class="cr"></div>
    <div class="user_status_line">
        <div id="tab_1" class="user_status_elem" onclick="ShowEditor('1','settings.php?ajax=1');">
            <a>{$lang.admin_menu.nl_general}</a>
        </div>
        <div id="tab_2" class="user_status_elem_active" onclick="ShowEditor('2','template/index.php?ajax=1');">
            {$lang.admin_menu.nl_templates}
        </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%">*}
{include file="$admingentemplates/admin_top.tpl"}
	<div class="red_header">{$header.razdel_name}</div>
<div class="cr">&nbsp;</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>{$help.billing}
    </div>
</div>
<div  class="panel_section">
<div  class="panel_content">
<div style="border:0px;">
<div class="panel_content" style="margin-bottom:0px;margin-left: 0px;">
<form name="myform" method="POST" id="myform" class="myform" action="change.php?ajax=1&id={$id}" enctype="multipart/form-data" onSubmit="return CheckForm();" style="margin:0px">
	<input type="hidden" name="action" value="change">
	<input type="hidden" name="format" value="{$format}">

	{if $message != ""}<font face="Verdana" style="font-size: 10px" color="red"><b>{$message}</b></font><br>{/if}

	
	<div class="fl newletter_form_create"><b>{$lang.newsletter.template.template_name}:</b>
	&nbsp;<a onmouseover=doTooltip(event,54) 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="fl"><input type="text" name="name" value="{$rel.name}" style="width: 500px" class="inpBox">
	</div>
	<div class="cr">&nbsp;</div>
	<div class="fl newletter_form_create"><b>{$lang.newsletter.template.text_content}:</b>
	&nbsp;<A onmouseover=doTooltip(event,56) 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="fl"><textarea name="body" cols=80 rows=20 class="inpBox" style="width: 500px">{$rel.body}</textarea><br><br>
	</div>
</form>
</div>
</div>
</div>
</div>
	<div>
		<a class="admin_button_major" onclick="if ( CheckForm() ) submit();">{$lang.newsletter.template.save_templ}<span>&nbsp;</span></a>
		
	</div>

{literal}  
<script>
			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').submit();//ajaxSubmit(options);
			}
	function CheckForm(){
		var f = document.forms[0];
	   
		if(f.name.value == "" || f.body.value == ""){
			alert("{/literal}{$lang.newsletter.template.enter_content_alert|escape:javascript}{literal}");
			return false;
		}
		return true;
	}
</script>
{/literal}  
{include file="$admingentemplates/admin_bottom.tpl"}
{*{if $ajax eq '0'}
{include file="$admin_nl_gentemplates/admin_nl_site_foot.tpl"}{/if}*}
