{if $ajax eq 0}
	{include file="$admin_nl_gentemplates/admin_nl_site_head.tpl"}
<script language="JavaScript" type="text/javascript" src="{$site_root}{$index_theme_path}/js/jquery.form.js"></script>
<script language="JavaScript" type="text/javascript" src="{$site_root}{$template_root}/js/area-editor.js"></script>	
{/if}
<div style="height:4px;font-size:0px;" 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" onclick="ShowEditor('2','template/index.php?ajax=1');">
            <a>{$lang.admin_menu.nl_templates}</a>
        </div>
        <div id="tab_3" class="user_status_elem_active" onclick="ShowEditor('3','forms/index.php?ajax=1');">
            {$lang.admin_menu.nl_forms}
        </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;">
<div class="panel_content" style="margin-bottom:0px;margin-left: 0px;">
	<form id="myform"  name="myform" class="myform" action="forms/create2.php?ajax=1&id={$form.id}" method="post" style="margin:0px" onsubmit="javascript: alert(1); return CheckForm()">
	
	<input type="hidden" name="lid" value="{$lid}">
	<input type="hidden" name="ajax" value="1">
	
	<div class="fl newletter_export"><font color="red">*</font> {$lang.newsletter.forms.form_name}:&nbsp;</div>
	<div class="fl">
		<INPUT type="text" name="FormName" class="inpBox" style="width:249 px;" maxlength="100" value="{$form.name}">
		&nbsp;<A onmouseover="doTooltip(event,35)" 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_export"><font color="red">*</font> {$lang.newsletter.forms.form_type}:&nbsp;</div>
	<div class="fl">
		<SELECT class="inpBox" name="FormType" size="1" >
			<OPTION value="sub" {if $form.type == "sub"} selected {/if}>{$lang.newsletter.forms.subscr_form}</OPTION>
			<OPTION value="unsub" {if $form.type == "unsub"} selected {/if}>{$lang.newsletter.forms.unsubscr_form}</OPTION>
		</SELECT>
	&nbsp;<A onmouseover="doTooltip(event,36)" onmouseout="hideTip()" href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</div>	
	
	
	</form>
</div>
</div>
</div>
</div>
	<div class="cr">&nbsp;</div>
	<div>
		<a style="float:left;" class="admin_button_major" onclick="javascript: if (CheckForm())submit();">{$lang.newsletter.button.to_step_2}<span>&nbsp;</span></a>		
		<a style="float:left;margin-top:12px;margin-left:10px;" onclick="ShowBlock('show_block','forms/index.php?ajax=1');">{$lang.newsletter.button.cancel}<span>&nbsp;</span></a>
	</div>
{literal}
            <script language="JavaScript">
			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);
			}

				function CheckForm(){
                    var f = document.forms[0];
                    if(f.FormName.value == ""){
                        alert("{/literal}{$lang.newsletter.forms.alert_enter_name|escape:javascript}{literal}");
                        f.FormName.focus();
                        return false;
                    }
                    return true;
                }
            </script>
{/literal}
{if $ajax eq 0}
	{include file="$admin_nl_gentemplates/admin_nl_site_foot.tpl"}
{/if}
