// TOGGLE MENU (faq)

function mOvr(src,clrOver) { if (!src.contains(event.fromElement)) {src.bgColor = clrOver; }}
function mOut(src,clrIn) { if (!src.contains(event.toElement)) {  src.bgColor = clrIn; }}

function cOn(tr){
  if (document.getElementById||(document.all && !(document.getElementById))) {
    tr.style.backgroundColor="#E6E7CD";
  }
}

function cOut(tr){
  if(document.getElementById||(document.all && !(document.getElementById))){
    tr.style.backgroundColor="#E9E9E9";
  }
}
		
		function CHelp_overFaqCat(n) {
			document.getElementById('tdFaqCat'+n).className = 'bgmagenta'
		}
		function CHelp_outFaqCat(n) {
			if(!(document.getElementById('cat_'+n).style.display == 'block')) document.getElementById('tdFaqCat'+n).className = 'bggray3'
		}

		function CHelp_openFaqCat(n) {	
		  var el = document.getElementById('cat_'+n);
		  if (el!=null)
			if(!(el.style.display == 'block'))
				CHelp_ExpandPath(document.getElementById('cat_'+n))
			else
				CHelp_showCat(n,false)	
		}
		
		function CHelp_openFaqQuestion(n) {
		  var el = document.getElementById('question_'+n);
		  if (el!=null)
			if(!(el.style.display == 'block'))
				CHelp_ExpandPath(document.getElementById('question_'+n))
			else
			    CHelp_showQuestion(n,false)		
		}

		function CHelp_showCat(n,visible) {	
			if (visible) {
				document.getElementById('cat_'+n).style.display = 'block'
				document.getElementById('tdFaqCat'+n).className = 'bgmagenta'
				document.getElementById('iconCat'+n).src = '/images/faq_minus.gif'
			}
			else {
				document.getElementById('cat_'+n).style.display = 'none'
				document.getElementById('tdFaqCat'+n).className = 'bggray3'
				document.getElementById('iconCat'+n).src = '/images/arrow.gif'
			}
		}

		function CHelp_showQuestion(n,visible) {
			if (visible) {
				document.getElementById('question_'+n).style.display = 'block'
				document.getElementById('tdQuestion'+n).style.fontWeight = 'bold'
				document.getElementById('iconQuestion'+n).src = '/images/arrow_toggle.gif'
			}
			else {
				document.getElementById('question_'+n).style.display = 'none'
				document.getElementById('tdQuestion'+n).style.fontWeight = 'normal'
				document.getElementById('iconQuestion'+n).src = '/images/arrow.gif'
			}
		}

		function CHelp_NoQuestionsFound(tekst){
			document.getElementById("formError").className= 'formerror';
			document.getElementById("formError").innerHTML = tekst;
		}


		function CHelp_SelectCategory(link) {
		    var frm = document.form1; 
		    if (frm.mainCat.value>0) {
				frm.cat.value = document.form1.mainCat.value;
				frm.openid.value = ""; // reset
				frm.action = document.URL.split('?')[0];
				if (frm.keywords)
				  frm.keywords.value = ""; // reset search
				frm.submit();
  			}
		}

		function CHelp_SubmitForm(link){
			//check if keyword field is empty
			if (document.form1.keywords.value == "") isNotEmpty(document.form1.keywords)

			if (flag){
				document.form1.keywords.value = document.form1.keywords.value;
				document.form1.openid.value = ""; // reset
				document.form1.cat.value = ""; // reset
				document.form1.action = link;
				document.form1.submit();
			}else{
				flag = 1;
				return false;
			}
		}
		//OnSubmitDemultiplexer.push( CHelp_SubmitForm );

		var selElement=null;
		
		function CHelp_ShowElementPath(el,visible) {
		    var i = 1;
		    
		    for (i=1; i<30; i++) {
		      if (el.id.indexOf("question")!=-1) CHelp_showQuestion(el.id.split("_")[1],visible)
		      if (el.id.indexOf("cat")     !=-1) CHelp_showCat(el.id.split("_")[1],visible)
				 
 	 	      el = el.parentNode;
 	 	      if (el.id=="results") break;
			}
		}

		function CHelp_ExpandPath(el) {
		    if (selElement!=null) 
				CHelp_ShowElementPath(selElement, false);

			CHelp_ShowElementPath(el, true);

			selElement = el;
		}

// RANDOM HEADER
var aantal_headers = 12;
var header = Math.floor(Math.random() * aantal_headers );
var source="/images/headers/header"+header+".jpg";

function laad_header()
{
document.header.src=source;
}

// ROLLOVER
<!--
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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;
}





//-->



// DROPDOWNMENU

<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->


// COOKIE

<!-- Create a session cookie for tracking with websensor -->
cook=document.cookie;
i=cook.indexOf('AONEVENEMENTENVERZEKERING_SESSIONCOOKIE');
if(i<0){
		 <!-- the cookie was not yet present, create a new cookie -->
		 id1=parseInt(Math.random()*2147418112);
		 strResolutie=window.screen.width+"x"+window.screen.height;
		 document.cookie='AONEVENEMENTENVERZEKERING_SESSIONCOOKIE='+id1+new 
Date().getTime()+'--'+strResolutie+';path=/;domain=.evenementenverzekering.nl';
}



