function MM_openBrWindow(theURL,winName,features,l,h) { //v2.0

 features=features + ",width="+l+",height="+h;
 if (screen.height) {
  var top = (screen.height-h)/2; 
  var left=(screen.width-l)/2;
  features=features+",top="+top+",left="+left;
 }
 window.open(theURL,winName,features );
}

function checkTextObj(textobj, minlen) {
	var str = new String(textobj.value);
	if (textobj.name.indexOf("_email") >= 0) {
		if ((str.indexOf("@") < 1) || (str.indexOf(".") < str.lastIndexOf("@"))) return (-2);
	}
	if (str.length < minlen) return (-1);
	return 0;
}

function checkUserData(MyForm) {
	err = checkTextObj(MyForm.nachricht, 1);
	if (err < 0) { 
		MyForm.nachricht.focus();
		alert("Sie haben vergessen, eine Nachricht einzueintragen!");
		return false;
		}
	err = checkTextObj(MyForm.vname, 1);
	if (err < 0) { 
		MyForm.vname.focus();
   		alert("Ihren Namen sollten Sie uns aber schon verraten!");
		return false;
		} 
		
	err = checkTextObj(MyForm.email, 6);
	if (err < 0) { 
		alert("Sind Sie sicher, dass das Ihre E-Mail-Adresse ist?");
		MyForm.email.value = "keine@mailadresse.da"; 
		MyForm.email.focus();
		return false;
		}
}