<!--
Copyright by Thomas Bley 2002-2003
thomas.bley@simple-groupware.de

http://www.simple-groupware.de
-->
<html>
<head>
	<title>Webmail by Thomas Bley - Simple Groupware Solutions - more.groupware</title>
    <meta http-equiv="content-type" content="text/html; charset={$charset}">
	<link rel="SHORTCUT ICON" href="{$imgpathmaster}/favicon.ico">
	<link rel="icon" href="{$imgpathmaster}/favicon.ico" type="image/ico">
	<SCRIPT LANGUAGE="JavaScript" SRC="templates/default/js/autocomplete.js"></SCRIPT>

	<script type="text/javascript" src="templates/default/htmlarea/htmlarea.js"></script>
	<script type="text/javascript" src="templates/default/htmlarea/htmlarea-lang-en.js"></script>
	<script type="text/javascript" src="templates/default/htmlarea/dialog.js"></script>

{literal}
	<script type="text/javascript">
		var editor = null;
		function initEditor() {
		  editor = new HTMLArea("msgbody");

		var config = editor.config;

		config.toolbar = [
			 [ "fontname", "space" ],
			 [ "fontsize", "space" ],
			 [ "formatblock", "space"],
			 [ "bold", "italic", "underline", "separator" ],
			 [ "justifyleft", "justifycenter", "justifyright", "justifyfull", "separator" ],
			 [ "insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator" ],
			 [ "forecolor", "hilitecolor" ],
			 [ "createlink", "inserttable", "htmlmode"]
		];

//		  cfg.pageStyle = "body { background-color: #DFDFDF; color: #000080; }";
		  editor.generate();
		}
	</script>

<style type="text/css">
<!--

@import url(templates/default/htmlarea/htmlarea.css);

body {scrollbar-face-color: #E4E4E4; scrollbar-shadow-color: #000000;scrollbar-highlight-color: #FFFFFF; scrollbar-3dlight-color: #999999;scrollbar-darkshadow-color: #999999; scrollbar-track-color: #F3F3F3;scrollbar-arrow-color: #000000;
  BORDER-LEFT:#434343 1px solid;
}
td {  font-family: Arial, Helvetica,sans-serif; font-size: 10pt; font-variant: normal; text-transform: none; color: #000000}
a:hover {  color: #CC0000; text-decoration: underline}
.styletextfield { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; text-transform: none; text-decoration: none; width: 200px}
.styletextfield2 { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; text-transform: none; text-decoration: none; width: 450px}

.submit {
    background:#D1D1D1;
    color:#333333;
    font-size:8pt;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-weight:bold;
}

-->
{/literal}
</style>

<script language="JavaScript">
var custom_font = '{$custom_font|addslash}';
var custom_font_size = '{$custom_font_size|addslash}';

{literal}

function submitonce(theform){
  if (document.all||document.getElementById){
    for (i=0;i<theform.length;i++){
      var tempobj=theform.elements[i]
        if(tempobj.type.toLowerCase()=="submit")
        tempobj.disabled=true
    }
  }
}

function formURL(){
  if (document.f1.Ekit)
  document.f1.msgbody.value = document.f1.Ekit.getDocumentText();
  if (formURL.arguments[0] == 1)
  document.f1.action="attachments.php";
  if (formURL.arguments[0] == 2)
  document.f1.action="sendmail_post.php";
  if (formURL.arguments[0] == 3)
  document.f1.action="sendmail_post.php?saveto=draft";
  if (formURL.arguments[0] == 4)
  document.f1.action="sendmail.php?reset=true";
  if (formURL.arguments[0] == 6)
  document.f1.action="sendmail.php?enable_cc_bcc2=true";
  if (formURL.arguments[0] == 7)
  document.f1.action="sendmail.php?enable_cc_bcc2=no";
}

function adder(this1,this2) {
  if (this1.form.options.selectedIndex != -1) {
    if (this2.value != '') this2.value+=', '; 
    this2.value+=this1.form.options[this1.form.options.selectedIndex].value; 
  }
}  

function adder2(this2) {
  autoComplete(this2,this2.form.options,'text',false)
}

function return_height() {
  Browser = navigator.appName;
  if (navigator.appName.substring(0,9) == "Microsoft") Browser = 'MSIE';
  if (Browser != 'MSIE') {
      return (innerHeight-4);
    } else {
      return (document.body.clientHeight-2);
      }
}

{/literal}
</script>

</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" link="#1F4687" vlink="#1F4687" alink="#1F4687" bgcolor="#F3F3F3" onload="initEditor()">

<center>

<table border="0" cellpadding="0" cellspacing="0" height="100%" width="98%"><tr><td>
<script>
document.write('<img src="templates/default/media/spacer.gif" width="1" height="'+return_height()+'">');
</script>
</td><td valign="top" align="center">

<img src="templates/default/media/spacer.gif" alt="" width="1" height="10" border="0"><br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#D1D1D1"><td>
&nbsp;<font color="#4E4E4E"><b> {$username} - {$hashmap.sendmail_write_a_new_email}</b></font>
</td></tr></table>

<img src="templates/default/media/spacer.gif" alt="" width="1" height="10" border="0"><br>
<table border='0' cellspacing='0' cellpadding='1'>
<form name='f1' method='post' action='sendmail_post.php' onSubmit='submitonce(this)'>
<input type="hidden" name="{$SESSIONNAME}" value="{$SESSIONID}">			
<tr>
<td align="center" colspan="2">
<table border='0' cellspacing='0' cellpadding='1' bgcolor='#999999'><tr><td>
  <table width='100%' border='0' cellspacing='0' cellpadding='1' bgcolor='#DFDFDF'>
  <tr>
    <td></td>
	<td height='6'><img src='templates/default/media/spacer.gif' width='20' height='6'></td>
    <td height='6'><img src='templates/default/media/spacer.gif' width='110' height='6'></td>
    <td height='6'><img src='templates/default/media/spacer.gif' width='10' height='6'></td>
    <td width='502' height='6' colspan="3"><img src='templates/default/media/spacer.gif' width='500' height='6'></td>
	<td height='6'><img src='templates/default/media/spacer.gif' width='5' height='6'></td>
    <td></td>
  </tr>
  <tr>
	<td width="50%"></td>
    <td width='20' nowrap>&nbsp;</td>
    <td width='110' nowrap><b><font color='#4E4E4E'>{$hashmap.sendmail_search}</font></b></td>
    <td width='10' align='center'><b><font color='#4E4E4E'>:</font></b></td>
    <td colspan="3" nowrap>
    <input style="width:233" ONKEYUP="adder2(this)" type='text' name='toadder' class='styletextfield' value="">
    <SELECT NAME="options" onChange="this.form.toadder.value=this.options[this.selectedIndex].value" style="width:265">
	    <option value="">{$hashmap.sendmail_selection}
      {$contacts|smarty:nodefaults}
	  </SELECT></td>
	  <td width="50%"></td>
  </tr>
  <tr>
    <td height='6' colspan="9"><img src='templates/default/media/spacer.gif' width='1' height='6'></td>
  </tr>
  {if $account_count neq 1}
  <tr>
    <td></td>
    <td width='20' nowrap>&nbsp;</td>
    <td width='110' nowrap><b><font color='#4E4E4E'>{$hashmap.sendmail_fromform}</font></b></td>
    <td width='10' align='center'><b><font color='#4E4E4E'>:</font></b></td>
    <td colspan="3">
	  <select name="von" style="width:502">
	  {section name=von2 loop=$settings_von}
		<option value="{$settings_von[von2][0]}" {if ($settings_von[von2][0] eq $von && $von neq "") || ($settings_von[von2][0] eq $wm2_default_account)}selected{/if}>{$settings_von[von2][1]}
	  {/section}
	  </select></td>
    <td></td>
  </tr>
  {else}
  <input type="Hidden" name="von" value="{$settings_von[0][0]}">
  {/if}
  <tr>
    <td></td>
    <td width='20' nowrap>&nbsp;</td>
    <td width='110' nowrap><b><font color='#4E4E4E'>{$hashmap.sendmail_toform}</font></b></td>
    <td width='10' align='center'><b><font color='#4E4E4E'>:</font></b></td>
    <td colspan="3" nowrap>
	  <input style="width:470" type='text' name='to' class='styletextfield' value="{$to}">      
      <input type="Button" onclick="adder(this,this.form.to)" class="submit" value="<<"></td>
    <td></td>
  </tr>
  {if $enable_cc_bcc eq "true"}
  <tr>
    <td></td>
    <td width='20' nowrap>&nbsp;</td>
    <td width='110' nowrap><b><font color='#4E4E4E'>{$hashmap.sendmail_cc}</font></b></td>
    <td width='10' align='center'><b><font color='#4E4E4E'>:</font></b></td>
    <td colspan="3">
	  <input style="width:470" type='text' name='cc' class='styletextfield' value="{$cc}">
      <input type="Button" onclick="adder(this,this.form.cc)" class="submit" value="<<"></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td width='20' nowrap>&nbsp;</td>
    <td width='110' nowrap><b><font color='#4E4E4E'>{$hashmap.sendmail_bcc}</font></b></td>
    <td width='10' align='center'><b><font color='#4E4E4E'>:</font></b></td>
    <td colspan="3">
	  <input style="width:470" type='text' name='bcc' class='styletextfield' value="{$bcc}">
      <input type="Button" onclick="adder(this,this.form.bcc)" class="submit" value="<<"></td>
	</td>
    <td></td>
  </tr>
  {else}
  <input type="Hidden" name="{$cc}" value="cc">
  <input type="Hidden" name="{$bcc}" value="bcc">
  {/if}
  <tr>
    <td></td>
    <td width='20' nowrap>&nbsp;</td>
    <td width='110' nowrap><b><font color='#4E4E4E'>{$hashmap.sendmail_subjectform}</font></b></td>
    <td width='10' align="center"><b><font color='#4E4E4E'>:</font></b></td>
    <td colspan="3" nowrap><input type='text' name='subject' class='styletextfield2' style="width:446" value="{$subject}">
    {if $enable_cc_bcc eq "true"}
      <input type='submit' class='submit' name='submitHTML' value='{$hashmap.sendmail_less}' onClick="formURL('7');">
    {else}
      <input type='submit' class='submit' name='submitHTML' value='{$hashmap.sendmail_more}' onClick="formURL('6');">
    {/if}
	</td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td width='20' nowrap>&nbsp;</td>
    <td width='110' valign="top"><input type='submit' class='submit' name='submitX' value='{$hashmap.sendmail_attachments}' class='stilbutton' onClick="formURL('1')" ></td>
    <td width='10' align='center' valign="top"><b><font color='#4E4E4E'>:</font></b></td>
	<td colspan="3">
		<table border="0" cellpadding="0" cellspacing="0" width="502">
			<tr>
				<td>
				  {section name=attachment loop=$attaches}
				  {$attaches[attachment]|smarty:nodefaults}
				  {/section}
				</td>
				<td align="right">
					<table border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td nowrap><b><font color='#4E4E4E'>{$hashmap.sendmail_priority} </font></b></td>
						<td><select name="priority"><option value="1" {$prio[1]}>{$hashmap.sendmail_highest}<option value="2" {$prio[2]}>{$hashmap.sendmail_high}<option value="3" {$prio[3]}>{$hashmap.sendmail_normal}<option value="4" {$prio[4]}>{$hashmap.sendmail_low}<option value="5" {$prio[5]}>{$hashmap.sendmail_lowest}</select></td>
					</tr>
					</table>
				</td>
			</tr>
		</table>
	</td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td height='6'></td>
    <td height='6'></td>
    <td height='6'><img src='templates/default/media/spacer.gif' width='10' height='6'></td>
    <td width='370' height='6'></td>
    <td></td>
  </tr>
  </table>
</td></tr></table>
<img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>
</td>
</tr>
<tr>
<td bgcolor='#F3F3F3' colspan="2">

<script>
{if $enable_cc_bcc eq "true"}
  var height_textarea=return_height()-360;
{else}
  var height_textarea=return_height()-300;
{/if}
document.write('<textarea wrap="soft" name="msgbody" id="msgbody" cols="82" rows="16" wrap="off" class="stylemsgbody" style="width: 100%px; height: '+((height_textarea)>200?height_textarea:200)+'px;">');
</script>
{$msgbody}
</textarea>
</td>
</tr>
<tr>
  <td bgcolor='#F3F3F3' colspan="2">
    <img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>
    <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#999999"><tr><td>
	  <table width="100%" border="0" cellspacing="0" cellpadding="1" bgcolor="#DFDFDF"><tr><td>
		<input type="Checkbox" name="signit" value="checked" {$signit}> {$hashmap.sendmail_add_signature}
		<input type="Checkbox" name="sendplain" value="checked" {$sendplain}> {$hashmap.sendmail_sendplain}
	  </td><td align="right">
		<input type="Checkbox" name="notification" value="checked" {$notification}> {$hashmap.sendmail_notification}&nbsp;
	  </td></tr></table>
	</td></tr></table>
	<img src="templates/default/media/spacer.gif" alt="" width="1" height="5" border="0"><br>
  </td>
</tr>
<tr>
  <td>
    <input type='submit' class='submit' name='submitX' value='{$hashmap.sendmail_reset}' onClick="formURL('4');">
  </td>
  <td bgcolor='#F3F3F3' align='right'>
  <input type='submit' class='submit' name='submitME' value='{$hashmap.sendmail_save_as_draft}' class='stilbutton' onClick="formURL('3')" >
  <input type="Hidden" name="editmail" value="{$editmail}">
  <input type="Hidden" name="replyto" value="{$replyto}">
  <input type="Hidden" name="inreplyto" value="{$inreplyto}">
  <input type="Hidden" name="forward" value="{$forward}">
  &nbsp;
  <input type='submit' class='submit' name='submitX' value='{$hashmap.sendmail_send_mail}' onClick="formURL('2');">
  </td>
</tr>
</form>
</table>

<hr size="1">
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=4>
<FORM NAME="dict_form" METHOD="GET" ACTION="http://www.dictionary.com/cgi-bin/dict.pl" TARGET="_new" >
<TR><TD VALIGN=MIDDLE ALIGN=LEFT>{$hashmap.maillist_search_for}</td>
    <TD VALIGN=MIDDLE ALIGN=LEFT><INPUT TYPE="TEXT" NAME="term" MAXLENGTH=48 VALUE=""></td>
    <TD VALIGN=MIDDLE ALIGN=LEFT><SELECT NAME="db">
                                    <OPTION VALUE="*">Dictionary.com</OPTION>
                                    <OPTION VALUE="roget">Thesaurus.com</OPTION>
                                    <OPTION VALUE="WEB">Google</OPTION>
                                 </SELECT>
    </td>
    <TD VALIGN=MIDDLE ALIGN=LEFT><INPUT TYPE="SUBMIT" VALUE="{$hashmap.maillist_ok}"></td>
</FORM>
	<td>&nbsp;</td>
<FORM NAME="dict_form" METHOD="GET" ACTION="http://dict.leo.org/?" TARGET="_new" >
	<TD VALIGN=MIDDLE ALIGN=LEFT>{$hashmap.translate}</td>
    <TD VALIGN=MIDDLE ALIGN=LEFT><INPUT TYPE="TEXT" NAME="search" MAXLENGTH=48 VALUE=""></td>
    <TD VALIGN=MIDDLE ALIGN=LEFT><INPUT TYPE="SUBMIT" VALUE="{$hashmap.maillist_ok}"></td></tr>
</FORM>
</TABLE>

</td></tr>
</table>


</center>
</body>
</html>
