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

<form name="post" method="post" action="guestbook.php" onSubmit="return chkFormular()">
  <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="$border">
    <tr> 
      <td align="center" bgcolor="$bghead" class="title">new entry</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"> <table border="0" cellspacing="0" cellpadding="2">
                <tr> 
                  <td>your name:</td>
                  <td><input name="gbname" type="text" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'" size="40"> 
                  </td>
                </tr>
                <tr> 
                  <td>your e-mail:</td>
                  <td><input name="gbemail" type="text" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'" size="40"></td>
                </tr>
                <tr> 
                  <td>Icq#:</td>
                  <td><input name="icq" type="text" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'" size="40"></td>
                </tr>
                <tr> 
                  <td>your homepage:</td>
                  <td><input name="gburl" type="text" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'" value="http://" size="40"></td>
                </tr>
                <tr> 
                  <td colspan="2">Security Code:</td>
                </tr>
                <tr> 
                  <td>$captcha</td>
                  <td><input name="captcha" type="text" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'" value="" size="5"><input name="captcha_hash" type="hidden" value="$hash"></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td colspan="4">your message:<br> <textarea name="message" rows="5" cols="35" style="width:100%;" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">$message</textarea></td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
            <td valign="bottom" align="right"> <input name="save" type="submit" value="submit"></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
