{if $ajax eq '0'}{include file="$admin_nl_gentemplates/admin_nl_site_head.tpl"}{/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_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%; margin: 10px;">
<div style="border:0px;">
<div class="panel_content" style="width:97%;margin-bottom:0px;margin-left: 0px;">
	<FORM id="myform" class="myform" name="AddTemplate" action="template/create_format.php?ajax=1" method="post" style="margin:0px">
	<div class="fl newletter_export"><font color="red">*</font> {$lang.newsletter.template.template_format}:&nbsp;</div>
	<div class="fl">
		<SELECT class="inpBox" name="format" size="1" id="format_type">
		<OPTION value="html" selected>{$lang.newsletter.template.sel_wyswyg}</OPTION>
		<OPTION value="text" >{$lang.newsletter.template.sel_textarea}</OPTION>
		</SELECT>
		&nbsp;<A onmouseover=doTooltip(event,53) onmouseout=hideTip() href="#"><IMG src="{$site_root}{$template_root}/images/newsletter/icot.gif" width="12" height="12" border=0 align="absmiddle"></A>
	</div>
</div>
</div>
</div>
</div>
	<div>
		<a style="float:left;" class="admin_button_major" onclick="submit();">{$lang.newsletter.button.to_step_2}<span>&nbsp;</span></a>
		<a style="float:left;" class="admin_button_cancel" onclick="ShowBlock('show_block','template/index.php?ajax=1');">{$lang.newsletter.button.cancel}<span>&nbsp;</span></a>
	</div>

<script language="JavaScript" type="text/JavaScript">
{literal}
			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(){
					window.open('template/create_format.php?ajax=1&format='+$("#format_type option:selected").val()+'&commit=1','', 'resizable=yes,scrollbars=yes,location=no,directories=no,status=no,toolbar=no,menubar=no,width=700,height=500,left=0,top=0');
					ShowBlock('show_block','template/index.php?ajax=1');
//					$('.myform').ajaxSubmit(options);
			}
{/literal}
</script>
{if $ajax eq '0'}{include file="$admin_nl_gentemplates/admin_nl_site_foot.tpl"}{/if}