<!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||
||undef||fdisplay||
||ifdef||use_surgemail_xfile||
	||define||fdisplay||filestore||
||else||
	||ifnempty||keep_attach_size||
		||define||fdisplay||attach||
	||endif||
||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.page.value = '';
		document.returnform.cmd.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();
}

||undef||mac_download_fix||
||ifdef||is_mac||
	||ifgreater||ie_version||4.9||
		||define||mac_download_fix||true||
	||endif||
||endif||
function keepAttachGet(){
||ifdef||mac_download_fix||
	var down = "";
	for (i=0;i<document.returnform.selected_keep_attach.length;i++) {
		if (document.returnform.selected_keep_attach[i].selected) {
			down = document.returnform.selected_keep_attach[i].value;
		}
	}
	url = "||action||/" + down + "?cmd=keep_attach_get&page=attach.tpl&selected_keep_attach="+down;
	url = url + "&utoken=||utoken||/" + down;
	openwindow(url);
||else||
	document.returnform.cmd.value='keep_attach_get';
	document.returnform.page.value = 'attachf.tpl';
	document.returnform.submit();
||endif||
}

function sp_Get(){
||ifdef||mac_download_fix||
	var down = "";
	for (i=0;i<document.returnform.share_file.length;i++) {
		if (document.returnform.share_file[i].selected) {
			down = document.returnform.share_file[i].value;
		}
	}
	url = "||action||/" + down + "?cmd=fileshare_get&page=attachf.tpl&share_fld=web/private&share_file="+down;
	url = url + "&utoken=||utoken||/" + down;
	openwindow(url);
||else||
	document.returnform.cmd.value='fileshare_get';
	document.returnform.page.value = 'attachf.tpl';
	document.returnform.submit();
||endif||
}

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

function sp_Add(){
	document.returnform.cmd.value='fileshare_attach';
	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="||html_text||content_type||" />

	<input type="hidden" name="language" value="||language||" />

	<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||" />
	<input type="hidden" name="share_fld" value="web/private" />
<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 the files to use then press attach:</td>
			<td align="right">
				<a href="javascript:attachFiles()"><img src="||nwimg||/addattach.gif" border="0" alt="Attach the selected file(s)" name="attach_send" /></a>
				||ifequal||fdisplay||attach||
					<a href="javascript:saveAttachFiles()"><img src="||nwimg||/store.gif" border="0" alt="Store Selected file(s) on the ||cust_title|| server for sending later" name="keep_attach_send" /></a>
				||endif||
				||ifequal||fdisplay||filestore||
					<a href="javascript:save_sp_Files()"><img src="||nwimg||/store.gif" border="0" alt="Store Selected file(s) on the ||cust_title|| server 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="||href_text||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>
	||ifequal||fdisplay||attach||
		<td>
			<table border="1" bgcolor="ffffff">
			<tr>
				<th colspan="2">Stored on Server</th>
			</tr>
			<tr bgcolor="c0c0c0">
				<td>
					<select name="selected_keep_attach" size="7">
						||begin_keep_attach||
							<option value="||href_text||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="Attach selected stored file(s) to this message" /></a><br />
					<a href="javascript:keepAttachGet()"><img border="0" src="||nwimg||/getattach.gif" alt="Get selected stored file" /></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||
	||ifequal||fdisplay||filestore||
		||define||share_fld||web/private||
		<td>
			<table border="1" bgcolor="ffffff">
			<tr>
				<th colspan="2">Stored on Server</th>
			</tr>
			<tr bgcolor="c0c0c0">
				<td>
					<select name="share_file" size="7">
						||begin_fileshare_files||
							||define||xsize||(||add||xsize||file_size||)||
							<option value="||href_text||full_file_name||">||file_name|| (||file_ksize||k)</option>
						||end_fileshare_files||
					</select>
				</td>
				<td>
					<a href="javascript:sp_Add()"><img border="0" src="||nwimg||/addattach.gif" alt="Attach selected stored file(s) to this message" /></a><br />
					<a href="javascript:sp_Get()"><img border="0" src="||nwimg||/getattach.gif" alt="Get selected stored file" /></a><br />
					<input type="submit" name="fileshare_file_delete" value="Delete" onclick="this.form.page.value='attachf';this.form.cmd.value='';" />
				</td>
			</tr>
			<tr bgcolor="c0c0c0">
				<td colspan="2">Total Size = ||div||xsize||1024||k</td>
			</tr>
			</table>
		</td>
	||endif||

</tr>
</table>
</form>
</body></html>

