<!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;
	font-weight: "bold";
}

td.small{
	font: 8pt "Arial";
    color: black;
}

input{
	font: 8pt "Arial";
    color: black;
}
//-->
</style>

<script type="text/javascript">
<!--
function newwindow()
{
	msgWindow = open('||action||?process=addr_only&amp;cmd=msg_new&amp;utoken=||putoken||&amp;&amp;','ADDRESSBOOK','width=600,height=250,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 setTitle(){
	||ifequal||top||_top||
		window.top.document.title = "||cust_title|| - ||current_user|| - Create new bulletin";
	||endif||
}

function setSig(){
	if(document.sendform._default_profile.options[0].selected){
		document.sendform.addsig.value = "off";
	}
	else{
		document.sendform.addsig.value = "on";
	}
}

function setBody(url){
	if(parent.frames[1].itembody != "true"){
		parent.frames[1].document.location.replace(url);
	}
}

function mySend(cmd){
	document.sendform.message.value = window.parent.frames[1].document.bodyform.message.value;
	document.sendform.cmd.value = cmd;
	document.sendform.submit();
}

||ifdef||netscape_version||
function hotkey(event){
	switch (event.which) {
||else||
function hotkey(event){
	switch (event.keyCode) {
||endif||
	   case 10 : // Ctrl-Enter || Ctrl-Shift-J - send
			mySend("send_bulletin");
			break;
	   case 2 : // Ctrl-Shift-B - open address book
			newwindow();
			break;
	   case 19 : // Ctrl-Shift-S - check spelling
			mySend("spell_check");
			break;
	   case 1 : // Ctrl-Shift-A - add attachment
			mySend("add_attach");
			break;
	   default :
			break;
	}
}

function hotkeyoverload(){
	hotkey(event);
}

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

var wys=false;
||undef||wys||
||ifdef||show_wysiwyg||
	||ifequal||_auto_wysiwyg||true||
		||define||wys||true||
		||define||msg_alternative||true||
		wys=true;
	||else||
		||ifequal||msg_alternative||true||
			||define||wys||true||
			wys=true;
		||endif||
	||endif||
||endif||

function wys_update()
{
	if (wys) {
		window.parent.frames[1].wys_update();
	}
}

function do_wys()
{
	wys_update();
	document.sendform.message.value = window.parent.frames[1].document.bodyform.message.value;
	document.sendform.cmd.value = "attach_msg";
	document.sendform.page.value = "send_bullf";
	if (wys) {
		document.sendform.msg_alternative.value="";
		document.sendform.content_type.options[0].selected = true;
		document.sendform._auto_wysiwyg.value="false";
	}
	else {
		document.sendform.msg_alternative.value="true"; 	
		document.sendform._auto_wysiwyg.value="true";
	}
	parent.frames[1].itembody = "false";
	document.sendform.submit();
}



//-->
</script>

<title>Create new bulletin</title>
</head>

<body background="||cust_panel_background||" bgcolor="||cust_panel_bgcolor||" onload="setTitle();setBody('||action||?cmd=show&amp;page=itembody&amp;utoken=||utoken||&amp;&amp;');">

||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="sendform" method="post" action="||action||" target="_self" onsubmit="document.sendform.message.value = window.parent.frames[1].document.bodyform.message.value;"> 
	<input type="hidden" name="isbulletin" value="true" />
	<input type="hidden" name="utoken" value="||utoken||" />
	<input type="hidden" name="cmd" value="" />
	<input type="hidden" name="page" value="" /> 
	<input type="hidden" name="msg_alternative" value="||wys||" />
	<input type="hidden" name="_auto_wysiwyg" value="||_auto_wysiwyg||" />
	<input type="hidden" name="wys_message" value="" />
	<input type="hidden" name="attach_id" value="||attach_id||" />
<input type="hidden" name="message" value="||ifdef||message_headers||&nbsp;
&nbsp;
----- Message Forwarded on ||date_today||date_layout|| -----
From: ||from||
To: ||to||
||ifdef||cc||Cc: ||cc||
||endif||Subject: ||subject||
Date: ||date||
||endif||||html_line||quote_body||" />

<table cellspacing="0" cellpadding="1" rules="none" border="0" width="100%">
<tr bgcolor="#d6d6ce">
	<td align="center" class="small" nowrap="nowrap">Signature</td>
	<td align="center" class="small" nowrap="nowrap">Content/Type</td>
	<td width="100%">&nbsp;</td>
</tr>
<tr bgcolor="#d6d6ce">
	<td>
		<input type="hidden" name="addsig" value="on" ||ifnempty||addsig||checked="checked"||endif|| />
		<select name="_default_profile" size="1" onchange="setSig();">
			<option value="">(none)</option>
			||begin_profile||
				||ifnequal||_default_profile||profile_name||
					<option>||profile_name||</option>
				||else||
					<option selected="selected">||profile_name||</option>
				||endif||
			||end_profile||
		</select>
	</td>
	<td>
		<select name="content_type" size="1">
			<option selected="selected" value="">Plain Text</option>
			<option ||ifequal||content_type||text/html||selected="selected"||else|| ||ifdef||wys||selected="selected"||endif|| ||endif||>text/html</option>
			<option>text/plain; charset="iso-8859-1"</option>
			<option>text/plain; charset="iso-2022-jp"</option>
		</select>
	</td>
	<td width="100%">&nbsp;</td>
</tr>
</table>
<table>
	<tr>
		<td align="right">From:</td>
		<td align="left"><input name="reply" size="24" value="||html_text||reply||" /></td>
		<td rowspan="2" align="left" nowrap="nowrap">
			<a href="javascript:wys_update(); mySend('spell_check')"><img border="0" src="||nwimg||/spell.gif" alt="Check Spelling (Ctrl-Shift-S)" /></a>
			<a href="javascript:wys_update(); mySend('add_attach')"><img border="0" src="||nwimg||/attach.gif" alt="Attach files (Ctrl-Shift-A)" /></a>
			<a href="javascript:wys_update(); mySend('send_bulletin');"><img alt="Send (Ctrl-Enter)" border="0" src="||nwimg||/send.gif" /></a>
		</td>
	</tr>
	<tr>
		<td align="right">For Users:</td>
		<td align="left"><input name="valid_users" size="24" value="||ifdef||valid_users||||valid_users||||else||*||endif||" /></td>
	</tr>
	<tr>
		<td align="right">Valid Till:</td>
		<td align="left">
			||ifequal||date_format||dmy||
				<input name="valid_day" size="2" value="||valid_day||" />/
				<input name="valid_month" size="2" value="||valid_month||" />/
			||else||
				<input name="valid_month" size="2" value="||valid_month||" />/
				<input name="valid_day" size="2" value="||valid_day||" />/
			||endif||
			<input name="valid_year" size="4" value="||valid_year||" />
		</td>
		<td align="left">Max Date: ||valid_max||<input type="hidden" name="valid_max" value</td>
		<td>
				||ifdef||wysiwyg_img||
					||ifdef||show_wysiwyg||
						<a href="javascript: do_wys();"><img border="0" src="||nwimg||/||ifdef||wys||textmode.gif" name="Text Mode" alt="plain text editor||else||wysiwyg.gif" name="wysiwyg" alt="Styletext editor (What You See Is What You Get)||endif||" /></a>
					||endif||
				||endif||
		</td>
	</tr>
	<tr>
		<td align="right">Attached:</td>
		<td align="left">
			||ifequal||attach_num||0||
				(none)
			||else||
				||begin_attach||
					<b>||attach_name||</b> (||attach_ksize||k),
				||end_attach||
			||endif||
		</td>
	</tr>
	<tr>
		<td>Subject:</td>
		<td colspan="2"><input name="subject" size="66" value="||subject||" /></td>
	</tr>
</table>
</form>
||copyright||
</body>
</html>
