function oeffneFenster(url,width,height) {
	window.open(''+url+'','mywin','left=20,top=20,width='+width+',height='+height+',toolbar=0,resizable=false');
}

function frageLoeschen(text) {
	var str;
	var conf;
	
	str = text;
	
	conf = confirm(text);
	
	if(conf) {
		return true;
	} else {
		return false;
	}

	
}

function formHandler(form) {
var URL = form.anrede.options[form.anrede.selectedIndex].value;
window.location.replace(URL);
}

function bearbeiten(){
	
	document.getElementById('titel').style.display="none";
	document.getElementById('titelb').style.display="block";
	
	
}

	function checkForm() {
  var strFehler='';

	if (document.forms[0].name.value==""){
  	document.forms[0].name.style.border="1px solid red";
    strFehler += "Feld Name ist leer\n";
	}
	else if(document.forms[0].name.value!=""){
		document.forms[0].name.style.border="1px solid black";
	}
	if (document.forms[0].vorname.value==""){
  	document.forms[0].vorname.style.border="1px solid red";
    strFehler += "Feld Vorname ist leer\n";
	}
	else if(document.forms[0].vorname.value!=""){
		document.forms[0].vorname.style.border="1px solid black";
	}
	if (document.forms[0].email.value==""){
  	document.forms[0].email.style.border="1px solid red";
    strFehler += "Feld Email ist leer\n";
	}
	else if(document.forms[0].email.value!=""){
		document.forms[0].email.style.border="1px solid black";
	}
	if (!check_empty(document.forms[0].anfrage.value)){
			document.forms[0].anfrage.style.border="1px solid red";
			strFehler += "Feld Anfrage am ist leer\n";
			}
			else if (check_empty(document.forms[0].anfrage.value)){
			document.forms[0].anfrage.style.border="1px solid black";
			}
	

	
  if (strFehler.length>0) {
    alert("\n"+strFehler);
    return(false);
  }
}

function check_empty(text) {
  return (text.length > 0); // gibt false zurück wenn leehr
}
