<!--
function checkBrowser() {
	this.ver=navigator.appVersion;
	this.dom=document.getElementById?1:0; 
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns6=(this.dom && parseInt(this.ver) >= 5)?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.ie4mac = (this.ver>=4) && (this.ver<5) && (navigator.appVersion.indexOf("Mac")>-1) && (!ns4) && (!ns6);
	this.ie5mac = (this.ver>=5) && (navigator.appVersion.indexOf("Mac")>-1) && (!n4) && (!ns6);
	
	// is the users browser compatible with the webapplication?
	this.compatible=(this.ie5 || this.ie4 || this.ns4 || this.ie5mac);
	this.ie = (this.ie4 || this.ie5 || this.ie5mac)
	this.ns = (this.ns4);
	this.mac = (navigator.appVersion.indexOf("Macintosh")>0)
	this.win = (navigator.appVersion.indexOf("Win")>0)
	return (this)
}

var browser = new checkBrowser();

// IMAGE PRELOAD AND SWAP

function preloadImages() {
	var browser = new checkBrowser(); 
	if (document.images) {
		var imgStr = preloadImages.arguments;
		if (!document.preloadArray) document.preloadArray = new Array();
		var n = document.preloadArray.length;
		for (var i=0; i<preloadImages.arguments.length; i++) {
			document.preloadArray[n] = new Image;
			document.preloadArray[n].src = imgStr[i];
			n++;
		} 
	}
}

function swapImage(imgSrc,imgID,layerID,layerMother,layerGrandmother) {
	var browser = new checkBrowser();
 
	if(browser.ns) {
		var layerStr = (swapImage.arguments.length > 4) ? "document." + layerGrandmother + "." : "";
		layerStr += (swapImage.arguments.length > 3) ? "document." + layerMother + "." : "";
		layerStr += (swapImage.arguments.length > 2) ? "document." + layerID + "." : "";
		eval(layerStr + "document." + imgID + ".src = '" + imgSrc + "'");
	} else {
		var layerStr = (swapImage.arguments.length > 2) ? "document.all." + layerID + "." : "";
		eval(layerStr + "document." + imgID + ".src = '" + imgSrc + "'");
	}
}

function NieuwVenster( URL, sArg ) {
    if ( NieuwVenster.arguments.length == 1 ) { sArg = "width=400,height=370,scrollbars=yes"; }
	win = window.open(URL, "nieuw", sArg);
	//return win;
}

var active;
var oldImage = 0;	

function doSwap(naam,status,altimg){
	useimg = "stip";
	if (altimg) useimg = "stip2";
	if (status == 1) swapImage('../images/'+useimg+'_ro.gif',naam);
	if (status == 2) {
			if (active != naam) swapImage('../images/'+useimg+'.gif',naam);
	}
	if (status == 3) {
			if (active) {
				swapImage('../images/'+useimg+'.gif',active);
			}
		 	swapImage('../images/'+useimg+'_ro.gif',naam);
		 	active = naam;
		 	//oldImage = plaatje;
	}
	//window.focus()
}

var timer = Array();
var current = 204;
function popSub(el, show)
{
	if (el)
	{
		if (current != el)
		{
			hidePop(current);
		}
		current = el;
		clearTimeout(timer[el]);
		main = document.getElementById("main"+el);
		popmenu = document.getElementById("sub"+el);

		if (show)
		{
			posx = findPosX(main);
			posy = findPosY(main);
			popmenu.style.left = (posx + 150);
			popmenu.style.top = (posy-3);
			popmenu.style.display = 'block';
			//main.style.backgroundColor = "#869C5A";
		}
		else
		{
			timer[el] = setTimeout("hidePop("+el+")", 350);
		}
	}
}

function hidePop(el)
{
	popmenu = document.getElementById("sub"+el);
	popmenu.style.display = 'none';
	main = document.getElementById("main"+el);
	//main.style.backgroundColor = "";
	
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

//-->
