// JavaScript Document
// for jvhdesigns.com
// by frizbee.be

function formcheck_contact(){
	
	if (document.formname.ab.value=="" || document.formname.ab.value=="Typ hier je naam en voornaam*"){
	  alert("Gelieve je naam en voornaam in te vullen.");
	  document.formname.ab.focus();
	  return false
	}
	if (!checkMail(document.formname.bem.value)){
	  alert("Gelieve een geldig email adres in te vullen.");
	  document.formname.bem.focus();
	  return false
	}
	if (document.formname.message.value=="" || document.formname.message.value=="Typ hier je bericht*"){
	  alert("Gelieve een vraag of opmerking in te vullen.");
	  document.formname.message.focus();
	  return false
	}
	if (document.formname.validator.value=="" || document.formname.validator.value=="Herhaal de code*"){
	  alert("Gelieve de code correct te herhalen.");
	  document.formname.validator.focus();
	  return false
	}

}


function checkMail(s)
{
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(s)) return true;
	else return false;
}