<script language="JavaScript">
<!--- hide script from old browsers
function mysubmit(cmd, msg)
{
	if (top.stats) {
		if (top.stats.document) {
			top.stats.Message(msg);
		}
	}
	document.spellform.cmd.value = cmd;
	document.spellform.submit();
}

function newwindow()
{
	msgWindow = open('||action||?cmd=addr_only&utoken=||putoken||&force_connection=true&&','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 checkword(wrong_word, msg_line, nword)
{
	call_str = '||action||?cmd=check_word&force_connection=true&utoken=||utoken||&word=';
	call_str = call_str + wrong_word;
	call_str = call_str + '&nword=';
	call_str = call_str + nword;
	call_str = call_str + '&line=';
	call_str = call_str + msg_line;
	call_str = call_str + '&&';

	msgWindow = open(call_str,'CHECK_SPELLING','width=320,height=240,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=no','POPUP'); 
	msgWindow.opener = document;
	msgWindow.focus();
}

function display_dictionary()
{
	msgWindow = open('||action||?cmd=edit_dict&force_connection=true&utoken=||putoken||&&','DICTIONARY'
			,'width=280,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=no','POPUP');
	msgWindow.opener = document;
	msgWindow.focus();
}


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

<html><head>
<title>View spelling mistakes</title>
</head>

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

<form name="spellform" method=post action="||action||" ENCTYPE="multipart/form-data">
<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=""> 
<input type=hidden name="misspelt_line" value="">
<input type=hidden name="misspelt_word" value="">
<input type=hidden name="word_number" value="">
<input type=hidden name="corrected_word" value="">
<input type=hidden name="force_connection" value="true">

<h3>Current message.</h3>
<table>
<tr>
	<td>
		<table>
		<tr>
			<td align=right>To: </td>
			<td align=left>
				<input name="to" size=24 value="||to||" onFocus="document.spellform.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="||cc||" onFocus="document.spellform.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="||bcc||" onFocus="document.spellform.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="||reply||" onFocus="document.spellform.oo[3].checked = true">
				<INPUT TYPE=RADIO NAME="oo" VALUE="r">
			</td>
		</tr>
		<tr>
			<td align=right>Attach: </td>
			<td align=left><input type=file name="attach" value="" size=24"></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||
			</td>
		</tr>
		</table>
	</td>
	<td>
		Pick List (and Distribution List)<br>
		<input type="button" value="Clear" onClick="dele();" name="clear">
		<input type="button" value="Address Book" onClick="newwindow();"><br>
		<select name="tolist" size=5 onChange="setto(this)">
			<option>||picklist||</option> 
		</select>
	</td>
</tr>
</table>

<table>
<tr>
	<td>Subject: <input name="subject" size=66 value="||subject||"></td>
	<td rowspan="2"><input type="submit" name="send" value="Send"></td>
</tr>
</table>

<table width="100%" cellpadding="0" cellspacing="0" >
<tr cellpadding="0" cellspacing="0" >
	<td align="center">
		<table>
		<tr>
			<td><h3>Original Message</h3></td>
			<td><input type="submit" name="spell_check" value="Check Spelling"><input type="hidden" name="force_connection" value="true"></td>
		</tr>
		</table>
	</td>
	<td align="center">
		<h3>I found ||lines_wrong||/||nlines|| lines with errors where ||nwrong|| words<br>
		are not in my dictionary</h3>
	</td>
</tr>
<tr cellpadding="0" cellspacing="0" >	
	<td align="center" valign="top">
		<textarea name="message" cols=34 rows=12>||message||</textarea><br>
		<input type="submit" name="save_draft" value="Save Draft">
		<select name="dstfld" size="1">
			<option>||xfldlist||</option>
		</select>
		&nbsp;
		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>
	<td align="center" valign="top">
		<table width="100%">
		<tr>
			<td align="center"><a href="javascript:display_dictionary()">Edit Personal Dictionary</a></td>
		</tr>
		<tr>
			<td>
				<table border bgcolor="ffffff" width="100%">
				<tr>
					<td>||spell_list||</td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
	</td>
</tr>
</table>

<hr>
<table>
<tr>
	<td><input type="submit" name="send" value="Send"></a></td>
	<td align=right>Content-type: </td>
	<td>
		<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="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 align=right>Attach 2: </td>
	<td align=left><input type=file name="attach" value="" size=24"></td>
</tr>
<tr>
	<td><input type=checkbox name="send_autocc" value="on" ||send_autocc||> Send CC to self for confirmation</td>
	<td align=right>Attach 3: <td align=left><input type=file name="attach" value="" size=24"></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.spellform.oo[j].checked == true) i = j;  

	if (i==0)
		document.spellform.to.value = "";
	if (i==1)
		document.spellform.cc.value = "";
	if (i==2)
		document.spellform.bcc.value = "";
	if (i==3)
		document.spellform.reply.value = "";
	document.spellform.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.spellform.oo[0].checked == true) {
				if (document.spellform.to.value != "")
					document.spellform.to.value = ", " + document.spellform.to.value;
				document.spellform.to.value = sel.options[i].value + document.spellform.to.value;
			}
			if (document.spellform.oo[1].checked == true) {
				if (document.spellform.cc.value != "")
					document.spellform.cc.value = ", " + document.spellform.cc.value;
				document.spellform.cc.value = sel.options[i].value + document.spellform.cc.value;
			}
			if (document.spellform.oo[2].checked == true) {
				if (document.spellform.bcc.value != "")
					document.spellform.bcc.value = ", " + document.spellform.bcc.value;
				document.spellform.bcc.value = sel.options[i].value + document.spellform.bcc.value;
			}
			if (document.spellform.oo[3].checked == true) {
				if (document.spellform.reply.value != "")
					document.spellform.reply.value = ", " + document.spellform.reply.value;
				document.spellform.reply.value = sel.options[i].value + document.spellform.reply.value;
			}
		}
	}
	if (sel.options[0].selected==true) {
		dele();
	}
}
// end hiding from old browsers -->
</script>