var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var IE5 = (bName == "Microsoft Internet Explorer" && bVer >= 5);
var NS3 = (bName == "Netscape" && bVer < 4);
var NS4 = (bName == "Netscape" && bVer >= 4);
var NS6 = (bName == "Netscape" && bVer >= 5);
var menuActive = 0
var menuOn = 0
var onLayer = "";
var imgDown = 0
var timeOn = null

if ((NS4 || IE4) && !(NS6||IE5)) {
	if (navigator.appName == "Netscape") {
		layerStyleRef="layer.";
		layerRef="document.layers";
		styleSwitch="";
	} else {
		layerStyleRef="layer.style.";
		layerRef="document.all";
		styleSwitch=".style";
	}
}

function hideLayer(layerName){
	if (layerName=='') {
		return;
	}
	if (menuActive == 0) {
		if (IE5) {
			var a=document.getElementById(layerName);
			a.style.visibility="hidden";
			//a.style.height="0px";
			//swap(document.getElementById('menu_'+layerName), eval('img_menu_'+layerName));
			imgDown=0;
		}
		else {
			if (IE4) {
				eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
				//swap(eval('menu_'+layerName), eval('img_menu_'+layerName));
				imgDown=0;
			}
		}
	}
}

function btnOut(layerName) {
	if (menuActive == 0) {
		hideLayer(onLayer)
	}
}

//Timer voor het verlaten van de submenu-dropdown-layer met de muiscursor..
function btnTimer() {
	timeOn = setTimeout("btnOut()",1000)
}


function showLayer(layerName) {
	if (timeOn != null) {
		clearTimeout(timeOn)
		hideLayer(onLayer)
	}
	if (IE5) {
		var a=document.getElementById(layerName);
		a.style.visibility="visible";
	}
	else {
		if (IE4) {
			eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
		}
	}
	onLayer = layerName
}

function swap(imagename, swapname) {
//imagename.src=swapname.src;
}

function swapClass(obj, cls) {
  obj.className = cls
}

function menuOver(itemName) {
	clearTimeout(timeOn)
}

//Het onmouseout-event van de submenu-dropdown-layer..
function menuOut(itemName) {
	menuActive = 0
	timeOn = setTimeout("hideLayer(onLayer)", 400)
}

// speciaal voor kunstwacht
function hideAllBut(zoek){
	hideLayer('zoekschermpje');

}

function showDetail(zoek){
 hideAllBut(zoek);
 showLayer(zoek);
 
}







