<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">reply to topic</td>
    </tr>
    <tr> 
      <td bgcolor="$pagebg"></td>
    </tr>
    <tr> 
      <td bgcolor="$bg1"> 
        <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" class="formtable">
          <tr> 
            <td colspan="4"><b>title:</b><br> <input type="text" name="title" size="60" value="$title" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'"></td>
          </tr>
          <tr> 
            <td colspan="4">$addbbcode</td>
          </tr>
          <tr> 
            <td colspan="4"><b>your message:</b><br> 
              <textarea name="message" cols="35" rows="15" style="width:100%;" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">$message</textarea></td>
          </tr>
          <tr> 
            <td><b>options:</b><br> <span class="small">HTML is OFF<br>
              <a href="javascript:MM_openBrWindow('code.php','BBCode','scrollbars=yes,width=600,height=500')">BBCode</a> 
              is ON<br>
              <a href="javascript:MM_openBrWindow('smileys.php','Smileys','scrollbars=yes,width=340,height=500')">Smilies</a> 
              are ON</span> </td>
            <td colspan="-2" valign="bottom" align="right"> 
              <input type="hidden" name="id" value="$replytouser"> <input name="reply" type="submit" value="send message"> 
            </td>
          </tr>
        </table> </td>
    </tr>
  </table>
</form>