/***********************************************
 copyright : (C) 2009 - DesignBox ShopSoft      
 Web: www.designbox.nl  Mail: info@designbox.nl 
 change date : 11 - 02- 2009                    
 **********************************************/
 
function silentErrorHandler() {return true;}
window.onerror=silentErrorHandler; 

function checkNaam(oForm){
	if(oForm.naam.value=="") {
		alert("Vul a.u.b. uw naam in.");
		oForm.naam.focus();
		return false;
	} return true;
}

function checkMail(oForm){
	if(oForm.email.value==""){
		alert("Vul a.u.b. uw emailadres in.");
		oForm.email.focus();
		return false;
	}
	if(oForm.email.value.indexOf('@')==-1 || oForm.email.value.indexOf('@')==0 || oForm.email.value.indexOf('@')==(oForm.email.value.length-1)){
		alert("Het emailadres is niet correct, probeer het nog eens.");
		oForm.email.focus();
		return false;
	}
	if(oForm.email.value.indexOf('.')==-1 || oForm.email.value.indexOf('.')==0 || oForm.email.value.indexOf('.')==(oForm.email.value.length-1)){
		alert("Het emailadres is niet correct, probeer het nog eens.");
		oForm.email.focus();
		return false;
	}
	return true;
}

function checkContactpersoon(oForm){
	if(oForm.contactpersoon.value=="") {
		alert("Vul a.u.b. de contactpersoon in.");
		oForm.contactpersoon.focus();
		return false;
	} return true;
}

function checkNorobot(oForm){
	if(oForm.norobot.value=="") {
		alert("Vul a.u.b. de anti spam code in.");
		oForm.norobot.focus();
		return false;
	} return true;
}

function Verstuur(oForm){
	if(!checkNaam(oForm)) return false;
	if(!checkMail(oForm)) return false;
	if(!checkContactpersoon(oForm)) return false;
	if(!checkNorobot(oForm)) return false;
	return true;
}
