	function ClientSnifferJr()
			{
			  this.ua = navigator.userAgent.toLowerCase();
			
			  this.major = parseInt(navigator.appVersion);
			  this.minor = parseFloat(navigator.appVersion);
			
			  this.nav = (
			    (this.ua.indexOf('mozilla')!=-1)
			    && ((this.ua.indexOf('spoofer')==-1)
			    && (this.ua.indexOf('compatible') == -1))
			  );
			  this.nav2 = (this.nav && (this.major == 2));
			  this.nav3 = (this.nav && (this.major == 3));
			  this.nav4 = (this.nav && (this.major == 4));
			  this.nav4up = (this.nav && (this.major >= 4));
			  this.nav5 = (this.nav && (this.major == 5)); 
			  this.nav5up = (this.nav && (this.major >= 5));   
			  
			  this.ie = (this.ua.indexOf("msie") != -1);
			  this.ie3 = (this.ie && (this.major == 2));
			  this.ie4 = (
			    this.ie && (this.major == 4)
			    && (this.ua.indexOf("msie 5.0")==-1)
			  );
			  this.ie4up = (this.ie  && (this.major >= 4));
			  this.ie5 = (
			    this.ie && (this.major == 4)
			    && (this.ua.indexOf("msie 5.0")!=-1)
			  );
			  this.ie5up = (this.ie && !this.ie3 && !this.ie4); 
			
			  this.opera = (this.ua.indexOf("opera") != -1);
			  this.webtv = (this.ua.indexOf("webtv") != -1); 
			}
			
			var is = new ClientSnifferJr();


			window.onload = function()
			{
			  if (is.nav4up) {
			    document.captureEvents(Event.MOUSEMOVE);
			  }
			  document.onmousemove=showMousePosition;
			}
			
			function showMousePosition(e)
			{
			 /* global variables */
			   if (is.nav4up) {
			    mX = e.pageX;
			    mY = e.pageY;
			  }
			  else {
			    mX = window.event.clientX;
			    mY = window.event.clientY;
			  }
			  /*  window.status = "X="+mX+"  Y="+mY; */
			  return true;
			}

				
			function swapLayer(layerid) {
			layer = document.getElementById(layerid);
			if (layer.style.visibility=="visible") {
				layer.style.visibility="hidden";
			}
			else {
				layer.style.visibility="visible";
			};
		}
		
		function swapLayerRel(layerid) {
			layer = document.getElementById(layerid);
			if (layer.style.display=="none") {
				layer.style.display="block";
			}
			else {
				layer.style.display="none";
			};
		}

		
		function swapVisibility(layerid) {
			layer = document.getElementById(layerid)
			if (layer.style.visibility == "hidden") {
				layer.style.visibility = "visible";
			}
			else {
			 layer.style.visibility = "hidden";
			}
		}  
		
		
			function showLayer(layerid) {
				hideAllMenu();
				/* global variable for setTimeout call
				after 1000ms layerid not in scope anymore
				therefore assign value of layerid to a global variable
				that stays in scope */
				menuScope = layerid;
				layer = document.getElementById(layerid);
				layer.style.visibility = "visible";
				setTimeout('checkHideMenu(menuScope)', 1000);
			}
			
			function hideLayer(layerid) {
				layer = document.getElementById(layerid);
				layer.style.visibility = "hidden";
			} 
			
			function checkHideMenu(menu) {
				/*global variables */
				menuScope2 = menu;
				if (isInMenu(menu)) {
					setTimeout('checkHideMenu(menuScope2)', 100);
				}
				else
				{
					hideAllMenu();
				}
			}

			function hideAllMenu() {
				var i=1
				while (document.getElementById('menu' + i)) {
					hideLayer('menu' + i);
					i = i +1;
				}
			}
			
			function isInMenu(menu) {
				var menuX = getAbsX(document.getElementById(menu));
				var menuY = getAbsY(document.getElementById(menu));
				
					// count offset due to scrolling 
				if (is.nav4up) {
					offsetY = window.pageYOffset;
					offsetX = window.pageXOffset;
					}
				else {
					offsetY = document.body.scrollTop;
					offsetX = document.body.scrollLeft;
					}
				//now correct the menuY and menuX value for scrolling
				menuY=menuY - parseInt(offsetY);
				menuX=menuX - parseInt(offsetX);
				
				/*  window.status = "X="+mX+"  Y="+mY+" menuX="+menuX+" menuY="+menuY; */
				if ( (mX > menuX) && (mX < (menuX + 80)) &&
					((mY+20) > menuY) && (mY < (menuY + 120)) ) {
					return true;
					}
				else
					{
					return false;
					}
			}
			
			// get the true offset of anything on NS4, IE4/5 & NS6, even if it's in a table!
			function getAbsX(elt) { return (elt.x) ? elt.x : getAbsPos(elt,"Left"); }
			function getAbsY(elt) { return (elt.y) ? elt.y : getAbsPos(elt,"Top"); }
			function getAbsPos(elt,which) {
 			iPos = 0;
 			while (elt != null) {
 				 iPos += elt["offset" + which];
 				 elt = elt.offsetParent;
 			}
			 return iPos;
			}

	// all functions for 'remembering' the closed overview sections
function getCookie(name) {
	var cookie = " " + document.cookie;
	var search = " " + name + "=";
	var setStr = null;
	var offset = 0;
	var end = 0;
	if (cookie.length > 0) {
		offset = cookie.indexOf(search);
		if (offset != -1) {
			offset += search.length;
			end = cookie.indexOf(";", offset)
			if (end == -1) {
				end = cookie.length;
			}
			setStr = unescape(cookie.substring(offset, end));
		}
	}
	return(setStr);
}

function setHiddenOverview(number) {
// needs definition with ''
var cookieval = 'start';
for (var i=1; i <= number; i++) {
	col = (i % 3) + 1;
	// last row calculates to one row more because 3 mod 3 = 0
	// thus: 12, 13, 21 -- 22, 23, 31 -- 32, 33, 41 -- 42 etc...
	// no document.write because the objects will then disappear!
	row = ( ((i - (i % 3)) / 3) + 1 );
	lkolayer = document.getElementById('lko'+row+col);
	if (lkolayer.style.display == "none") {
		cookieval = cookieval + '-' + row + col
	}
	
}
// Erase previous set cookies to free up HTTP-HEADER space 
document.cookie = "linkov=" + null +    
    "; expires=Fri, 01-Jan-1970 00:00:00 GMT; path=//; ";

//Recreate the cookie
document.cookie = "linkov=" + escape(cookieval) + 
    "; expires=Fri, 01-Jan-2004 00:00:00 GMT; path=/; ";

  
}

function genHiddenOverview() {

var linkov = getCookie("linkov");
if (linkov) {
	//document.write('resultaat:'+linkov)
	var separator = '-';
	var loArr = linkov.split(separator);
	// i=0 is the 'start' tag
	for (var i=1; i < loArr.length; i++) {
		if (document.getElementById('lko'+loArr[i])) {
	    	lkolayer = document.getElementById('lko'+loArr[i]);
 	   		lkolayer.style.display = "none"
 	   	}
	}
}
}	

