 <a name="postcomment" id="postcomment"></a>
 
<script language="JavaScript" type="text/javascript">
<!--
function chkf() {ldelim}
	errors = "";
	if (document.f.title.value == "") {ldelim}
		alert("{$lang.error_notopic}  ");
		document.f.title.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 > {$max_post_length} ) {ldelim}
		alert('{$lang.error_once} {$lang.error_tomuchtext} {literal}' + f.text.value.length + '{/literal}  {$lang.max_post_length_t} {$max_post_length}  ');
		document.f.text.focus();
		errors = "1";
		return false;
	{rdelim}
	
	if (errors == "") {ldelim}
		document.f.sendmessage.disabled = true;
		return true;
	{rdelim}
}

var postmaxchars = "{$max_post_length}";

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 = "{$max_post_length}";
				
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="{$formlink}" 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.title}</td>
      <td valign="top" class="row_second"><input name="title"  type="text" class="inputfield" id="title" size="40" />
      </td>
    </tr>
    {if $bbcodes}    {/if}
    <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="comments/format.tpl"} *}
	 {include file="comments/format_comments_site.tpl"}
	  
{/if}  
        <textarea name="text" cols="35" rows="7" class="inputfield" style="width:90%" 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 -->
