function openDOL(mypage,myname,w,h,scroll,res,stat){
	var win= null;
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var settings ='height='+h+',';
		settings +='width='+w+',';
		settings +='top='+wint+',';
		settings +='left='+winl+',';
		settings +='scrollbars='+scroll+',';
		settings +='resizable='+res+',';
		settings +='status='+stat+',';
	win=window.open(mypage,myname,settings);

	if(parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

	function toggleMenu(state) {
		if (state == 'open') {
			$('menu').style.width = '968px';
			if (typeof document.body.style.maxHeight == "undefined") {
				$$('select').each(function(s) {
					s.style.display = "none";
				});
			}
		}
		if (state == 'close') {
			$('menu').style.width = '22px';
			if (typeof document.body.style.maxHeight == "undefined") {
				$$('select').each(function(s) {
					s.style.display = "inline";
				});
			}
		}
	}

	function donePart(part) {
		var error = '';
		if (part == 1) {
			if ($('voorletters').value == '') {
				$('voorletters').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('voorletters').style.backgroundColor = '#FFFFFF';
				correctVoorletters($('voorletters'));
			}
			if ($('achternaam').value == '') {
				$('achternaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('achternaam').style.backgroundColor = '#FFFFFF';
				correctTussenvoegsels($('tussenvoegsels'));
				correctAchternaam($('achternaam'));
			}
			if (!(checkEmail($('e-mailadres').value))) {
				$('e-mailadres').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('e-mailadres').style.backgroundColor = '#FFFFFF';
			}
			if ($('klachtsoort').value  == '') {
				$('klachtsoort').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('klachtsoort').style.backgroundColor = '#FFFFFF';
			}
			if (($('vestiging').value == '')&&($('klachtsoort').value!="Informatie aanvraag"))  {
				$('vestiging').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('vestiging').style.backgroundColor = '#FFFFFF';
			}
			if (error == 'yes') {
				alert('Controleer a.u.b. de gekleurde velden');
				return false;
			} else {
				if ($F('klachtsoort') == 'Service melding over uw order') {
					$('form_part_2').style.display = 'block';
					$('form_part_3').style.display = 'none';
					$('form_part_4').style.display = 'none';
					$('form_part_5').style.display = 'none';
					new Effect.BlindUp('form_part_1');
				}
				if ($F('klachtsoort') == 'Algemene klacht') {
					$('form_part_2').style.display = 'none';
					$('form_part_3').style.display = 'none';
					$('form_part_4').style.display = 'block';
					$('form_part_5').style.display = 'none';
					new Effect.BlindUp('form_part_1');
				}
				if ($F('klachtsoort') == 'Opmerking') {
					$('form_part_2').style.display = 'none';
					$('form_part_3').style.display = 'none';
					$('form_part_4').style.display = 'none';
					$('form_part_5').style.display = 'block';
					new Effect.BlindUp('form_part_1');
				}
				if ($F('klachtsoort') == 'Informatie aanvraag') {
					$('form_part_2').style.display = 'none';
					$('form_part_3').style.display = 'block';
					$('form_part_4').style.display = 'none';
					$('form_part_5').style.display = 'none';
					new Effect.BlindUp('form_part_1');
				}
			}
		}
		// SERVICE MELDING
		if (part == 2) {
			if ($('ordernummer').value == '') {
				$('ordernummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('ordernummer').style.backgroundColor = '#FFFFFF';
			}
			if ($('onderdeel').value == '') {
				$('onderdeel').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('onderdeel').style.backgroundColor = '#FFFFFF';
			}
			if (!checkNum4($F('postcode_nr'))) {
				$('postcode_nr').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr').style.backgroundColor = '#FFFFFF';
			}
			if (!checkLetter2($F('postcode_lt'))) {
				$('postcode_lt').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt').toUpperCase();
				$('postcode_lt').value = plt;
			}
			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				var params = $('servicecontact').serialize() ;
				new Ajax.Request('/scripts/mail.php?'+params, {
					method: 'get',
					onSuccess: function(transport) {
						$('form_part_3').style.display = 'none';
						$('form_part_4').style.display = 'none';
						$('form_part_5').style.display = 'none';
						$('form_part_6').style.display = 'inline';
						new Effect.BlindUp('form_part_2');
					}
				});
			}
		}


		// INFORMATIE AANVRAAG
		if (part == 3) {
			if ($('straatnaam').value == '') {
				$('straatnaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('straatnaam').style.backgroundColor = '#FFFFFF';
				correctAchternaam($('straatnaam'));
			}
			if (!checkNums($F('huisnummer'))) {
				$('huisnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('huisnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!checkNum4($F('postcode_nr_info'))) {
				$('postcode_nr_info').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr_info').style.backgroundColor = '#FFFFFF';
			}
			if (!checkLetter2($F('postcode_lt_info'))) {
				$('postcode_lt_info').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt_info').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt_info').toUpperCase();
				$('postcode_lt_info').value = plt;
			}
			if ($F('woonplaats') == "") {
				$('woonplaats').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('woonplaats').style.backgroundColor = '#FFFFFF';
				var plts = $F('woonplaats').toUpperCase();
				$('woonplaats').value = plts;
			}
			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				var params = $('servicecontact').serialize() ;
				new Ajax.Request('/scripts/mail.php?'+params, {
					method: 'get',
					onSuccess: function(transport) {
						$('form_part_3').style.display = 'none';
						$('form_part_4').style.display = 'none';
						$('form_part_5').style.display = 'none';
						$('form_part_6').style.display = 'inline';
						new Effect.BlindUp('form_part_2');
					}
				});
			}
		}

		// ALGEMENE KLACHT
		if (part == 4) {
			if ($('betrekkingklacht').value == '') {
				$('betrekkingklacht').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('betrekkingklacht').style.backgroundColor = '#FFFFFF';
			}

			if ($('ordernummer2').value == '') {
				$('ordernummer2').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('ordernummer2').style.backgroundColor = '#FFFFFF';
			}

			if (!checkNum4($F('postcode_nr2'))) {
				$('postcode_nr2').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr2').style.backgroundColor = '#FFFFFF';
			}

			if (!checkLetter2($F('postcode_lt2'))) {
				$('postcode_lt2').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt2').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt2').toUpperCase();
				$('postcode_lt2').value = plt;
			}


			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				var params = $('servicecontact').serialize() ;
				new Ajax.Request('/scripts/mail.php?'+params, {
					method: 'get',
					onSuccess: function(transport) {
						$('form_part_3').style.display = 'none';
						$('form_part_4').style.display = 'none';
						$('form_part_5').style.display = 'none';
						$('form_part_6').style.display = 'inline';
						new Effect.BlindUp('form_part_2');
					}
				});
			}
		}

		if (part == 5) {
			if ($('opmerking_vraag').value == '') {
				$('opmerking_vraag').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('opmerking_algemeen').style.backgroundColor = '#FFFFFF';
			}
			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				var params = $('servicecontact').serialize() ;
				new Ajax.Request('/scripts/mail.php?'+params, {
					method: 'get',
					onSuccess: function(transport) {
						$('form_part_3').style.display = 'none';
						$('form_part_4').style.display = 'none';
						$('form_part_5').style.display = 'none';
						$('form_part_6').style.display = 'inline';
						new Effect.BlindUp('form_part_2');
					}
				});
			}
		}


		//INSPIRATIEFORMULIER
		if (part == 6) {
			if ($('voorletters').value == '') {
				$('voorletters').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('voorletters').style.backgroundColor = '#FFFFFF';
				correctVoorletters($('voorletters'));
			}
			if ($('achternaam').value == '') {
				$('achternaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('achternaam').style.backgroundColor = '#FFFFFF';
				correctTussenvoegsels($('tussenvoegsels'));
				correctAchternaam($('achternaam'));
			}
			if ($('straatnaam').value == '') {
				$('straatnaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('straatnaam').style.backgroundColor = '#FFFFFF';
				correctAchternaam($('straatnaam'));
			}
			if (!checkNums($F('huisnummer'))) {
				$('huisnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('huisnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!checkNum4($F('postcode_nr'))) {
				$('postcode_nr').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr').style.backgroundColor = '#FFFFFF';
			}
			if (!checkLetter2($F('postcode_lt'))) {
				$('postcode_lt').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt').toUpperCase();
				$('postcode_lt').value = plt;
			}
			if ($F('woonplaats') == "") {
				$('woonplaats').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('woonplaats').style.backgroundColor = '#FFFFFF';
				var plts = $F('woonplaats').toUpperCase();
				$('woonplaats').value = plts;
			}
			if (!checkTelNumber($('telefoonnummer').value)){
				$('telefoonnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('telefoonnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!(checkEmail($('e-mailadres').value))) {
				$('e-mailadres').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('e-mailadres').style.backgroundColor = '#FFFFFF';
			}
			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				var params = $('inspiratie').serialize() ;
				//window.open('/scripts/mail_inspiratieboek.php?'+params);
				new Ajax.Request('/scripts/mail_inspiratieboek.php?'+params, {
					method: 'get',
					onSuccess: function(transport) {
						if (/vierluik/i.test(transport.responseText))
							$('formContainer').innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><strong>Hartelijk dank voor het invullen van het formulier. Het vierluik zal spoedig naar u verzonden worden.</strong></td></tr></table>';
						else 
							$('formContainer').innerHTML = '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><strong>Hartelijk dank voor het invullen van het formulier. De coupon is per e-mail naar u verzonden. Print deze uit en neem hem mee bij uw bezoek aan onze toonzaal. Het inspiratieboek ligt daar voor u klaar.</strong></td></tr></table>';
					}
				});
			}
		}

		// unitedforce
		if (part == 7) {
			if ($('voorletters').value == '') {
				$('voorletters').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('voorletters').style.backgroundColor = '#FFFFFF';
				correctVoorletters($('voorletters'));
			}
			if ($('achternaam').value == '') {
				$('achternaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('achternaam').style.backgroundColor = '#FFFFFF';
				correctTussenvoegsels($('tussenvoegsel'));
				correctAchternaam($('achternaam'));
			}
			if (!(checkEmail($('emailadres').value))) {
				$('emailadres').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('emailadres').style.backgroundColor = '#FFFFFF';
			}
			if ($('straatnaam').value == '') {
				$('straatnaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('straatnaam').style.backgroundColor = '#FFFFFF';
				correctAchternaam($('straatnaam'));
			}
			if (!checkNums($F('huisnummer'))) {
				$('huisnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('huisnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!checkNum4($F('postcode_nr'))) {
				$('postcode_nr').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr').style.backgroundColor = '#FFFFFF';
			}
			if (!checkLetter2($F('postcode_lt'))) {
				$('postcode_lt').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt').toUpperCase();
				$('postcode_lt').value = plt;
			}
			if ($F('woonplaats') == "") {
				$('woonplaats').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('woonplaats').style.backgroundColor = '#FFFFFF';
				var plts = $F('woonplaats').toUpperCase();
				$('woonplaats').value = plts;
			}
			if ($F('tijdschrift') == "") {
				$('tijdschrift').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('tijdschrift').style.backgroundColor = '#FFFFFF';
			}
			if (!checkTelNumber($('telefoon').value)){
				$('telefoon').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('telefoon').style.backgroundColor = '#FFFFFF';
			}
			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				return true;
			}
		}

		// solliciteer
		if (part == 8) {
			if ($('voorletters').value == '') {
				$('voorletters').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('voorletters').style.backgroundColor = '#FFFFFF';
				correctVoorletters($('voorletters'));
			}
			if ($('achternaam').value == '') {
				$('achternaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('achternaam').style.backgroundColor = '#FFFFFF';
				correctTussenvoegsels($('tussenvoegsel'));
				correctAchternaam($('achternaam'));
			}
			if (!(checkEmail($('emailadres').value))) {
				$('emailadres').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('emailadres').style.backgroundColor = '#FFFFFF';
			}
			if ($('straatnaam').value == '') {
				$('straatnaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('straatnaam').style.backgroundColor = '#FFFFFF';
				correctAchternaam($('straatnaam'));
			}
			if (!checkNums($F('huisnummer'))) {
				$('huisnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('huisnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!checkNum4($F('postcode_nr'))) {
				$('postcode_nr').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr').style.backgroundColor = '#FFFFFF';
			}
			if (!checkLetter2($F('postcode_lt'))) {
				$('postcode_lt').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt').toUpperCase();
				$('postcode_lt').value = plt;
			}
			if ($F('woonplaats') == "") {
				$('woonplaats').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('woonplaats').style.backgroundColor = '#FFFFFF';
				var plts = $F('woonplaats').toUpperCase();
				$('woonplaats').value = plts;
			}
			if (!checkTelNumber($('telefoon').value)){
				$('telefoon').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('telefoon').style.backgroundColor = '#FFFFFF';
			}
			if ($('motivatie').value == "") {
				$('motivatie').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('motivatie').style.backgroundColor = '#FFFFFF';
			}
			if ($('cv').value == "") {
				$('cv').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('cv').style.backgroundColor = '#FFFFFF';
			}
			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				return true;
			}
		}

		// gift_season
		if (part == 9) {
			if ($('cadeau').value == 'kies' ) {
				$('cadeau').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('cadeau').style.backgroundColor = '#FFFFFF';
			}
			if ($('voorletters').value == '') {
				$('voorletters').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('voorletters').style.backgroundColor = '#FFFFFF';
				correctVoorletters($('voorletters'));
			}
			if ($('achternaam').value == '') {
				$('achternaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('achternaam').style.backgroundColor = '#FFFFFF';
				correctTussenvoegsels($('tussenvoegsel'));
				correctAchternaam($('achternaam'));
			}
			if (!(checkEmail($('emailadres').value))) {
				$('emailadres').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('emailadres').style.backgroundColor = '#FFFFFF';
			}
			if ($('straatnaam').value == '') {
				$('straatnaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('straatnaam').style.backgroundColor = '#FFFFFF';
				correctAchternaam($('straatnaam'));
			}
			if (!checkNums($F('huisnummer'))) {
				$('huisnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('huisnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!checkNum4($F('postcode_nr'))) {
				$('postcode_nr').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr').style.backgroundColor = '#FFFFFF';
			}
			if (!checkLetter2($F('postcode_lt'))) {
				$('postcode_lt').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt').toUpperCase();
				$('postcode_lt').value = plt;
			}
			if ($F('woonplaats') == "") {
				$('woonplaats').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('woonplaats').style.backgroundColor = '#FFFFFF';
				var plts = $F('woonplaats').toUpperCase();
				$('woonplaats').value = plts;
			}
			if (!checkTelNumber($('telefoon').value)){
				$('telefoon').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('telefoon').style.backgroundColor = '#FFFFFF';
			}
			if (error == 'yes') {
					alert('Controleer a.u.b. de gekleurde velden');
					return false;
			} else {
				return true;
			}
		}

		if (part == 10) {
			if ($('voorletters').value == '') {
				$('voorletters').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('voorletters').style.backgroundColor = '#FFFFFF';
				correctVoorletters($('voorletters'));
			}
			if ($('achternaam').value == '') {
				$('achternaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('achternaam').style.backgroundColor = '#FFFFFF';
				correctTussenvoegsels($('tussenvoegsels'));
				correctAchternaam($('achternaam'));
			}
			if ($('straatnaam').value == '') {
				$('straatnaam').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('straatnaam').style.backgroundColor = '#FFFFFF';
				correctAchternaam($('straatnaam'));
			}
			if (!checkNums($F('huisnummer'))) {
				$('huisnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('huisnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!checkNum4($F('postcode_nr'))) {
				$('postcode_nr').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_nr').style.backgroundColor = '#FFFFFF';
			}
			if (!checkLetter2($F('postcode_lt'))) {
				$('postcode_lt').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('postcode_lt').style.backgroundColor = '#FFFFFF';
				var plt = $F('postcode_lt').toUpperCase();
				$('postcode_lt').value = plt;
			}
			if ($F('woonplaats') == "") {
				$('woonplaats').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('woonplaats').style.backgroundColor = '#FFFFFF';
				var plts = $F('woonplaats').toUpperCase();
				$('woonplaats').value = plts;
			}
			if (!checkTelNumber($('telefoonnummer').value)){
				$('telefoonnummer').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('telefoonnummer').style.backgroundColor = '#FFFFFF';
			}
			if (!(checkEmail($('emailadres').value))) {
				$('emailadres').style.backgroundColor = '#CCD6E2';
				error = 'yes';
			} else {
				$('emailadres').style.backgroundColor = '#FFFFFF';
			}
			if (error == 'yes') {
				alert('Controleer a.u.b. de gekleurde velden');
				return false;
			} else {
				$('huisstijl_magazine').submit();
			}
		}


	}


function makeRoute() {
	var error = '';
	if ($('straatnaam').value == '') {
		$('straatnaam').style.backgroundColor = '#CCD6E2';
		error = 'yes';
	} else {
		$('straatnaam').style.backgroundColor = '#FFFFFF';
		correctAchternaam($('straatnaam'));
	}
	if (!checkNums($F('huisnummer'))) {
		$('huisnummer').style.backgroundColor = '#CCD6E2';
		error = 'yes';
	} else {
		$('huisnummer').style.backgroundColor = '#FFFFFF';
	}
	if (!checkNum4($F('postcode_nr'))) {
		$('postcode_nr').style.backgroundColor = '#CCD6E2';
		error = 'yes';
	} else {
		$('postcode_nr').style.backgroundColor = '#FFFFFF';
	}
	if (!checkLetter2($F('postcode_lt'))) {
		$('postcode_lt').style.backgroundColor = '#CCD6E2';
		error = 'yes';
	} else {
		$('postcode_lt').style.backgroundColor = '#FFFFFF';
		var plt = $F('postcode_lt').toUpperCase();
		$('postcode_lt').value = plt;
	}
	if ($F('woonplaats') == "") {
		$('woonplaats').style.backgroundColor = '#CCD6E2';
		error = 'yes';
	} else {
		$('woonplaats').style.backgroundColor = '#FFFFFF';
		var plts = $F('woonplaats').toUpperCase();
		$('woonplaats').value = plts;
	}
	if (error == 'yes') {
			alert('Controleer a.u.b. de gekleurde velden');
			return false;
	} else {
		var params = $('route').serialize() ;
		new Ajax.Request('/scripts/route.php?'+params, {
			method: 'get',
			onSuccess: function(transport) {
				window.open('http://maps.google.nl/maps?f=d&hl=nl&saddr='+$F('straatnaam')+'+'+$F('huisnummer')+'+'+$F('postcode_nr')+'+'+$F('postcode_lt')+'+'+$F('woonplaats')+'&daddr='+$F('routeadres'))
			}
		});
	}
	}

	function checkNums(num) {
		var format = /[0-9]+/;
		if (!num.match(format)) {
			return false;
		} else {
			return true;
		}
	}

	function checkEmail(mailstring) {
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(mailstring)){
			return true;
		}
	}

	function checkTelNumber(telefoonnummer) {
		var tel = telefoonnummer.replace(" ", "");
		tel = tel.replace("-", "");
		var format = /[0-9]{10}/;
		if (!tel.match(format)) {
			return false;
		} else {
			return true;
		}
	}

	function checkLetter2(lt) {
		var format = /^([a-zA-Z]{2})/;
		if (!lt.match(format)) {
			return false;
		} else {
			return true;
		}
	}
	function checkNum4(num) {
		var format = /^([0-9]{4})/;
		if (!num.match(format)) {
			return false;
		} else {
			return true;
		}
	}

	function correctVoorletters(voorletters) {
		// Voorletters in Format zetten : abc > A.B.C. // ABC > A.B.C.
		var letters = new Array();
		var i = 0;
		var j = 0;
		var voorlettersAangepast = "";
		var voorletter = voorletters.value;
		voorletter = voorletter.toUpperCase();
		while ( i <= voorletter.length)	{
			voorletter = voorletter.replace( ".", "");
			voorletter = voorletter.replace( " ", "");
			i++;
		}
		letters = voorletter.split("");
		while ( j < letters.length)	{
			voorlettersAangepast += letters[j] + ".";
			j ++;
		}
		voorletters.value = voorlettersAangepast;
	}

// TUSSENVOEGSELS
	function correctTussenvoegsels(tussenvoegsels) {
		tussenvoegsels.value = tussenvoegsels.value.toLowerCase();
	}

// ACHTERNAAM
	function correctAchternaam(achternaam) {
		// Eerste letter van de achternaam in Format zetten : abc def > Abc Def
		var i = 0;
		var j = 0;
		var k = 0;
		var m = 0;
		var achtern = achternaam.value;
		var srcIndex;
		var achternaamPart = new Array();
		var achternaamPartLos = new Array();
		var achternaamPartAangepast = new Array();
		var achternaamLastLos = new Array();
		var achternaamAangepast = "";
		var achternaamLast = "";
		achtern = achtern.toLowerCase();
		while ( srcIndex != -1) {
			srcIndex = achtern.search(" ")
			if ( srcIndex != -1) {
				achternaamPart[i] = achtern.substr(0 , srcIndex);
				achternaamPartLos = achternaamPart[i].split("");
				achternaamPartLos[0] = achternaamPartLos[0].toUpperCase();
				achternaamPartAangepast[i] = "";
				j = 0;
				while ( j < achternaamPartLos.length ) {
					achternaamPartAangepast[i] = achternaamPartAangepast[i] + achternaamPartLos[j];
					j ++;
				}
				srcIndex++;
				achtern = achtern.slice(srcIndex , achtern.length);
				i++;
			}
		}
		while ( k < achternaamPartAangepast.length)	{
			achternaamAangepast += achternaamPartAangepast[k];
			achternaamAangepast += " ";
			k++;
		}
		achternaamLastLos = achtern.split("");
		achternaamLastLos[0] = achternaamLastLos[0].toUpperCase();
		while ( m < achternaamLastLos.length ) {
			achternaamLast += achternaamLastLos[m];
			m++;
		}
		achternaamAangepast = achternaamAangepast + achternaamLast;
		achternaam.value = achternaamAangepast;
	}

	function goBack() {
		new Effect.BlindDown('form_part_1');
	}

	function updateForm(el) {
		if ((el.value!="")&&(el.value!="Informatie aanvraag")) {
			$('frmrowvestiging').style.display="";
			$('vestiging').style.display="";
		} else {
			$('frmrowvestiging').style.display="none";
			$('vestiging').style.display="none";
		}
	}
	
	function checkInspFront() {
		var myForm = document.getElementById("inspiratie_front");
		var inputs = myForm.getElementsByTagName("input");
		var valid  = false; var value = "";
		for (var i=0;i<inputs.length;i++) if (inputs[i].type=="radio"&&inputs[i].checked) { value = inputs[i].value; valid=true; }
		if (!valid) alert("Maak a.u.b. een keuze"); else {
			if (value=="vierluik") document.getElementById("bodytext").innerHTML = "In ons stijlvolle vierluik vindt u een selectie van de nieuwste en meest inspirerende keukenontwerpen. Vraag het nu aan via onderstaand formulier. U krijgt dan het vierluik op korte termijn thuisgestuurd.";
			if (value=="coupon") document.getElementById("bodytext").innerHTML = "In ons stijlvolle inspiratieboek vindt u de nieuwste keukentrends, innovatieve ideeën en de mooiste keukencreaties. Vraag het nu aan via onderstaand formulier. U ontvangt dan een coupon waarmee u in een van onze toonzalen het stijlvolle inspiratieboek gratis kunt afhalen.";
			new Effect.BlindUp('inspiratie_front');
		}
	}