
<script language="javascript" src="{$jspath}/jvalidate.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!-- //
{include file="$incpath/other/validate_conf.tpl"}
{include file="$incpath/other/koobicode.js"}

$(document).ready(function()
{ldelim}
	$('div.leave_comment').toggleElements ({ldelim} fxAnimation:'slide', fxSpeed:'normal', className:'toggler',onClick:Panel_Comment_Closer,onHide:Panel_Comment_Opener{rdelim} );
{rdelim});
function Panel_Comment_Opener() {ldelim}$.cookie('navpanel_newcomment','opened', {ldelim}expires: 30,path: '{$cookiepath}'{rdelim});{rdelim}
function Panel_Comment_Closer() {ldelim}$.cookie('navpanel_newcomment', '', {ldelim}expires: 30,path: '{$cookiepath}'{rdelim});{rdelim}

{literal}
$(document).ready(function() {
	var validator = $("#cf").validate(
	{ 
		rules: 
		{ 
			{/literal}
			{if $smarty.session.user_group==2}
			Autor: {ldelim}required: true{rdelim},
			Email: {ldelim}required: true, email:true{rdelim},
			{/if}
			{literal}
			Webseite: {url:true},
			text: {required: true,minLength:10}
			{/literal}
			{if $use_code==1},
			scode:{ldelim}required: true{if !get_active('img_captcha')},number:true, remote: "index.php?action=checkcode&p=comments"{/if}{rdelim}
			{/if}
			{literal}
		},
		messages: 
		{
			scode: {remote:'{/literal}{#Validate_wrong#}{literal}'}
		},
			
		submitHandler: function() 
		{ 
			document.forms['f'].submit();
		},
		
		success: function(label) 
		{
			label.html("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;").addClass("checked");
		}
	});
});
{/literal}


// -->
</script>

{if $error} <a name="error"></a> <img src="{$imgpath_page}pixel.gif" alt="" width="1" height="1" style="display:none" onload="location.href='#error';" />
<div class="error_box">
  <ul>
    {foreach from=$error item=err}
    <li>{$err}</li>
    {/foreach}
  </ul>
</div>
{/if}



	

{if $smarty.session.user_group==2}

  <input class="input" style="width:200px" name="Autor" type="text" value="{$smarty.post.Autor|koobispecialchars}" id="c_a" />
  <strong>{#Comment_YourName#}</strong>
<br />

  <input class="input" style="width:200px" name="Email" type="text" value="{$smarty.post.Email|koobispecialchars}" id="c_e" />
  <label for="c_e"><strong>{#Comment_YourEmail#}</strong></label>
<br />
{else}
<input name="Autor" type="hidden"  value="{$smarty.session.user_name}" id="c_a" />
<input name="Email" type="hidden" value="{$smarty.session.login_email}" id="c_e" />
{/if}

  <input class="input" style="width:200px" name="Webseite" type="text" value="{$smarty.post.Webseite|koobispecialchars}" id="c_w" />
  <label for="c_w"><strong>{#Comment_YourWeb#}</strong></label>
<br />
  <input class="input" style="width:200px" name="Herkunft" type="text" value="{$smarty.post.Herkunft|koobispecialchars}" id="c_h" />
  <label for="c_h"><strong>{#Comment_YourFrom#}</strong></label>
<br />
{if $settings.KommentarFormat==1}
{if $settings.KoobiCode_Smilies == 1}{$listemos}{/if}{include file="$incpath/comments/format.tpl"}
{/if}

<textarea name="text" cols="40" rows="5" class="input"  id="msgform"  style="width:99%; height:150px">{$smarty.post.text|koobispecialchars}</textarea>
{if $use_code==1}
<br />
<br />
<p> <strong>{#Reg_SmallQ#}</strong><br /><br />
  {#Reg_SmallH#}&nbsp;&nbsp;&nbsp;<strong style="font-size:130%">{$secureIMG}</strong> =
  <input class="input" name="scode" type="text" style="width:80px;font-size:17px;" value="{$smarty.request.scode|koobispecialchars}" maxlength="5" />
  {$codeerror_t} </p>
{/if} 
<br />
<input type="hidden" name="Redir" value="{redir}" />
<input type="hidden" name="Eintrag" value="1" />
<input type="hidden" name="id" value="{$smarty.request.id|escape:html}" />
<input type="submit" class="button" value="{#Comment_ButtonSend#}" />
<input type="button" class="button" onclick="koobi_style(-1); EintragZaehlen();" value="{#Comment_ButtonChecklength#}" />
<script language="javascript" type="text/javascript">
<!--//
	function EintragZaehlen()
	{ldelim}
		var postmaxchars = {$settings.Kommentar_Laenge};
		if (postmaxchars != 0) message = " {#Profile_Guestbook_MaxChars1Gb#} " + postmaxchars + " {#Profile_Guestbook_MaxChars2#}";
		else message = "";
		alert("{#Forums_post_length_t#} " + document.getElementById('msgform').value.length + "\n" + message);
	{rdelim}

//-->
</script>
<!-- EINTRAG // -->