function Consument(theForm) {
	
// check to see if the field is blank
if (theForm.naam.value == "") {
	alert("naam is verplicht.");
	theForm.naam.focus();
return (false);
}
if (theForm.telefoon.value == "") {
	alert("telefoon is verplicht.");
	theForm.telefoon.focus();
return (false);
}
if (theForm.emailadres.value == "") {
	alert("e-mailadres is verplicht.");
	theForm.emailadres.focus();
return (false);
}

// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.emailadres.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
		EmailValid = true
		break;
	}
}
if (!EmailValid) {
	alert("dit is geen geldig e-mailadres.");
	theForm.emailadres.focus();
return (false);
}

// check if both password fields are the same
if (theForm.emailadres.value != theForm.replay.value)	{
	alert("de emailadressen komen niet overeen.");
	theForm.replay.focus();
return (false);
	}
if (theForm.artikelcode.value == "") {
	alert("artikelcode is verplicht.");
	theForm.artikelcode.focus();
return (false);
}
if (theForm.bericht.value == "") {
	alert("bericht is verplicht.");
	theForm.bericht.focus();
return (false);
}
}
// einde einde einde einde einde einde einde einde einde einde 

function Pers(theForm) {

// check to see if the field is blank
if (theForm.bedrijfsnaam.value == "") {
	alert("bedrijfsnaam is verplicht.");
	theForm.bedrijfsnaam.focus();
return (false);
}
if (theForm.telefoonnummer.value == "") {
	alert("telefoonnummer is verplicht.");
	theForm.telefoonnummer.focus();
return (false);
}
if (theForm.medium.value == "") {
	alert("medium is verplicht.");
	theForm.medium.focus();
return (false);
}
if (theForm.voornaam.value == "") {
	alert("voornaam is verplicht.");
	theForm.voornaam.focus();
return (false);
}
if (theForm.achternaam.value == "") {
	alert("achternaam is verplicht.");
	theForm.achternaam.focus();
return (false);
}
if (theForm.emailadres.value == "") {
	alert("e-mailadres is verplicht.");
	theForm.emailadres.focus();
return (false);
}

// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.emailadres.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
		EmailValid = true
		break;
	}
}
if (!EmailValid) {
	alert("Dit is geen geldig e-mailadres.");
	theForm.emailadres.focus();
return (false);
}

// check if both password fields are the same
if (theForm.emailadres.value != theForm.replay.value)	{
	alert("de emailadressen komen niet overeen.");
	theForm.replay.focus();
return (false);
	}
if (theForm.artikelcode.value == "") {
	alert("artikelcode is verplicht.");
	theForm.artikelcode.focus();
return (false);
}
if (theForm.bericht.value == "") {
	alert("bericht is verplicht.");
	theForm.bericht.focus();
return (false);
}
}
// einde einde einde einde einde einde einde einde einde einde 

function Dealer(theForm) {

// check to see if the field is blank
if (theForm.bedrijfsnaam.value == "") {
	alert("bedrijfsnaam is verplicht.");
	theForm.bedrijfsnaam.focus();
return (false);
}
if (theForm.kvknummer.value == "") {
	alert("kvk-nummer is verplicht.");
	theForm.kvknummer.focus();
return (false);
}
if (theForm.btwnummer.value == "") {
	alert("btw-nummer is verplicht.");
	theForm.btwnummer.focus();
return (false);
}
if (theForm.telefoonnummer.value == "") {
	alert("telefoonnummer is verplicht.");
	theForm.telefoonnummer.focus();
return (false);
}
if (theForm.faxnummer.value == "") {
	alert("faxnummer is verplicht.");
	theForm.faxnummer.focus();
return (false);
}
if (theForm.voornaam.value == "") {
	alert("voornaam is verplicht.");
	theForm.voornaam.focus();
return (false);
}
if (theForm.achternaam.value == "") {
	alert("achternaam is verplicht.");
	theForm.achternaam.focus();
return (false);
}
if (theForm.emailadres.value == "") {
	alert("e-mailadres is verplicht.");
	theForm.emailadres.focus();
return (false);
}

// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.emailadres.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
		EmailValid = true
		break;
	}
}
if (!EmailValid) {
	alert("Dit is geen geldig e-mailadres.");
	theForm.emailadres.focus();
return (false);
}

// check if both password fields are the same
if (theForm.emailadres.value != theForm.replay.value)	{
	alert("de emailadressen komen niet overeen.");
	theForm.replay.focus();
return (false);
	}
if (theForm.artikelcode.value == "") {
	alert("artikelcode is verplicht.");
	theForm.artikelcode.focus();
return (false);
}
if (theForm.bericht.value == "") {
	alert("bericht is verplicht.");
	theForm.bericht.focus();
return (false);
}
}
// einde einde einde einde einde einde einde einde einde einde 
