function init_menu() {
	var menu = document.getElementById('menu');
	var li = menu.getElementsByTagName('LI'), i = li.length;
	while (i--) li.item(i).onmouseover = showMenu;
	menu.onmouseout = timeout;
	menu.onmouseover = cleartimer; 
}

var timer = null;
function timeout() {

	timer = setTimeout('hideMenus(document.getElementById("menu"), null)', 500);
}

function cleartimer() {
	if (timer != null) clearTimeout(timer);
}

function showMenu() {
	hideMenus(this.parentNode, this);

	var el = this.firstChild;
	while (el != null && (el.nodeType != 1 || el.tagName != 'UL')) el = el.nextSibling;

	if (el != null) el.style.display = 'block';
	
	if (IE4 && document.getElementById('fronttabboxhider') != null) {
		// alleen uitvoeren als element 'foo' bestaat
		hideLayer('fronttabboxhider');
	}
}

function hideMenus(level, skipli) {
	var stack = [level], i = 1, li, j, el;
	while (i--) {
		li = stack[i].childNodes, j = li.length;
		while (j--) {
			el = li.item(j);
			if (el != null && el != skipli && (el.tagName == 'UL' || el.tagName == 'LI')) {
				stack[i++] = el;
				if (el.tagName == 'UL') el.style.display = 'none';
				}
		}
	}
	if (IE4 && document.getElementById('fronttabboxhider') != null) {
		// alleen uitvoeren als element 'foo' bestaat
		showLayer('fronttabboxhider');
	}
}
        NS4    = (document.layers)             ? true : false;
        IE4    = (document.all)              ? true : false;
        NS6    = (!IE4 && document.getElementById) ? true : false;
        
        function whatLayerStyle(id) {
            return (
                NS4 ? document.layers[id] :
                IE4 ? document.all[id].style :
                NS6 ? document.getElementByID(id).style : 
                null
            );
        }
        
        function hideLayer(id) {
			theLayer = whatLayerStyle(id);
			theLayer.visibility = "hidden";
        }

        function showLayer(id) {
            theLayer = whatLayerStyle(id);
            theLayer.visibility = "visible";
        }

