<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
<!--
td{
	font: 8pt "Arial";
    color: black;
}

th{
	font: 11pt "Arial";
    color: black;
	font-weight: bold;
}

input{
	font: 8pt "Arial";
    color: black;
}

select{
	font: 8pt "Arial";
    color: black;
}
//-->
</style>
||ifdef||netscape_version||
	||define||amp||&||
||else||
	||define||amp||&amp;||
||endif||
<title>Create new message </title>

<script type="text/javascript">
<!--

||ifdef||netscape_version||
function hotkey(event){
	switch (event.which) {
||else||
function hotkey(event){
	switch (event.keyCode) {
||endif||
	   case 10 : // Ctrl-Enter || Ctrl-Shift-J - return to message
			document.attachform.cmd.value = "attach_msg";
			document.attachform.submit();
			break;
	   default :
			break;
	}
}

function hotkeyoverload(){
	hotkey(event);
}

||ifdef||netscape_version||
	document.captureEvents(Event.KEYPRESS);
	document.onkeypress = hotkey;
||endif||

function returnToMessage(){
	||ifdef||isbulletin||
		document.returnform.page.value = 'send_bullf';
		document.returnform.process.value = 'bulletin';
	||else||
		document.returnform.process.value = 'attach_msg';
	||endif||
	document.returnform.submit();
}

var attaching1 = new Image();
var attaching2 = new Image();
attaching1.src = "||nwimg||/addattach2.gif";
attaching2.src = "||nwimg||/addattach.gif";

function attachingOff(){
	document.attach_send.src = attaching2.src;
	setTimeout("attaching()", 500);
}

function attaching(){
	document.attach_send.src = attaching1.src;
	setTimeout("attachingOff()", 500);
}

function attachFiles(){
	attaching();
	document.returnform.cmd.value='attach_send';
	document.returnform.submit();
}

var saving1 = new Image();
var saving2 = new Image();
saving1.src = "||nwimg||/save2.gif";
saving2.src = "||nwimg||/save.gif";

function savingOff(){
	document.keep_attach_send.src = saving2.src;
	setTimeout("saving()", 500);
}

function saving(){
	document.keep_attach_send.src = saving1.src;
	setTimeout("savingOff()", 500);
}

function saveAttachFiles(){
	saving();
	document.returnform.cmd.value='keep_attach_send';
	document.returnform.page.value = 'attachf.tpl';
	document.returnform.submit();
}

function keepAttachAdd(){
	document.returnform.cmd.value='keep_attach_add';
	document.returnform.page.value = 'attachf.tpl';
	document.returnform.submit();
}

function webshare_file(file, path) {
	document.returnform.file_path.value = file;
	document.returnform._webshare_path.value = path;
	document.returnform.cmd.value = "attach_share_file";
	document.returnform.submit();
}

function openwindow(url){
	if(document.all) {
		innerWidth = document.body.offsetWidth;
	}
	if(innerWidth > 800){
		var width=450;
		var height=350;
		var left=80;
		var top=60;
	}
	else{
		var width=388;
		var height=280;
		var left=0;
		var top=10;
	}
	var str = "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,status=0,menubar=yes,scrollbars=yes,resizable=1,left=" + left + ",top=" + top;
	var win = open(url, "webshare", str, 'POPUP');
	if (win.opener == null) win.opener = self;
        if (win.opener.returnform == null) win.opener.returnform = document.sendform;
	win.focus();
}

//-->
</script>
</head>

<body background="||cust_panel_background||" bgcolor="||cust_panel_bgcolor||" onkeypress="hotkeyoverload();">

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

<form name="returnform" target="_self" enctype="multipart/form-data" method="post" action="||action||">
	<input type="hidden" name="valid_max" value="||valid_max||" />
	<input type="hidden" name="valid_users" value="||valid_users||" />
	<input type="hidden" name="valid_day" value="||valid_day||" />
	<input type="hidden" name="valid_month" value="||valid_month||" />
	<input type="hidden" name="valid_year" value="||valid_year||" />
	<input type="hidden" name="answered" value="||answered||" />
	<input type="hidden" name="utoken" value="||utoken||" />
	<input type="hidden" name="attach_id" value="||attach_id||" />
	<input type="hidden" name="to" value="||html_text||to||" />
	<input type="hidden" name="cc" value="||html_text||cc||" />
	<input type="hidden" name="bcc" value="||html_text||bcc||" />
	<input type="hidden" name="subject" value="||html_text||subject||" />
	<input type="hidden" name="reply" value="||html_text||reply||" />
	<input type="hidden" name="force_connection" value="true" />
	<input type="hidden" name="redirect" value="||redirect||" />
	<input type="hidden" name="from" value="||html_text||from||" />
	<input type="hidden" name="myuidl" value="||myuidl||" />
	<input type="hidden" name="folder" value="||folder||" />
	<input type="hidden" name="not_new" value="||not_new||" />
	<input type="hidden" name="confirm" value="||confirm||" />
	<input type="hidden" name="isbulletin" value="||isbulletin||" />
	<input type="hidden" name="xmessage" value="" />
	<input type="hidden" name="priority" value="||priority||" />
	<input type="hidden" name="msg_alternative" value="||msg_alternative||" />
	<input type="hidden" name="page" value="" />
	<input type="hidden" name="process" value="" />
	<input type="hidden" name="isbulletin" value="||isbulletin||" />
	<input type="hidden" name="cmd" value="attach_send" />
	<input type="hidden" name="return_attach" value="true" />
	<input type="hidden" name="priority" value="||priority||" />
	<input type="hidden" name="content_type" value="||content_type||" />
	<input type="hidden" name="copyself" value="||copyself||" />
	<input type="hidden" name="pgp_type" value="||pgp_type||" />
	<input type="hidden" name="file_path" value="" />
	<input type="hidden" name="_webshare_path" value="||_webshare_path||" />
<script type="text/javascript"><!--
if (navigator.appVersion.indexOf('MSIE 3.',0) >=0) document.writeln("<br />Unfortunately IE3 does not support attachments");
//--></script>
<table align="center">
<tr>
	<td valign="top">
		<table>
		<tr>
			<td colspan="2" align="left">
				<input type="button" value="Return to Message" onclick="returnToMessage();" />
			</td>
||ifdef||display_webshareit||
	||ifequal||(||check_id||3||)||true||
			<td align="right"><a href="javascript:openwindow('||action||?cmd=netwin_login-3||amp||utoken=||utoken||');"><img border="0" src="||nwimg||/folder.gif" alt="Go to Webshareit" />Webshareit</a></td>
	||endif||
||endif||
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr>
			<td>Choose files then press add to attach:</td>
			<td align="right">
				<a href="javascript:attachFiles()"><img src="||nwimg||/addattach.gif" border="0" alt="Add attachments" name="attach_send" /></a>
				||ifnempty||keep_attach_size||
					<a href="javascript:saveAttachFiles()"><img src="||nwimg||/save.gif" border="0" alt="Save attachments for sending later" name="keep_attach_send" /></a>
				||endif||
			</td>
		</tr>
		<tr>
			<td colspan="2"><input type="file" name="attach" size="24" /></td>
		</tr>
		<tr>
			<td colspan="2"><input type="file" name="attach" size="24" /></td>
		</tr>
		<tr>
			<td colspan="2"><input type="file" name="attach" size="24" /></td>
		</tr>
		<tr>
			<td colspan="2"><input type="file" name="attach" size="24" /></td>
		</tr>
		</table>
	</td>
	<td>
		<table border="1" bgcolor="ffffff">
		<tr>
			<th colspan="2">Current Attachments</th>
		</tr>
		<tr bgcolor="c0c0c0">
			<td>
				<select name="selected_attach" size="7">
					||begin_attach||
						<option value="||attach_fname||">||attach_name|| (||attach_ksize||k)</option>
					||end_attach||
				</select>
			</td>
			<td><input type="submit" name="attach_del" value="Delete" onclick="this.form.cmd.value='';" /></td>
		</tr>
		<tr bgcolor="c0c0c0">
			<td colspan="2">Total Size = ||attach_total_ksize||k</td>
		</tr>
		</table>
	</td>
	||ifnempty||keep_attach_size||
		<td>
			<table border="1" bgcolor="ffffff">
			<tr>
				<th colspan="2">Saved Attachments</th>
			</tr>
			<tr bgcolor="c0c0c0">
				<td>
					<select name="selected_keep_attach" size="7">
						||begin_keep_attach||
							<option value="||attach_fname||">||attach_name|| (||attach_ksize||k)</option>
						||end_keep_attach||
					</select>
				</td>
				<td>
					<a href="javascript:keepAttachAdd()"><img border="0" src="||nwimg||/addattach.gif" alt="Add Saved Attachment" /></a><br />
					<input type="submit" name="keep_attach_del" value="Delete" onclick="this.form.page.value='attachf';this.form.cmd.value='';" />
				</td>
			</tr>
			<tr bgcolor="c0c0c0">
				<td colspan="2">Total Size = ||keep_attach_total_ksize||k</td>
			</tr>
			</table>
		</td>
	||endif||
</tr>
</table>
</form>
</body></html>
