function toonopstap(TheID){
		if (document.getElementById(TheID).style.display=="inline"){
			document.getElementById(TheID).style.display="none";		
		} else {
			document.getElementById(TheID).style.display="inline";	
		}
}
function do_check()	{
	veld1 = document.getElementById('ztypereis');
	veld2 = document.getElementById('bestemming');	

	var error = '';
	if(veld1.value == 'A' && veld2.value == 'A') {
		error += '\r\n';
		error +=  '- Kies uw type reis en/of kies uw bestemming';
	}
	if(veld1.value == 'B' && veld2.value == 'B') {
		error += '\r\n';
		error +=  '- Kies uw type reis en/of kies uw bestemming';
	}	
	if(veld1.value == 'A' && veld2.value == 'B') {
		error += '\r\n';
		error +=  '- Kies uw bestemming';
	}	
	if(veld1.value == 'B' && veld2.value == 'A') {
		error += '\r\n';
		error +=  '- Kies uw bestemming';
	}		
	if(error.length > 0)	{
		alert('Opgelet:'+error);
		return(false);
	}
	else
		return(true);		
}
function openBrWindow(theURL) {
  window.open( theURL, '', 'titlebar=no,toolbar=no,resizeable=yes,status=no,scrollbars=auto' );
}
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 MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
theAgent=navigator.userAgent.toLowerCase();
DOM = (!document.all) && (document.layers!="undefined");
IE  = (theAgent.indexOf("webtv") == -1) && (theAgent.indexOf("opera") == -1) && (theAgent.indexOf("msie") != -1);
PNG = DOM || (IE && parseInt(parseFloat(theAgent.substring(4+theAgent.indexOf("msie"))))>6);

if(document.all && !document.getElementById){
   document.getElementById = function(id){ return document.all[id] }
}

function SetMenu(){
	mh=nyb=document.getElementById('mnu').clientHeight;
	document.getElementById('mnu').style.top='-'+mh+'px';
	document.onmousemove=MouseSpy;
	mnuInterval=setInterval("MoveMenu()", 30);
	mcurpos=endpos=-mh; nxr=200;
}

function RunMnu(){ endpos=0; }

function MouseSpy(e){
	w=(DOM)?window.innerWidth:(document.documentElement.clientWidth)?document.documentElement.clientWidth:document.body.clientWidth;
	ofsY=(DOM)?window.pageYOffset:(document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;
	my=(DOM)?e.clientY:event.clientY;
	mx=(DOM)?e.clientX:event.clientX; wm=(w-780)/2;
	if(mx<wm+420 || mx>wm+420+nxr || my<175-ofsY || my>205+nyb-ofsY){ endpos=-mh; SubSub(false); }
}

runisset=minisset=false;
function MoveMenu(){ mrun=false;
	if(mcurpos.toFixed(0)!=endpos){
		mcurpos+=(endpos-mcurpos)/5; document.getElementById('mnu').style.top=mcurpos.toFixed(0)+'px'; mrun=true;
	}
	if(!runisset && mrun){document.getElementById('mnucont').style.height=nyb+'px'; runisset=true; minisset=false;
	}else if(!minisset && !mrun && endpos==-mh){document.getElementById('mnucont').style.height='0px'; minisset=true; runisset=false;}
}

strg=ostrg=false;
function SubSub(strg){
	if(ostrg)document.getElementById('sub'+ostrg).style.visibility='hidden';
	if(strg)document.getElementById('sub'+strg).style.visibility='visible';
	nxr=(strg)?360:200; document.getElementById('mnucont').style.width=nxr+'px';
	nyb=(strg)?document.getElementById('sub'+strg).clientHeight+strg*28:mh; nyb=(nyb<mh)?mh:nyb;
	if(runisset)document.getElementById('mnucont').style.height=nyb+'px';
	ostrg=strg;
}
