function validateContactType(btn) {
    return true; }

function validateContact(fld) {
	return true; }


//validate Webdesign-aanvraag
function validate_email(field)
{ with (field)
  { apos=value.indexOf("@");
	 dotpos=value.lastIndexOf(".");
	 if (apos<1||dotpos-apos<2)
	 		{ return false; }
	 else 	{return true;}}}

function validate_phone(field)
{ with (field)
  { var stripped = value.replace(/[\(\)\.\-\ ]/g, '');
	 if (stripped.length <= 9)
	 		{ return false; }
	 if (value==null||value=="")
	 		{ return false; }
	 else if (isNaN(parseInt(stripped))) 
	 		{ return false; }
	 else	{ return true; }}}

function validate_phone_area(field)
{ with (field)
  { var stripped = value.replace(/[\(\)\.\-\ ]/g, '');
	 if (stripped.length > 5)
	 		{ return false; }
	 if (value==null||value=="")
	 		{ return false; }
	 else if (isNaN(parseInt(stripped))) 
	 		{ return false; }
	 else	{ return true; }}}

function validate_phone_2(field)
{ with (field)
  { var stripped = value.replace(/[\(\)\.\-\ ]/g, '');
	 if (stripped.length > 13)
	 		{ return false; }
	if (stripped.length < 5)
	 		{ return false; }
	 if (value==null||value=="")
	 		{ return false; }
	 else if (isNaN(parseInt(stripped))) 
	 		{ return false; }
	 else	{ return true; }}}

function validate_required(field)
{ with (field)
  { if (value==null||value=="")
	 		{ return false; }
	 else	{ return true; }}}

function validate_form(thisform)
{ 	var reason = "";
	var cursorloc = "";
with (thisform)
  {
  if (validate_required(first,"Uw voorletters zijn niet ingevuld!")==false)
  	{ 	first.style.background = '#9BeBf1'; 
  		reason += "- Uw voorletters zijn niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; first.focus(); } }
	else { first.style.background = '#ffffff'; }
  if (validate_required(last,"Uw achternaam is niet ingevuld!")==false)
  	{ 	last.style.background = '#9BeBf1'; 
  		reason += "- Uw achternaam is niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; last.focus(); } }
	else { last.style.background = '#ffffff'; }
  if (validate_required(adress,"Uw adres is niet ingevuld!")==false)
  	{ 	adress.style.background = '#9BeBf1'; 
  		reason += "- Uw adres is niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; adress.focus(); } }
	else { adress.style.background = '#ffffff'; }
  if (validate_required(number,"Uw huisnummer is niet ingevuld!")==false)
  	{ 	number.style.background = '#9BeBf1'; 
  		reason += "- Uw huisnummer is niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; number.focus(); } }
	else { number.style.background = '#ffffff'; }

  if (validate_required(postal,"Uw postcode is niet ingevuld!")==false)
  	{ 	postal.style.background = '#9BeBf1';
  		reason += "- Uw postcode is niet ingevuld!\n";
  		if (cursorloc == "") { cursorloc = 1; postal.focus(); } }
	else { postal.style.background = '#ffffff'; }
  if (validate_required(city,"U heeft geen plaats ingevuld!")==false)
  	{ 	city.style.background = '#9BeBf1';
  		reason += "- U heeft geen plaats ingevuld!\n";
  		if (cursorloc == "") { cursorloc = 1; city.focus(); } }
	else { city.style.background = '#ffffff'; }

  if (validate_phone(phone,"U heeft geen telefoonnummer ingevuld!")==false)
  	{ 	phone.style.background = '#9BeBf1';
  		reason += "- U heeft geen telefoonnummer ingevuld!\n";
  		if (cursorloc == "") { cursorloc = 1; phone.focus(); } }
	else { phone.style.background = '#ffffff'; }

  if (validate_email(email,"Geen geldig email adres!")==false)
    { 	email.style.background = '#9BeBf1';
    	reason += "- Geen geldig email adres!\n";
    	if (cursorloc == "") { cursorloc = 1; email.focus(); } }
	else { email.style.background = '#ffffff'; }

  if (reason != "")
  	{	alert("Er is iets fout gegaan,\n\nNog niet alle informatie is correct ingevuld.\nControleer a.u.b. alle gekleurde invoer velden.");
		return false; }
} } // einde confirm voor Webdesign-aanvraag

function validate_form_cust(thisform)
{ 	var reason = "";
	var cursorloc = "";
	var reason2 = "";
with (thisform)
  {
  if (validate_required(name_initials,"Uw initialen zijn niet ingevuld!")==false)
  	{ 	name_initials.style.background = '#9BeBf1'; 
  		reason += "- Uw initialen zijn niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; name_initials.focus(); } }
	else { name_initials.style.background = '#ffffff'; }
  if (validate_required(name_first,"Uw voornaam is niet ingevuld!")==false)
  	{ 	name_first.style.background = '#9BeBf1'; 
  		reason += "- Uw voornaam is niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; name_first.focus(); } }
  	else { name_first.style.background = '#ffffff'; }
  if (validate_required(name_last,"Uw achternaam is niet ingevuld!")==false)
  	{ 	name_last.style.background = '#9BeBf1'; 
  		reason += "- Uw achternaam is niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; name_last.focus(); } }
	else { name_last.style.background = '#ffffff'; }
  if (validate_required(address_street,"Uw adres is niet ingevuld!")==false)
  	{ 	address_street.style.background = '#9BeBf1'; 
  		reason += "- Uw adres is niet ingevuld!\n";
  		if (cursorloc == "") { cursorloc = 1; address_street.focus(); } }
	else { address_street.style.background = '#ffffff'; }
  if (validate_phone_area(address_num,"Uw huisnummer is niet ingevuld!")==false)
  	{ 	address_num.style.background = '#9BeBf1'; 
  		reason += "- Uw huisnummer is niet ingevuld!\n"; 
  		if (cursorloc == "") { cursorloc = 1; address_num.focus(); } }
	else { address_num.style.background = '#ffffff'; }
  if (validate_required(address_zip,"Uw postcode is niet ingevuld!")==false)
  	{ 	address_zip.style.background = '#9BeBf1';
  		reason += "- Uw postcode is niet ingevuld!\n";
  		if (cursorloc == "") { cursorloc = 1; address_zip.focus(); } }
	else { address_zip.style.background = '#ffffff'; }
  if (validate_required(address_city,"U heeft geen plaats ingevuld!")==false)
  	{ 	address_city.style.background = '#9BeBf1';
  		reason += "- U heeft geen plaats ingevuld!\n";
  		if (cursorloc == "") { cursorloc = 1; address_city.focus(); } }
	else { address_city.style.background = '#ffffff'; }
  if (validate_phone_area(tel_country,"Uw area code is leeg of incorrect!")==false)
  	{ 	tel_country.style.background = '#9BeBf1';
  		reason += "- Uw area code is leeg of incorrect!\n";
  		if (cursorloc == "") { cursorloc = 1; tel_country.focus(); } }
	else { tel_country.style.background = '#ffffff'; }
  if (validate_phone_area(tel_area,"Uw area code is leeg of incorrect!")==false)
  	{ 	tel_area.style.background = '#9BeBf1';
  		reason += "- Uw area code is leeg of incorrect!\n";
  		if (cursorloc == "") { cursorloc = 1; tel_area.focus(); } }
	else { tel_area.style.background = '#ffffff'; }
  if (validate_phone_2(tel_number,"U heeft geen telefoonnummer ingevuld!")==false)
  	{ 	tel_number.style.background = '#9BeBf1';
  		reason += "- U heeft geen telefoonnummer ingevuld!\n";
  		if (cursorloc == "") { cursorloc = 1; tel_number.focus(); } }
	else { tel_number.style.background = '#ffffff'; }
  if (validate_email(email_address,"Geen geldig email adres!")==false)
    { 	email_address.style.background = '#9BeBf1';
    	reason += "- Geen geldig email adres!\n";
    	if (cursorloc == "") { cursorloc = 1; email_address.focus(); } }
	else { email_address.style.background = '#ffffff'; }
  if (thisform.eula_accepted.checked) { }
  else { reason2 = "U moet akkoord gaan met onze voorwaarden voor\nu gebruik kunt maken van onze diensten."; }

  if (reason != "")
  	{	alert("Er is iets fout gegaan,\n\nNog niet alle informatie is correct ingevuld.\nControleer a.u.b. alle gekleurde invoer velden.");
		return false; }
  if (reason2 != "")
  		{	alert(reason2);
  			return false; }
} } // einde validate_form_cust


//validate Informatie/storing
function validate_infoform(thisform)
{ 	var reason = "";
	var cursorloc = "";
with (thisform)
  {
  if (validate_required(naam,"Uw naam is niet ingevuld!")==false)
  	{ 	naam.style.background = '#9BeBf1'; 
  		reason += "-"; 
  		if (cursorloc == "") { cursorloc = 1; naam.focus(); } }
	else { naam.style.background = '#ffffff'; }

  if (reason != "")
  	{	alert("Er is iets fout gegaan,\n\nNog niet alle informatie is correct ingevuld.\nControleer a.u.b. alle gekleurde invoer velden.");
		return false; }
} } // einde confirm voor Informatie/Storing
