// JavaScript Document

	sfHover = function() {
		var sfEls = document.getElementById("menu_line").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
	if (window.attachEvent) window.attachEvent("onload", sfHover);

	

function ismaxlength(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (obj.getAttribute && obj.value.length>mlength)
	obj.value=obj.value.substring(0,mlength)
	}



function CheckLen(Target){
   StrLen = Target.value.length
   if (StrLen == 1 && Target.value.substring(0,1) == " ")
    {Target.value = ""; StrLen = 0}
 
   if (StrLen > 1000 )
    {Target.value = Target.value.substring(0,1000)
     CharsLeft = 0}
   else{CharsLeft = 1000 - StrLen}
   document.kontaktformde.Anzahl.value = 'Ihnen stehen noch '+CharsLeft+' Zeichen zur Verfügung.'
  }
	


