function Check(theForm) {

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.straathuisnummer.value == "") {
	alert("Straat en huisnummer.");
	theForm.straathuisnummer.focus();
return (false);
}
if (theForm.pcwoonplaats.value == "") {
	alert("Postcode en woonplaats is verplicht.");
	theForm.pcwoonplaats.focus();
return (false);
}
if (theForm.telefoon.value == "") {
	alert("Telefoon is verplicht.");
	theForm.telefoon.focus();
return (false);
}
if (theForm.email.value == "") {
	alert("Email is verplicht.");
	theForm.email.focus();
return (false);
}

// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.email.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.email.focus();
return (false);
}

// check if both password fields are the same
if (theForm.email.value != theForm.replay.value)	{
	alert("de emailadressen komen niet overeen.");
	theForm.replay.focus();
return (false);
	}

var radio_choice = false;
// Loop from zero to the one minus the number of radio button selections
for (counter = 0; counter < form.pakket.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (form.pakket[counter].checked)
radio_choice = true;
}

if (!radio_choice)
{
// If there were no selections made display an alert box
alert("Kies welk pakket u wilt.")
return (false);
}

}
// einde einde einde einde einde einde einde einde einde einde


function Contact(theForm) {


if (theForm.naam.value == "") {
	alert("Naam is verplicht.");
	theForm.naam.focus();
return (false);
}

if (theForm.email.value == "") {
	alert("Email is verplicht.");
	theForm.email.focus();
return (false);
}

// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = theForm.email.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.email.focus();
return (false);
}

// check if both password fields are the same
if (theForm.email.value != theForm.replay.value)	{
	alert("de emailadressen komen niet overeen.");
	theForm.replay.focus();
return (false);
	}

}
// einde einde einde einde einde einde einde einde einde einde
