var WAIT_IN_MSECS=0;
var timer=null;
var active = ""

function showhide(name, status) {
	document.getElementById(name).style.visibility = status;
}



function changeImages() {
	if (document.layers) {
		for (var z=0; z<changeImages.arguments.length; z+=3) {
		   document.layers[changeImages.arguments[z+2]].document[changeImages.arguments[z]].src = changeImages.arguments[z+1];
		}
	}
	
	else if (document.images) {
			 for (var z=0; z<changeImages.arguments.length; z+=3) {
				document[changeImages.arguments[z]].src = changeImages.arguments[z+1];
			 }
		}
}



function dropdown(delay, name, status) {
	if(delay) {	
    	timer=setTimeout("showhide(\""+name+"\",\""+status+"\")",WAIT_IN_MSECS);
	}
	else {
		if (timer) {
			clearTimeout(timer);
			timer=null;
		}
		showhide(name, status);
	}
}


/* this function shows the pop-up when
 user moves the mouse over the link */
function ShowCSSPopUp(el_name1, el_name2)
{
		/* get the mouse left position */
		/*x = event.clientX + document.body.scrollLeft + 5;*/
	x = doc_getRealLeft(el_name1);
		/* get the mouse top position  */
		/*y = event.clientY + document.body.scrollTop + 35;*/
	/* display the pop-up */
	y = doc_getRealTop(el_name1);
		/*CSSPopUp.style.display="block";*/
	document.getElementById(el_name2).style.display="block";
	document.getElementById(el_name2).style.left = x+20+"px";
	document.getElementById(el_name2).style.top = y-50+"px";
		/* set the pop-up's left */
		/*CSSPopUp.style.left = x+20+"px";*/
		/* set the pop-up's top */
		/*CSSPopUp.style.top = y-50+"px";*/
}
/* this function hides the pop-up when
 user moves the mouse out of the link */
function HideCSSPopUp(el_name)
{
	/* hide the pop-up */
	document.getElementById(el_name).style.display="none";
}

function doc_getRealLeft(imgElem) {
	 var imgObj = document.images[imgElem];
	 xPos = imgObj.offsetLeft;
	 tempEl = imgObj.offsetParent;
	 while (tempEl != null) {
		  xPos += tempEl.offsetLeft;
		  tempEl = tempEl.offsetParent;
	 }
	 return xPos;
}

function doc_getRealTop(imgElem) {
	 var imgObj = document.images[imgElem];
	 yPos = imgObj.offsetTop;
	 tempEl = imgObj.offsetParent;
	 while (tempEl != null) {
			 yPos += tempEl.offsetTop;
			 tempEl = tempEl.offsetParent;
	 }
	 return yPos;
}


/*window.onload	=	hideAll;*/


function hideLevel(menuitemId) {
 var thisLevel = document.getElementById(menuitemId);
 thisLevel.style.display = "none";

}

function showLevel(menuitemId) {

 var thisLevel = document.getElementById(menuitemId);

 // Genereren en zichtbaar maken van menuitem
 if (thisLevel.style.display == "none") {
   thisLevel.style.display = "block";
   if (vorige != "geen_level_zichtbaar" && vorige != menuitemId) {
	 hideLevel(vorige);
   }
 }
 else {
   hideLevel(menuitemId);
 }
 vorige = menuitemId;
}

/*function hideAll() {

	 hideLevel("1");

}
*/

function noSpam(user,domain,country,extra) {
	locationstring = "mailto:" + user + "@" + domain + "." + country + extra;
//	window.location.href = locationstring;
	document.write('<a href="' + locationstring + '">' + user + '@' + domain + '.' + country + '</a>');
}
