<html>

||undef||draft_msg||
||ifequal||cmd||(msg_draft)||
	||define||draft_msg||true||
||endif||


<script language="JavaScript">
<!--- hide script from old browsers

function start()
{
||ifdef||email||
	str = "||email||";
	ptr = str;
	for (i=0;i<str.length;i++) {
		if (str.substr(i,1) == ':') {
			i++;
			ptr = str.substr(i,str.length-i);
		}
	}
	str = ptr;
	for (i=0;i<str.length;i++) {
		if (str.substr(i,1) == '?') {
			ptr = str.substr(0,i);
		}
	}
	document.sendform.to.value = ptr;
||endif||

	wysiwyg_start();

	focus();
}

function do_copy(sel)
{
	var i;
	document.sendform.reply.value = '||reply||'
	for (i=0; i<sel.options.length; i++) {
		if (sel.options[i].selected==true) {
			document.sendform.reply.value = sel.options[i].text;
		}
	}
}

function mysubmit(cmd, msg)
{
	if (top.stats) {
		if (top.stats.document) {
			top.stats.Message(msg);
		}
	}
	document.sendform.cmd.value = cmd;
	document.sendform.submit();
}

function newwindow()
{
	msgWindow = open('||action||?cmd=addr_only&utoken=||putoken||&&','ADDRESSBOOK','width=500,height=150,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=yes','POPUP');
	if (msgWindow.opener == null) msgWindow.opener = self;
        if (msgWindow.opener.sendform == null) msgWindow.opener.sendform = document.sendform;
	msgWindow.focus();
}

function do_wys()
{
	document.sendform.cmd.value = "attach_msg";
	document.sendform.msg_alternative.value=""; 
	document.sendform.submit();
}


// end hiding from old browsers -->
</script>

<head>
<title>Create new message </title>
</head>

||ifdef||background||
<body background="||nwimg||/||background||" onLoad="start()">
||else||
<body onLoad="start()">
||endif||

||ifnequal||frames||1||
	||include||nfmenu.tpl||
||endif||


||ifdef||error||
	<center>
	<table border="1">
		<tr>	<td><img src="||nwimg||/attention.gif">
			<td bgcolor="ffffff">||error||</td>
		</tr>
	</table>
	</center>
||endif||

||ifequal||email_sent||max_email_sends||
	<center>
	<table border="1">
		<tr>	<td><img src="||nwimg||/attention.gif">
			<td bgcolor="ffffff">You have reached your maximum allowed number of sends per day (||max_email_sends||)</td>
		</tr>
	</table>
	</center>
||endif||

||ifdef||netscape_version||
<div id="nsnote" style="position:absolute; visibility: hidden" >
	<table>
	<tr>	<td><b>Note: To use the Styletext 'WYSIWYG' Editor on Netscape you need to install a few Plug-in's<br>
			For more information click this link '<a href="||action||?cmd=show&utoken=||utoken||&page=plugin.tpl">Plugin Info</a>'</b>
		</td>
	</tr>
	</table>
</div>
||endif||



<form name="sendform" method="post" action="||action||">
	<input type="hidden" name="utoken" value="||utoken||">
	<input type="hidden" name="fld" value="||folder||">
	<input type="hidden" name="answered" value="||answered||">
	<input type="hidden" name="cmd" value="">
	<input type="hidden" name="page" value="">
	<input type="hidden" name="process" value="">

	<input type="hidden" name="force_connection" value="true">
<!--	<input type=hidden name="header_charset" value="iso-8859-2">  -->
	<h3>Create new message.</h3>
	<table><tr><td>
		<table>
			<tr><td align="right">To:</td>
				<td align="left"><input name="to" size="24" value="||html_text||h_from||" onFocus="document.sendform.oo[0].checked = true">
				<INPUT TYPE="RADIO" NAME="oo" VALUE="t" CHECKED></td></tr>
			<tr><td align="right">CC:</td>
				<td align="left"><input name="cc" size="24" value="||html_text||h_cc||" onFocus="document.sendform.oo[1].checked = true">
				<INPUT TYPE="RADIO" NAME="oo" VALUE="c"></td></tr>
			<tr><td align="right">BCC:</td>
				<td align="left"><input name="bcc" size="24" value="||html_text||h_bcc||" onFocus="document.sendform.oo[2].checked = true">
				<INPUT TYPE="RADIO" NAME="oo" VALUE="b"></td></tr>
			<tr><td align="right">Reply-To:</td>
				<td align="left">
					<input name="reply" size="24" value="||html_text||reply||" onFocus="document.sendform.oo[3].checked = true">
					<INPUT TYPE="RADIO" NAME="oo" VALUE="r"><br>
				||ifdef||host_name0||
					<select name="replyx" size="1" onchange="do_copy(this)">
				            <option> ||dflt_reply|| </option>
			        <!--        <option> ||host_user0||@||host_name0|| </option> --->
					||ifdef||host_name1||
				            <option> ||host_user1||@||host_name1|| </option>
				    ||endif||
					||ifdef||host_name2||
				            <option> ||host_user2||@||host_name2|| </option>
					||endif||
					||ifdef||host_name3||
				            <option> ||host_user3||@||host_name3|| </option>
					||endif||
					||ifdef||host_name4||
					    	<option> ||host_user4||@||host_name4|| </option>
					||endif||
					</select>
				||endif||

				</td></tr>
			<tr><td align="right">Attach:</td>
			<td align="left">
			||ifequal||attach_num||0||
				(none)
			||else||
				||begin_attach||
					<b>||attach_name||</b> (||attach_ksize||k),<br>
				||end_attach||
			||endif||
			<tr><td></td>
			<td align="left"><a href="" onclick="obj_editor=tbCE; tbCE_guardar(); do_attach(); return false;" ><img border="0" src="||nwimg||/addattach.gif" name="add_attach" value="Add Attachment"></a></td></tr>
		</table>

	<td>Pick List (and Distribution List)<br>
		<img border="0" src="||nwimg||/clear.gif" alt="Clear" usemap="#Clearfield">
		<map name="Clearfield"><area coords="0,0,100,100" href="javascript:dele()"></map>

		<img border="0" src="||nwimg||/addrsbk.gif"  alt="Address Book" name="Display Address" usemap="#ABooks"><br>
		<map name="ABooks"><area coords="0,0,100,100" href="javascript:newwindow()"></map>

		<select name="tolist" size="5" onChange="setto(this)">
			<option>||picklist||</option>
		</select>

	</table>

	<table><tr><td>
		Subject: <input name="subject" size="40" value="||html_text||h_subject||||html_text||my_subject||">
		</td>
		<td>	<table cellspacing="0">
			<tr>	<td align="right">Priority:</td>
				<td><select name="priority">
						<option value="normal">Normal</option>
					||ifequal||priority||urgent||
						<option value="urgent" selected>Urgent</option>
					||else||
						<option value="urgent">Urgent</option>
					||endif||
					</select>
				</td>
			</tr>
		    	<tr>	<td align="right">Confirm:</td>
				<td>	<select name="confirm">
						<option value="none">None</option>
					||ifequal||confirm||read||
						<option value="read" selected>Reading</option>
					||else||
						<option value="read">Reading</option>
					||endif||
					</select>
				</td>
			</tr>
			</table>
		</td>
		<td> </td>
		<td>	<a href="" onclick="obj_editor=tbCE; tbCE_guardar(); do_send(); return false;" ><img border="0" src="||nwimg||/send.gif" name="send"></a>
		</td>

		<tr><td colspan="2">Enter your message text here: (press enter at the end of each line)

			<a href="" onclick="obj_editor=tbCE; tbCE_guardar(); do_spell(); return false;" ><img border="0" src="||nwimg||/spellchk.gif" name="spell_check"></a>
			<a href="" onclick="obj_editor=tbCE; tbCE_guardar(); do_wys(); return false;"><img border="0" src="||nwimg||/textmode.gif" name="Text Mode"></a>
	</table>


||undef||start_msg||
||ifdef||message_headers||
	||define||start_msg||(\n<br>\n<br>----- Message Forwarded on ||date_today||date_layout|| -----\n<br>From: ||html_text||from||\n<br>To: ||html_text||to||\n<br>||ifdef||cc||Cc: ||cc||\n<br>||endif||Subject: ||html_text||subject||\n<br>Date: ||cvt_date||date||date_layout||\n<br>\n<br>)||
||endif||

	<table>
		<tr><td>

<input type="hidden" name="content_type" value="text/html">
<input type="hidden" name="msg_alternative" value="true">
<input type="hidden" name="message" value="">
<SCRIPT>
	function salvar_html(htmlcode)
	{
		document.sendform.message.value = htmlcode;
	}

	function do_attach()
	{
		document.sendform.cmd.value = "add_attach";
		document.sendform.submit();
	}

	function do_send()
	{
		document.sendform.cmd.value = "send";
		document.sendform.submit();
	}

||ifdef||draft_msg||
	function do_draft()
	{
		if (confirm("Do you wish to replace the current Draft message??")) {
			document.sendform.cmd.value = 'delitem-||uidl||';
			document.sendform.process.value = "save_draft";
		}
		else
			document.sendform.cmd.value = "save_draft";
		document.sendform.submit();
	}
||else||
	function do_draft()
	{
		document.sendform.cmd.value = "save_draft";
		document.sendform.submit();
	}
||endif||

	function do_spell()
	{
		document.sendform.cmd.value = "spell_check";
		document.sendform.submit();
	}
</SCRIPT>


||ifdef||ie_version||
	||include||ie_htmltext.tpl||
||else||
	||include||ns_htmltext.tpl||
||endif||

		</td></tr>
	</table>

	<hr>
	<table>
		</select>
		<tr>	<td><a href="" onclick="obj_editor=tbCE; tbCE_guardar(); do_send(); return false;" ><img border="0" src="||nwimg||/send.gif" name="send"></a></td>
			<td><a href="" onclick="obj_editor=tbCE; tbCE_guardar(); do_draft(); return false;" ><img border="0" src="||nwimg||/draft.gif" name="save_draft"></a>

			<select name="dstfld" size="1">
				<option>||xfldlist||</option>
			</select>
			</td>
		</tr>

		<tr><td><input type="checkbox" name="addsig" value="on" ||addsig||> Add Sig file
			<select name="_default_profile" size="1">
			||begin_profile||
				||ifnequal||_default_profile||profile_name||
					<option>||profile_name||</option>
				||else||
					<option selected>||profile_name||</option>
				||endif||
			||end_profile||
			</select></td></tr>
		<tr><td><input type="checkbox" name="sig_first" value="true"> Place Signature at the top of the EMail</td></tr>
		<tr><td><input type="checkbox" name="send_autocc" value="on" ||send_autocc||> Send CC to self for confirmation</td></tr>
		<tr><td colspan="2"><input type="checkbox" name="copyself" value="on" ||copyself||> Save a copy in copies to self folder</td></tr>
	</table>
</form>

||copyright||
</body></html>

<script language="JavaScript">
<!--- hide script from old browsers
function dele()
{
	var i = 0, j;

	for (j=0; j<4; j++)
		if (document.sendform.oo[j].checked == true) i = j;

	if (i==0)
		document.sendform.to.value = "";
	if (i==1)
		document.sendform.cc.value = "";
	if (i==2)
		document.sendform.bcc.value = "";
	if (i==3)
		document.sendform.reply.value = "";
	document.sendform.tolist.options[0].selected = true;
}

function setto(sel)
{
	var option;
	var i;
	for (i=0; i<sel.options.length; i++) {
		if (sel.options[i].selected==true) {
			if (document.sendform.oo[0].checked == true) {
				if (document.sendform.to.value != "")
					document.sendform.to.value = ", " + document.sendform.to.value;
				document.sendform.to.value = sel.options[i].value + document.sendform.to.value;
			}
			if (document.sendform.oo[1].checked == true) {
				if (document.sendform.cc.value != "")
					document.sendform.cc.value = ", " + document.sendform.cc.value;
				document.sendform.cc.value = sel.options[i].value + document.sendform.cc.value;
			}
			if (document.sendform.oo[2].checked == true) {
				if (document.sendform.bcc.value != "")
					document.sendform.bcc.value = ", " + document.sendform.bcc.value;
				document.sendform.bcc.value = sel.options[i].value + document.sendform.bcc.value;
			}
			if (document.sendform.oo[3].checked == true) {
				if (document.sendform.reply.value != "")
					document.sendform.reply.value = ", " + document.sendform.reply.value;
				document.sendform.reply.value = sel.options[i].value + document.sendform.reply.value;
			}
		}
	}
	if (sel.options[0].selected==true) {
		dele();
	}
}
// end hiding from old browsers -->
</script>