function textlaenge()
{
	if(document.gaestebuch.zl.value > 0)
	{
		  if(document.gaestebuch.text.value.length < document.gaestebuch.zl.value)
		  {
			   document.gaestebuch.x.value = document.gaestebuch.zl.value - document.gaestebuch.text.value.length;
		  }
		  else
		  {
			   var text;
			   
			   text = document.gaestebuch.text.value;
			   text = text.slice(0,document.gaestebuch.zl.value);
			   document.gaestebuch.text.value = text;
			   document.gaestebuch.x.value = document.gaestebuch.zl.value - text.length;
		  }
	}
}
