 <a name="postcomment" id="postcomment"></a>
<script language="JavaScript" type="text/javascript">
<!--
function chkf() {ldelim}
	errors = "";
if (document.f.author.value == "") {ldelim}
		alert("{$lang.noauthor}  ");
		document.f.author.focus();
		errors = "1";
		return false;
	{rdelim}
	
	if (document.f.text.value.length <=  5 ) {ldelim}
		alert("{$lang.error_notext}  ");
		document.f.text.focus();
		errors = "1";
		return false;
	{rdelim}
	
	if (document.f.text.value.length > {$maxpostlength} ) {ldelim}
		alert('{$lang.error_once} {$lang.error_tomuchtext} {literal}' + f.text.value.length + '{/literal}  {$lang.max_post_length_t} {$maxpostlength}  ');
		document.f.text.focus();
		errors = "1";
		return false;
	{rdelim}
	
	if (errors == "") {ldelim}
		document.f.sendmessage.disabled = true;
		return true;
	{rdelim}
}

var postmaxchars = "{$maxpostlength}";

function beitrag(theform) {ldelim}
	if (postmaxchars != 0) message = " {$lang.max_post_length_t} "+postmaxchars+"";
	else message = "";
	alert("{$lang.post_length_t} "+theform.text.value.length+" "+message);
{rdelim}

var formfeld = "";
var maxlang = "{$maxpostlength}";
				
function zaehle() {ldelim} 
	if (window.document.f.text.value.length>"5000") {ldelim}
		window.document.newc.f.value=formfeld;
		return;
	{rdelim} else {ldelim}
		formfeld=window.document.f.text.value;
		window.document.f.zeichen.value=maxlang-window.document.f.text.value.length;
	{rdelim}
{rdelim}
//-->
 </script>
<!-- FORM -->
<form action="index.php?p=guestbook&amp;action=new&amp;area={$area}" method="post" name="f" id="f" onsubmit="return chkf();">
  <table width="100%" border="0" cellpadding="4" cellspacing="1">
    <tr>
      <td width="20%" nowrap="nowrap" class="row_first">{$lang.gauthor}</td>
      <td valign="top" class="row_second"><input name="author"  type="text" class="inputfield" id="author" value="{$lang.gguest}" size="40" /></td>
    </tr>
    {if $bbcodes} {/if}
    <tr>
      <td valign="top" nowrap="nowrap" class="row_first">{$lang.gemail}</td>
      <td valign="top" class="row_second"><input name="email"  type="text" class="inputfield" id="email" size="40" /></td>
    </tr>
    <tr>
      <td valign="top" nowrap="nowrap" class="row_first">{$lang.ghttp}</td>
      <td valign="top" class="row_second"><input name="http"  type="text" class="inputfield" id="http" size="40" /></td>
    </tr>
    <tr>
      <td valign="top" nowrap="nowrap" class="row_first">{$lang.gauthfrom}</td>
      <td valign="top" class="row_second"><input name="from"  type="text" class="inputfield" id="from" size="40" /></td>
    </tr>
    <tr>
      <td valign="top" nowrap="nowrap" class="row_first">{$comment} {if $smilie == 1}
        <fieldset class="fieldset">
        <legend> {$lang.smilies_t} </legend>
        {$smilies2} {$listemos}
        </fieldset>
        {/if} </td>
      <td valign="top" class="row_second">{if $bbcodes}{include file="guestbook/format.tpl"} {/if}
        <textarea name="text" cols="35" rows="10" class="inputfield" style="width:80%" onfocus="getActiveText(this)"  onchange="getActiveText(this)" onclick="getActiveText(this)" onkeyup="javascript:zaehle()"></textarea>
        <br>
        <input onclick="closeall();" type="submit" class="button"  value="{$lang.send}" />
        <input onclick="closeall();beitrag(document.f);" class="button" type="button"  value="{$lang.checklength}" />
      </td>
    </tr>
  </table>
</form>
<!-- FORM -->
