// ---------------------------------------------- globalvar ae = String.fromCharCode(228);var ue = String.fromCharCode(252);var oe = String.fromCharCode(246);var sz = String.fromCharCode(223);function unblur() {this.blur();}function Bluritnow() {	if (!document.getElementById) return	links = document.getElementsByTagName("a");	for(i=0; i<links.length; i++) {		links[i].onfocus = unblur	}}function setFontSize(direction){	if(direction == "normal"){		wert_neu = 62.5;	} else {		wert_neu = (direction == "bigger")? (fontSize + 10) : (fontSize - 10);	}		document.getElementsByTagName('body')[0].style.fontSize = wert_neu+"%";		fontSize = parseFloat(wert_neu);	document.cookie = "fontSize="+fontSize;}function elektropost(usr, ziel){	str = "<a href=\"";	str += (ziel == "form")? "index.php?level0=kontakt&level1=email\" title=\"zum Kontaktformular" : "mailto:"+usr+"&#x40;we&#115;&#116;falen&#66;&#97;h&#x6E;.&#x64;&#101;";	str += "\">";	str += usr+"&#x40;we&#115;&#116;falen&#66;&#97;h&#x6E;.&#x64;&#101;";	str += "</a>";	return str;}function bruederpfad(){	str = "<a href=\"mailto:&#x68;&#x2E;m&#x69;&#x6C;&#x74;in&#x67;&#x40;&#98;&#114;&#117;&#101;d&#101;&#x72;&#x70;&#x66;a&#100;.&#100;&#x65;\">&#x68;&#x2E;m&#x69;&#x6C;&#x74;in&#x67;&#x40;&#98;&#114;&#117;&#101;d&#101;&#x72;&#x70;&#x66;a&#100;.&#100;&#x65;</a>";	return str;}var intExp = /[0-9]/;													//-- nur numerische Zeichenvar telExp = /[0-9]|[\+\,\.\-\(\)\/\s]/;								//-- nur numerische Zeichen und ".", "-", "(", ")", "/" und Leerzeichenvar mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|]|[a-zA-Z]/;		//-- nur numerische Zeichen und ".", ",", "-", ";", ":"var whitespaceExp = /^[\s]/;											//-- Whitespace am Anfangfunction checkInt(val, expType){	delFirstWhitespace(val);	if(expType){		intExp = expType;	}	var strPass = val.value;	var strLength = strPass.length;	var lchar = val.value.charAt((strLength) - 1);	if(lchar.search(intExp) == -1) {		var tst = val.value.substring(0, (strLength) - 1);		val.value = tst;			}}											//-- Whitespace am Anfangfunction delFirstWhitespace(val){	var strPass = val.value;	var strLength = strPass.length;		if(strPass.search(/^\s/) != -1) {		var tst = val.value.substring(0, (strLength) - 1);		val.value = tst;	}}function checkNum(val){	var strPass = val.value;	var strLength = strPass.length;	var lchar = val.value.charAt((strLength) - 1);	if(lchar.search(mikExp) != -1) {		var tst = val.value.substring(0, (strLength) - 1);		val.value = tst;			}}function checkForm(modus){	var validity = false;	frm = document.frmKontakt;		if(modus == "email" || modus == "lob_und_kritik"){		toCheckArr = new Array();		i=0;		toCheckArr[i] = new Array("nachricht", "input_text", "Nachricht");		i++;		toCheckArr[i] = new Array("anrede", "select", "eine Anrede");		i++;		toCheckArr[i] = new Array("name", "input_text", "Name");		i++;		toCheckArr[i] = new Array("email", "input_text", "E-Mail");				for(i=0; i < toCheckArr.length; i++){			feld = eval("frm."+toCheckArr[i][0]);									if(!fieldCheck(feld, toCheckArr[i][1], toCheckArr[i][2])){				validity = false;				feld.focus();				return false;			} else {				validity = true;			}					}			} else {		validity = true;	}		return validity;}function fieldCheck(name, type, label){	validity = false;	if((type == "input_text") || (type == "select")) {		if(name.value == "") {			if(toCheckArr[i][3] == 0){				alert(label);			} else {				if(type == "input_text") {					alert("Bitte das Feld \""+label+"\" ausf"+ue+"llen!");				} else {					alert("Bitte w"+ae+"hlen Sie "+label+"!");				}			}			validity = false;		} else {			validity = true;		}								var hrefExp = "/(www\.)|(http\:\/\/)/";		//-- kein www. und kein http://		var nameNachricht = toCheckArr[i][0].search(/nachricht/);		if (nameNachricht != -1){			if (name.value != "") {				if(name.value.search(hrefExp) == -1){					validity = true;				} else {					alert("Bitte notieren Sie Verweise ohne \"www.\" oder \"http://\"!");					name.focus();					name.select();					return false;				}			}		}				var nameName = toCheckArr[i][0].search(/name/);		if (nameName != -1){			if (name.value != "") {				if(name.value.length >= 2){					validity = true;				} else {					alert("Bitte geben Sie mindestens 2 Zeichen im Feld \""+label+"\" an!");					name.focus();					name.select();					return false;				}												var nameExp = /\d+/;								if(name.value.search(nameExp) == -1) {					validity = true;				} else {					alert("Bitte geben Sie keine Ziffern im Feld \""+label+"\" an!");					name.focus();					name.select();					return false;				}			}		}				var nameEmail = toCheckArr[i][0].search(/email/);		if (nameEmail != -1){			if (name.value != "") {				if(emailCheck(name.value)){					if(name.value.search(/example\./) == -1){						validity = true;					} else {						alert("Bitte geben Sie einen g"+ue+"ltigen Domainanamen im Feld \""+label+"\" an!");						name.focus();						name.select();						return false;					}				} else {					name.focus();					name.select();					return false;				}			}		}		} else if(type == "radio"){		var checked = 0;		for(j=0; j < name.length; j++){			if(name[j].checked == true){				checked++;			}		}		if (checked == 0) {			if(toCheckArr[i][3] == 0){				alert(""+label+"");			} else {				alert("Bitte das Feld \""+label+"\" ausf"+ue+"llen!");			}			validity = false;		} else {			validity = true;		}		} else if(type == "checkbox"){		if(name.checked == false) {			if(toCheckArr[i][3] == 0){				alert(""+label+"");			} else {				alert("Bitte das Feld \""+label+"\" ausf"+ue+"llen!");			}			if(type == "radio"){				name[0].focus();			}			validity = false;		} else {			validity = true;		}	}		return validity;}function emailCheck(emailStr) {	var checkTLD=1;	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|mobi)$/;	var emailPat=/^(.+)@(.+)$/;	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";	var validChars="\[^\\s" + specialChars + "\]";	var quotedUser="(\"[^\"]*\")";	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;	var atom=validChars + '+';	var word="(" + atom + "|" + quotedUser + ")";	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");	var matchArray=emailStr.match(emailPat);	if (matchArray==null) {alert("Die E-Mail-Adresse ist nicht korrekt (pr"+ue+"fen Sie bitte die @ und .'s)");return false;}	var user=matchArray[1];	var domain=matchArray[2];	for (i=0; i<user.length; i++) {		if (user.charCodeAt(i)>127) {alert("Der Benutzername enth"+ae+"lt ung"+ue+"ltige Zeichen.");return false;}	}	for (i=0; i<domain.length; i++) {		if (domain.charCodeAt(i)>127) {alert("Der Domainname enth"+ae+"lt ung"+ue+"ltige Zeichen.");return false;}	}	if (user.match(userPat)==null) {alert("Der Benutzername ist ung"+ue+"ltig.");return false;}	var IPArray=domain.match(ipDomainPat);		if (IPArray!=null) {		for (var i=1;i<=4;i++) {			if (IPArray[i]>255) {alert("Die IP-Adresse ist ung"+ue+"ltig.");return false;}		}		return true;	} 	var atomPat=new RegExp("^" + atom + "$");	var domArr=domain.split(".");	var len=domArr.length;	for (i=0;i<len;i++) {		if (domArr[i].search(atomPat)==-1) {alert("Der Domainname ist ung"+ue+"ltig.");return false;}	}	if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) {alert("Die Adresse muss mit einer bekannten Domain oder einem zweistelligen L"+ae+"ndercode enden.");return false;}	if (len<2) {alert("Die Adresse enth"+ae+"lt keinen Hostnamen.");return false;}return true;}