<script language="JavaScript" type="text/javascript">
<!--
function chkFormular() {
	if(document.post.topicname.value == "") {
		alert("You have to enter a topic!");
		document.post.topicname.focus();
   		return false;
	}
	
	if(document.post.message.value == "") {
		alert("You have to enter text!");
		document.post.message.focus();
   		return false;
	}
}
	
function ChangeFormAction() {
	if(document.post.preview.checked == true) {
		document.post.action = "index.php?site=forum&addtopic=true";
	}
	else {
		document.post.action = "forum.php";
	}
}
-->
</script>

<form action="forum.php" method="post" 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 topic</td>
    </tr>
    <tr> 
      <td bgcolor="$pagebg"></td>
    </tr>
    <tr> 
      <td bgcolor="$bg1">
	  
	  <table width="100%" align="center" cellpadding="2" cellspacing="0" class="formtable">
          <tr>
            <td colspan="2">
			<table width="100%" cellpadding="2" cellspacing="0">
                <tr> 
                  <td colspan="15"><b>topic-icon:</b></td>
                </tr>
                <tr> 
                  <td colspan="8"></td>
                </tr>
                <tr bgcolor="$bg1"> 
                  <td><input type="radio" class="input" name="icon" value="ausrufezeichen.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/ausrufezeichen.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="biggrin.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/biggrin.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="boese.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/boese.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="bored.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/bored.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="cool.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/cool.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="eek.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/eek.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="frage.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/frage.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="frown.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/frown.gif" width="15" height="15"></td>
                </tr>
                <tr bgcolor="$bg1"> 
                  <td><input type="radio" class="input" name="icon" value="lampe.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/lampe.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="mad.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/mad.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="pfeil.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/pfeil.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="smile.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/smile.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="text.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/text.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="thumb_down.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/thumb_down.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="thumb_up.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/thumb_up.gif" width="15" height="15"></td>
                  <td><input type="radio" class="input" name="icon" value="wink.gif" width="15" height="15"> 
                    <img src="images/icons/topicicons/wink.gif" width="15" height="15"></td>
                </tr>
                <tr bgcolor="$bg1"> 
                  <td colspan="4"><input type="radio" class="input" name="icon" value="0" width="15" height="15"> 
                    no icon</td>
                </tr>
              </table>
			</td>
          </tr>
          <tr>
            <td colspan="2"><b>subject:</b><br> <input name="topicname" type="text" class="form_off" id="topicname" style="width:100%;" onFocus="this.className='form_on'" onBlur="this.className='form_off'" value="$topicname" size="45"></td>
          </tr>
          <tr>
            <td colspan="2">$addbbcode</td>
          </tr>
          <tr>
            <td colspan="2"><textarea name="message" rows="10" cols="35" style="width:100%;" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">$message</textarea></td>
          </tr>
          <tr>
            <td colspan="2"><b>Options:</b> <span class="small">&#8226; HTML is 
              OFF&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8226; <a href="javascript:MM_openBrWindow('code.php','BBCode','scrollbars=yes,width=600,height=500')">BBCode</a> 
              is ON &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#8226; <a href="javascript:MM_openBrWindow('smileys.php','Smileys','scrollbars=yes,width=340,height=500')">Smilies</a> 
              are ON</span></td>
          </tr>
          <tr>
            <td>
				<input class="input" type="checkbox" name="notify" value="1"> Notify me when a reply is posted <br>
				<input class="input" type="checkbox" name="preview" value="1" onClick="ChangeFormAction()"> preview my post $chk_sticky</td>
            <td align="right" valign="bottom">
				
				<input type="hidden" name="board" value="$board"> 
				<input type="hidden" name="userID" value="$userID">
				<input type="hidden" name="addtopic" value="true">
				
				<input name="newtopic" type="submit" value="post new topic"></td>
          </tr>
        </table>
		
		
</td>
    </tr>
  </table>
</form>
