
function invoercontrole(){
	
var controle;

// 1. controleren op een leeg veld
if (document.formulier.Naam.value == "") 
{document.getElementById(11).style.display="inline"; controle='FOUT';}
if (document.formulier.Naam.value !== "") 
{document.getElementById(11).style.display="none"; Naam1='OK';
}

// 2. controleren op een geldig Emailadres
atteken=document.formulier.Emailadres.value.indexOf("@"); 
puntteken=document.formulier.Emailadres.value.lastIndexOf(".");
compleet=document.formulier.Emailadres.value.length-1;
if (atteken<1 || puntteken-atteken<2 || compleet-puntteken>3 || compleet-puntteken<2)
{document.getElementById(21).style.display="inline"; controle='FOUT';
}
else {document.getElementById(21).style.display="none"; email1='OK';
}

// 3. controleren op een leeg commentaarvak
if (document.formulier.Bericht.value == "") 
{document.getElementById(71).style.display="inline"; controle='FOUT';
}
if (document.formulier.Bericht.value !== "") 
{document.getElementById(71).style.display="none"; Bericht1='OK';
}

if (Naam1=='OK' & email1=='OK' & Bericht1=='OK'){document.formulier.submit(); return true;}
else {return false;}
} // einde functie invoercontrole()

