<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 text!");
		document.post.message.focus();
   		return false;
	}
	
}
-->
</script>

<form action="articles.php?action=save" method="post" name="post" onSubmit="return chkFormular()">
  <table width="100%" cellspacing="1" cellpadding="2" bgcolor="$border">
    <tr> 
      <td class="title" align="center" bgcolor="$bghead">new article</td>
    </tr>
    <tr> 
      <td bgcolor="$pagebg"></td>
    </tr>
    <tr> 
      <td bgcolor="$bg1"><table width="100%" border="0" cellspacing="0" cellpadding="2" class="formtable">
          <tr> 
            <td valign="top">$addbbcode</td>
            <td valign="top">$addflags</td>
          </tr>
          <tr> 
            <td colspan="2"><hr noshade size="1" color="$border"></td>
          </tr>
          <tr align="center"> 
            <td colspan="2"><b>Title: 
              <input name="title" type="text" value="$title" size="72" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">
              Options:&nbsp;&nbsp;</b>&#8226; HTML is <b><u>ON</u></b> &nbsp;&nbsp;&nbsp;&#8226; 
              <a href="javascript:MM_openBrWindow('code.php','BBCode','scrollbars=yes,width=600,height=500')">BBCode</a> 
              is <b><u>ON</u></b> &nbsp;&nbsp;&nbsp;&#8226; <a href="javascript:MM_openBrWindow('smileys.php','Smileys','scrollbars=yes,width=340,height=500')">Smilies</a> 
              are <b><u>ON</u></b></td>
          </tr>
          <tr align="center"> 
            <td colspan="2"><textarea name="message" rows="20" cols="145" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">$message</textarea> 
              <br> </td>
          </tr>
          <tr> 
            <td colspan="2">&nbsp; 
              <input name="upload" type="button" class="button" onClick="MM_openBrWindow('upload.php?articlesID=$articlesID','Upload','scrollbars=yes,width=800,height=600')" value="upload images">
            </td>
          </tr>
          <tr> 
            <td colspan="2"><hr noshade size="1" color="$border"></td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="2" class="formtable">
          <tr> 
            <td>Link 1: 
              <input name="link1" type="text" value="$link1" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'"> 
			  <input name="url1" type="text" value="$url1" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">
              $window1</td>
          </tr>
          <tr> 
            <td>Link 2: 
              <input name="link2" type="text" value="$link2" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'"> 
			  <input name="url2" type="text" value="$url2" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">
              $window2</td>
          </tr>
          <tr> 
            <td>Link 3: 
              <input name="link3" type="text" value="$link3" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'"> 
			  <input name="url3" type="text" value="$url3" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">
              $window3</td>
          </tr>
          <tr> 
            <td>Link 4: 
              <input name="link4" type="text" value="$link4" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'"> 
			  <input name="url4" type="text" value="$url4" class="form_off" onFocus="this.className='form_on'" onBlur="this.className='form_off'">
              $window4</td>
          </tr>
          <tr> 
            <td><hr noshade size="1" color="$border"></td>
          </tr>
          <tr> 
            <td align="right">
			  <input type="hidden" name="articlesID" value="$articlesID"> 
              <input type="hidden" name="userID" value="$userID">
			  <select name="comments">$comments</select> 
			  <input name="post" type="submit" value="edit Article"> 
              <input name="button" type="button" class="button" onClick="window.close()" value="cancel"></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>

