function formOk () {
	//alert(getInputValue ("formActie"));
	switch (getInputValue ("formActie")) {
			
		
			case "huiswerk_formulier":
			
			if (errorInputEmpty ("naam", "naam")) return false;
			if (errorInputEmpty ("adres", "adres")) return false;
			if (errorInputEmpty ("postcode", "postcode")) return false;
			if (errorPostcodeInvalid ("postcode", "postcode")) return false;
			if (errorInputEmpty ("woonplaats", "woonplaats")) return false;
			if (errorInputEmpty ("email", "e-mailadres")) return false;
			if (errorEmailInvalid ("email", "Geen correct e-mail adres")) return false;
	
			break;
		
			case "Contact_formulier":
			
			if (errorInputEmpty ("aanhef", "aanhef")) return false;
			if (errorInputEmpty ("voorletters", "voorletters")) return false;
			if (errorInputEmpty ("achternaam", "achternaam")) return false;
			if (errorInputEmpty ("huisnummer", "huisnummer")) return false;
			if (errorInputEmpty ("postcode", "postcode")) return false;
			if (errorPostcodeInvalid ("postcode", "postcode")) return false;
			//if (errorInputEmpty ("telefoonummer", "telefoonummer")) return false;
			if (errorInputEmpty ("email", "e-mailadres")) return false;
			if (errorEmailInvalid ("email", "Geen correct e-mail adres")) return false;
			if (errorInputEmpty ("vraag", "vraag of opmerking")) return false;
			
			break;
		
		
		
		
		case "nieuwsbrief_aanmelden":
			if (errorInputEmpty ("geslacht", "geslacht")) return false;
			if (errorInputEmpty ("voornaam", "voornaam")) return false;
			if (errorInputEmpty ("achternaam", "achternaam")) return false;
			if (errorInputEmpty ("email", "e-mailadres")) return false;
			if (errorEmailInvalid ("email", "e-mailadres")) return false;
			break;
		
		case "nieuwsbrief_doorsturen":
	
			
			if (errorInputEmpty ("geslacht_ontvanger", "geslacht")) return false;
			if (errorInputEmpty ("voornaam_ontvanger", "voornaam")) return false;
			if (errorInputEmpty ("achternaam_ontvanger", "achternaam")) return false;
			if (errorInputEmpty ("email_ontvanger", "e-mailadres")) return false;
			if (errorEmailInvalid ("email_ontvanger", "e-mailadres")) return false;
			
			if (errorInputEmpty ("voornaam", "voornaam")) return false;
			if (errorInputEmpty ("achternaam", "achternaam")) return false;
			if (errorInputEmpty ("email", "e-mailadres")) return false;
			if (errorEmailInvalid ("email", "e-mailadres")) return false;
			

			break;
		case "nieuwsbrief_afmelden":
			if (errorInputEmpty ("email", "e-mailadres")) return false;
			if (errorEmailInvalid ("email", "e-mailadres")) return false;
			break;

	}
	return true;
}

function buttonOnClick (obj) {
	
	switch (obj.name) {
		case "resetten":
			resetForm ();
			break;
		default:
			submitForm (obj.name);
	}
}


