/* kommentare */
jQuery().ready(function(){



	//textarea auswerten
	max_length = 1000;
	
	function text_comment(this_) {
		if(this_)  {
			if(this_.value.length<=max_length) {
				anz_zeichen = eval(max_length + '-' + this_.value.length);
				jQuery("#maxCharLabel").html('Verbleibende Zeichen:');
				jQuery("#maxCharItem").html(''+anz_zeichen+'');
				jQuery("#maxCharLabel").css("color","#6C2A47");
				jQuery("#maxCharItem").css("color","#6C2A47");
			} 
			else {
				anz_zeichen = eval(this_.value.length + '-' + max_length);
				jQuery("#maxCharLabel").html('Zeichen &uuml;ber dem Limit:');
				jQuery("#maxCharItem").html(''+anz_zeichen+'');
				jQuery("#maxCharLabel").css("color","red");
				jQuery("#maxCharItem").css("color","red");
			}
		}
	}

	jQuery("#txt_comment").keyup( function() {
		text_comment(this);
	} );
	jQuery("#txt_comment").mouseup( function() {
		text_comment(this);
	} );

	text_comment(document.getElementById('txt_comment'));




});
