<script language="JavaScript" type="text/javascript">
<!--
function chkFormular() {
	if(document.post.title.value == "") {
		alert("You have to enter a title!");
		document.post.title.focus();
   		return false;
	}
	
	if(document.post.message.value == "") {
		alert("You have to enter a message!");
		document.post.message.focus();
   		return false;
	}
}

-->
</script>

<form method="post" action="messenger.php" name="post" onSubmit="return chkFormular()">
  <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="$border">
    <tr> 
      <td class="title" align="center" bgcolor="$bghead">new message</td>
    </tr>
    <tr> 
      <td bgcolor="$pagebg"></td>
    </tr>
    <tr> 
      <td bgcolor="$bg1">
<table width="100%" border="0" align="center" cellpadding="4" cellspacing="0" class="formtable">
          <tr> 
            <td colspan="2" valign="top"><b>title:</b><br> <input name="title" type="text" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'" size="60"> 
            </td>
          </tr>
          <tr>
            <td colspan="2" valign="top"><b>to:</b><br><i>enter username</i><br><input name="touser_field" type="text" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'" size="60"></td>
          </tr>
          <tr>
            <td><i>or select from Buddylist</i><br> <select name="touser[]" size="1">$user
              </select>
            </td>
          </tr>
          <tr>
            <td colspan="2"><b>formation</b><br>$addbbcode</td>
          </tr>
          <tr> 
            <td colspan="2"><b>your message:</b><br> <textarea name="message" cols="35" rows="10" style="width:100%;" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'"></textarea></td>
          </tr>
          <tr> 
            <td width="100%" height="80" align="right" valign="bottom">$admin<br>
              <br> <input type="submit" name="send" value="send message"></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
