<html>

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

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 get_selected(list, feild){
	var i;
	for(i=0; i<list.options.length; i++){
		if(list.options[i].selected){
			feild.value = list.options[i].value;
			return;
		}
	}
}

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

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

<body bgcolor="#cedfff">

<table border="0" cellpadding="0" cellspacing="0" rules="none"><tr valign="top">
<td>||include||nfmenu.tpl||</td><td>&nbsp;</td><td>


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


<form name="sendform" ENCTYPE="multipart/form-data" method=post action="||action||"> 
<input type="hidden" name="answered" value="||answered||">
<input type="hidden" name="folder" value="||folder||">
<input type=hidden name="utoken" value="||utoken||" > 
<input type=hidden name="cmd" value="" > 
<table border="0" >
<tr>
	<td>
		<table border="0">
		<tr>
			<td align=right>To:</td>
			<td align=left nowrap="true">
				<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>
			<td rowspan="4">
				<table border="0">
				<tr>
					<td>
					   <img border="0" src="||nwimg||/clear.gif" alt="Clear" usemap="#Clearfield">
						<map name="Clearfield"><area coords="0,0,108,24" href="javascript:dele()"></map>
					</td>
					<td>
						<img border="0" src="||nwimg||/addrsbk.gif"  alt="Address Book" name="Display Address" usemap="#ABooks">
						<map name="ABooks"><area coords="0,0,108,24" href="javascript:newwindow()"></map>
					</td>
				</tr>
				<tr>
					<td>
						<select name="tolist" size=5 onchange="setto(this)">
							<option>||picklist||</option> 
						</select>
					</td>
 					<td width="100" >Click entries to add them to the selected field</td>
				</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td align=right>CC:</td>
			<td align=left nowrap="true">
				<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 nowrap="true">
				<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 nowrap="true">
				<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_name1||
					<select name="reply_list" size="1" onchange="get_selected(this, this.form.reply);">
				        <option value="||reply||"> ||reply|| </option>
						||ifinstr||reply||host_user0||
							||ifinstr||reply||host_name0||
							||else||
								<option value="||host_user0||@||host_name0||"> ||host_user0||@||host_name0|| </option>
							||endif||
						||else||
							<option value="||host_user0||@||host_name0||"> ||host_user0||@||host_name0|| </option>
						||endif||
				        <option value="||host_user1||@||host_name1||"> ||host_user1||@||host_name1|| </option>
					||ifdef||host_name2||
			            <option value="||host_user2||@||host_name2||"> ||host_user2||@||host_name2|| </option>
					||endif||
					||ifdef||host_name3||
			            <option value="||host_user3||@||host_name3||"> ||host_user3||@||host_name3|| </option>
					||endif||
					||ifdef||host_name4||
					    <option value="||host_user4||@||host_name4||"> ||host_user4||@||host_name4|| </option>
					||endif||
					</select>
				||endif||
			</td>
		</tr>
		<tr>
			<td align=right>Attach:</td>
			<td align=left>
				||begin_attach||
					<b>||attach_name||</b> (||attach_ksize||k),<br>
				||end_attach||
			</td>
		</tr>
		<tr>
			<td></td>
			<td align=left><input type=image border="0" src="||nwimg||/add.gif" name="add_attach" value="Add Attachment"></td>
		</tr>
		</table>
	</td>
</tr>
</table>

Subject: <input name="subject" size=66 value="||h_subject||"><br>
Enter your message text here: (press enter at the end of each line)

<table>
<tr>
	<td>
		<textarea name="message" cols=61 rows=12 wrap="physical">||ifdef||message_headers||


----- Message Forwarded on ||date_today||date_layout|| -----
From: ||from||
To: ||to||
||ifdef||cc||
Cc: ||cc||
||endif||
Subject: ||subject||
Date: ||date||

||endif||||ifnempty||h_from||||ifempty||return_attach||
From: ||from||
To: ||to||
||ifdef||cc||
Cc: ||cc||
||endif||
Subject: ||subject||
Date: ||date||

----- Original Message Follows -----
||endif||||endif||||quote_body||
</textarea>
	</td>
	<td align="center">
		<input type=image border="0" src="||nwimg||/send.gif" name=send><br><br>
		<input type=image border="0" src="||nwimg||/spellchk.gif" name=spell_check><br><br>
		<input type=image border="0" src="||nwimg||/save.gif" name=save_draft><br>
		<select name="dstfld" size="1">
			<option>||xfldlist||</option>
		</select>
	</td>
</tr>
</table>

<hr>
<table>
<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>
	<td align=right>
		Content-type:
		<select name="content_type" size="1">
			<option selected></option>
			<option>text/html</option>
			<option>text/plain; charset="iso-8859-1"</option>
			<option>text/plain; charset="iso-2022-jp"</option>    
		</select>
	</td>
</tr>
<tr>
	<td><input type=checkbox name="send_autocc" value="on" ||send_autocc||> Send CC to self for confirmation</td>
	<td rowspan="2">
		Confirm:
		<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>
<tr>
	<td><input type=checkbox name="copyself" value="on" ||copyself||> Save a copy in copies to self folder</td>
</tr>
</table>
</form>

||copyright||
</td></tr></table>
</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>