function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function flvS3(v1){//v1.2
var v2=MM_findObj(v1);if (!v2){this.x=this.y=this.h=this.w=0;return;}var v3,v4,v5,v6,v7=(document.layers)?v2:v2.style;v3=isNaN(parseInt(v7.left))?v2.offsetLeft:parseInt(v7.left);v4=isNaN(parseInt(v7.top))?v4=v2.offsetTop:parseInt(v7.top);if (v2.offsetHeight){v5=v2.offsetHeight;v6=v2.offsetWidth;}else if (document.layers){v5=v7.clip.height;v6=v7.clip.width;}else {v5=v6=0;}this.x=parseInt(v3);this.y=parseInt(v4);this.h=parseInt(v5);this.w=parseInt(v6);}

function flvS7(){//v1.0
var v1=(arguments.length>0)?arguments[0]:window;if (v1.innerWidth){this.x=v1.pageXOffset;this.y=v1.pageYOffset;this.w=v1.innerWidth;this.h=v1.innerHeight;}else {var v2=document;if (v2.documentElement&&v2.documentElement.clientWidth){var v3=v2.documentElement;this.x=v3.scrollLeft;this.y=v3.scrollTop;this.w=v3.clientWidth;this.h=v3.clientHeight;}else if (v2.body){var v4=v2.body;this.x=v4.scrollLeft;this.y=v4.scrollTop;this.w=v4.clientWidth;this.h=v4.clientHeight;}else {this.x=this.y=this.w=this.h=0;}}}

function flvS8(v1,v2,v3){//v1.0
var v4=(document.layers)?v1:v1.style;var v5=flvS5();eval("v4.left='"+v2+v5+"'");eval("v4.top='"+v3+v5+"'");}

function flvS5(){//v1.0
var v1=((parseInt(navigator.appVersion)>4||navigator.userAgent.indexOf("MSIE")>-1)&&(!window.opera))?"px":"";return v1;}

function dmxFPLP5(v1,v2){// v1.03
var v3=MM_findObj(v1),v4=window,v5=new flvS7(),v6=new flvS3(v1),v7,v8;this.cx=v6.x;this.cy=v6.y;if (v2){v3.PLP3=v5.w;v3.PLP4=v5.h;if (v3.PLP6==0||v3.PLP6==1){v8=v3.PLP19;}else if (v3.PLP6==2){v8=Math.round((v5.h/2)-(v6.h/2));}else {v8=v5.h-(v6.h+v3.PLP19);}v3.PLP1=v8;if (v3.PLP7==0||v3.PLP7==1){v7=v3.PLP20;}else if (v3.PLP7==2){v7=Math.round((v5.w/2)-(v6.w/2));}else {v7=v5.w-(v6.w+v3.PLP20);}v3.PLP2=v7;this.cx=v7;this.cy=v8;flvS8(v3,v7,v8);}if (v3.PLP17==0){if (v3.PLP13==0||v3.PLP13==2){if (v3.PLP6==0||v3.PLP6==1){v8=v5.y+v3.PLP19;}else if (v3.PLP6==2){v8=Math.round(v5.y+(v5.h/2)-(v6.h/2));}else {v8=v5.y+v5.h-(v6.h+v3.PLP19);}}else {v8=this.cy;}v3.PLP1=v8;if (v3.PLP13==1||v3.PLP13==2){if (v3.PLP7==0||v3.PLP7==1){v7=v5.x+v3.PLP20;}else if (v3.PLP7==2){v7=Math.round(v5.x+(v5.w/2)-(v6.w/2));}else {v7=v5.x+v5.w-(v6.w+v3.PLP20);}}else {v7=this.cx;}v3.PLP2=v7;}else {if (v3.PLP9==1){if (v3.PLP1<v5.y){v8=v5.y+v3.PLP15;}else {var v9=v5.y+v5.h;var v10=v3.PLP1+v6.h+v3.PLP15;if (v10>v9){v8=v9-(v6.h+v3.PLP15);}else {v8=v3.PLP1;}}}else {v8=v3.PLP1;}if (v3.PLP10==1){if (v3.PLP2<v5.x){v7=v5.x+v3.PLP16;}else {var v11=v5.x+v5.w;var v12=v3.PLP2+v6.w+v3.PLP16;if (v12>v11){v7=v11-(v6.w+v3.PLP16);}else {v7=v3.PLP2;}}}else {v7=v3.PLP2;}}this.nx=(v7<v3.PLP20)?v3.PLP20:v7;this.ny=(v8<v3.PLP19)?v3.PLP19:v8;}

function dmxFPLP4(v1){// v1.03
var v2=MM_findObj(v1),v3=(document.layers)?v2:v2.style,v4=new flvS7(),v5=0;if (v2.PLP11!=null){clearTimeout(v2.PLP11);}if (v2.PLP3!=v4.w||v2.PLP4!=v4.h){v5=1;}var v6=new dmxFPLP5(v1,v5),v7=v6.nx,v8=v6.ny;if ((v6.cx!=v7)||(v6.cy!=v8)){if (v2.PLP5>0){if (v2.PLP8>0){var v9=v2.PLP8,v10=v2.PLP8,v11=Math.abs(v6.cx-v7),v12=Math.abs(v6.cy-v8);if (v11<v12){v10=(v11!=0)?((v12/v11)*v2.PLP8):v2.PLP8;}else {v9=(v12!=0)?((v11/v12)*v2.PLP8):v2.PLP8;}if (v9>=v11){v9=Math.min(Math.ceil(v9),v2.PLP8);}if (v10>=v12){v10=Math.min(Math.ceil(v10),v2.PLP8);}if ((v6.cx<v7)&&(v6.cx+v9<v7)){v7=v6.cx+v9;}if ((v6.cx>v7)&&(v6.cx-v9>v7)){v7=v6.cx-v9;}if ((v6.cy<v8)&&(v6.cy+v10<v8)){v8=v6.cy+v10;}if ((v6.cy>v8)&&(v6.cy-v10>v8)){v8=v6.cy-v10;}}else {var v11=((v7-v6.cx)/v2.PLP5),v12=((v8-v6.cy)/v2.PLP5);v11=(v11>0)?Math.ceil(v11):Math.floor(v11);v7=v6.cx+v11;v12=(v12>0)?Math.ceil(v12):Math.floor(v12);v8=v6.cy+v12;}}if (v11!=0||v12!=0){flvS8(v2,v7,v8);}var v13="dmxFPLP4('"+v1+"')";v2.PLP11=setTimeout(v13,10);}}

function dmxFPLP3(){// v1.03
var v1=document;for (i=0;i<v1.PLP12.length;i++){var v2=v1.PLP12[i],v3=MM_findObj(v2);if (v3.PLP14){dmxFPLP4(v2);}}if (!v1.PLP21){var v4="dmxFPLP3()";setTimeout(v4,10);}}

function dmxFPLP1(){// v1.03
// Copyright 2003, Marja Ribbers (FlevOOware.nl), George Petrov (DMXzone.com)
var v1=arguments,v2=v1[0],v3=MM_findObj(v2),v4=false,v5=false,v6=window,v7=document,v8=new flvS3(v2);if (!v3){return;}if (v7.PLP12==null){v7.PLP12=new Array();v4=true;}for (var v9=0;v9<v7.PLP12.length;v9++){if (v7.PLP12[v9]==v2){v5=true;break;}}if (!v5){v7.PLP12[v7.PLP12.length]=v2;}var v10=(v7.layers)?v3:v3.style;v7.PLP18=navigator.userAgent.toLowerCase().indexOf("mac")!=-1;v3.PLP7=parseInt(v1[1]);if (v3.PLP7==0){v3.PLP20=v8.x;}else {v3.PLP20=parseInt(v1[2]);if (v3.PLP7==3){var v11=v7.PLP18&&v7.getElementById&&!v6.opera&&!v7.all&&navigator.userAgent.toLowerCase().indexOf("safari")<0;v11=v11||(!v7.PLP18&&(!v7.all||(v6.opera&&parseInt(navigator.appVersion))>6));if (v3.PLP20<16&&v11){v3.PLP20=v3.PLP20+16;}}}v3.PLP6=parseInt(v1[3]);if (v3.PLP6==0){v3.PLP19=v8.y;}else {v3.PLP19=parseInt(v1[4]);}v3.PLP5=parseInt(v1[5]);v3.PLP8=parseInt(v1[6]);v3.PLP17=parseInt(v1[7]);if (v3.PLP17==0){v3.PLP13=parseInt(v1[8]);}else if (v3.PLP17==1){v3.PLP10=parseInt(v1[8]);v3.PLP16=parseInt(v1[9]);v3.PLP9=parseInt(v1[10]);v3.PLP15=parseInt(v1[11]);}else {v3.PLP10=0;v3.PLP9=0;}var v12=new dmxFPLP5(v2,1);if (v12.cx!=v12.nx||v12.cy!=v12.ny){flvS8(v3,v12.nx,v12.ny);}v3.PLP14=true;if (v4){v7.PLP21=v7.all&&!v6.opera&&!v7.PLP18;if (v7.PLP21){var v13=(v6.onresize)?v6.onresize:function (){};v6.onresize=function (){v13();dmxFPLP3();};v13=(v6.onscroll)?v6.onscroll:function (){};v6.onscroll=function (){v13();dmxFPLP3();};}}dmxFPLP3();}

function onSelectboxFocus(radiobutton)
{
	radiobutton.style.background='#DDDBB5';
	 
	for (i=0; i < radiobutton.length; i++)
	{
	   if (radiobutton[i].style)
		{
   	  		radiobutton[i].style.background='#DDDBB5';
		}
	}
}

function onSelectboxBlur(radiobutton)
{
	radiobutton.style.background='#FFFCC6';
	 
	for (i=0; i < radiobutton.length; i++)
	{
	   if (radiobutton[i].style)
   		{
    		radiobutton[i].style.background='#FFFCC6';
   		}
  	}
}	
	
function NewWindow(url,width,height)
{
	var hWnd = window.open(url,"PrintWindow","width=" + width + ",height=" + height + ",toolbar=no,resizable=no,scrollbars=yes");
}

function NewFotoWindow(mypage, myname, w, h, scroll) 
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',menubar=no,status=no,location=no,resizable=no,toolbar=no'
	fotowindow = window.open('', '', winprops)
	fotowindow.document.write('<html><head><title>' + myname + '</title></head><body topmargin=0 bottommargin=0 leftmargin=0 rightmargin=0><img onclick="window.close();" src="' + mypage + '"></body></html>');
}

function doIt(url) {
var x = window.showModalDialog(url,"","dialogWidth:300px; dialogHeight:200px; center:yes");
}

function refresh()
{
	window.location.reload( false );
}

// ______________________________________________________________________________
// Formulier

var fout_email_adres = "Vul een geldig E-mail adres in graag."
var fout_getal = "Dit is geen geldig getal"
// Geef alert en focus
	function GetAlert(field,error)
	{
		alert(error);
		field.focus();
		field.select();
	}

// Check op inhoud
	function isLeeg(field)
	{
		if(field.value == ""){
			return false;
		}
		return true;
	}


// E-mail check
	function isEmailAdres(field)
	{
		if (field.value.indexOf("@") == -1) {
			return false;
		}
		return true;
	}
	
	// Functions
var veld_leeg = " ben je vergeten in te vullen."
var fout_email_adres = "Vul een geldig E-mail adres in graag."
var fout_cijfer = "Dit is geen geldig getal"

var cijfers= /\d{1,}/; // Alleen nummers en minimaal 1
var postcode = /\d{4}\D{2}/
var letters = /[a-zA-Z]{1,}/; //  Alleen letters en minimaal 1
var cijfers_letters = /[a-zA-Z\d]{1,}/; //  Alleen letters en minimaal 1
var aart = /(aart)/; // Checked 1 woord
var telefoon020 = /[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9][0-9][0-9][0-9]/; // Telefoon
var zit_woord_in = /(Aart*)/; //Checked of het woord Tom ergens voorkomt
var email = /[a-zA-Z0-9]@[a-zA-Z0-9](.)[a-zA-Z\d]{2,}/; //Check voor @
var keuze = /(023-|020-|030-|050-|045-)\d{7}/ //Telefoonnummer in de volgende kengetallen