// JavaScript Document
function chkFormular() {
	
	if (document.Formular.anrede.value == "-") {
		alert("Bitte wählen Sie die korrekte Anrede.");
		document.Formular.anrede.focus();
		return false;
	}

	if (document.Formular.name.value == "") {
		alert("Bitte geben Sie Ihren Namen an.");
		document.Formular.name.focus();
		return false;
	}
	  
	if (document.Formular.surename.value == "") {
		alert("Bitte geben Sie Ihren Vornamen an.");
		document.Formular.surename.focus();
		return false;
	}
	  
	if (document.Formular.topic.value == "-") {
		alert("Bitte wählen Sie Ihr Anliegen aus der Liste.");
		document.Formular.topic.focus();
		return false;
	}
		
	if (document.Formular.anschrift.value == "") {
		if (document.Formular.topic.value == "Katalogbestellung") {
			alert("Wir benötigen Ihre Anschrift, um den aktuellen Katalog zu versenden.");
			document.Formular.anschrift.focus();
			return false;
		}
	}
  	if (document.Formular.nachricht.value == "") {
		alert("Bitte geben Sie Ihre Nachricht ein.");
		document.Formular.nachricht.focus();
		return false;
	}
	
	var alleFalse = true;
	for(i = 0; i < 4; i++) {
 		if(Formular.contact_via[i].checked == true) {
			alleFalse = false;
			break;
		}
	}
	if (alleFalse == true) {
		alert("Bitte wählen Sie Ihre Kontaktmöglichkeit.");
		document.Formular.contact_via[0].checked = true;
		return false;
		}
		
	if (document.Formular.contact_via[0].checked) {
		if (document.Formular.email.value == "") {
			alert("Bitte geben Sie Ihre E-Mail-Adresse ein.");
	   		document.Formular.email.focus();
	   		return false;
	   	}
	}
	
	if (document.Formular.contact_via[1].checked) {
		if (document.Formular.telefon.value == "") {
			alert("Bitte geben Sie Ihre Telefonnummer ein.");
	   		document.Formular.telefon.focus();
	   		return false;
	   	}
	}
	   
	if (document.Formular.contact_via[2].checked) {
		if (document.Formular.fax.value == "") {
			alert("Bitte geben Sie Ihre Faxnummer ein.");
	   		document.Formular.fax.focus();
	   		return false;
	   	}
	}
	
	if (document.Formular.contact_via[3].checked) {
		if (document.Formular.anschrift.value == "") {
			alert("Bitte geben Sie Ihre Anschrift ein.");
	   		document.Formular.anschrift.focus();
	   		return false;
	   	}
	}   
	   
 


	if (document.Formular.contact_via.value == "E-Mail") {
	   alert("E-Mail.");
	   document.Formular.contact_via.focus();
	   return false;
	   }
   
   return true;

 }
