//Algemene functies die geactiveerd worden bij een documentevent

	document.onload = onloadevent;
	document.onmousemove = mousemoveevent;
	document.onmouseup = mouseupevent;

	<!-- This function initiates functions on document load -->
	function onloadevent()
	{
	}

	<!-- This function initiates functions on mouse movement -->
	function mousemoveevent()
	{
	}

	<!-- This function initiates functions on the mouse-up event -->
	function mouseupevent()
	{
	}

//Menu functies

	function showSubmenu(elem)
	{	var submenu = elem;
		var menu = elem.parentNode;

		var parent = menu;
		var x = parent.offsetLeft;
		var y = parent.offsetTop;

		while(parent = parent.offsetParent)
		{	x += parent.offsetLeft;
			y += parent.offsetTop;
		}

		submenu.style.left = x + 'px';
		submenu.style.top  = y + menu.offsetHeight + 'px';
		submenu.style.visibility = 'visible';
		menu.className = 'menuHover';
	}

	function hideSubmenu(elem)
	{	var submenu = elem;
		var menu = elem.parentNode;

		menu.className = 'menu';
		submenu.style.visibility = 'hidden';
	}

//Algemene variabelen

	var sorting = false;


// AttachEvent Script

	/* Define IE style 'attachEvent' function for every HTML element  */
	if(typeof document.attachEvent == 'undefined' && typeof HTMLElement != 'undefined') {
		HTMLElement.prototype.attachEvent = function(event, ref) {
			var evt = event.replace(/^on/, '');
			this.addEventListener(evt, ref, false);
		}

		window.attachEvent = function(event, ref) {
			var evt = event.replace(/^on/, '');
			this.addEventListener(evt, ref, false);
		}
	}

// Popup

function openWindow(w, h, url, scroll)
{
	if (typeof scroll == 'undefined') {
		scroll = '';
	}
	scroll = (scroll == "scroll")? "yes" : "no";

	var left = (screen.width  - w) / 2;
	var top  = (screen.height - h) / 2;
	w		 = w > screen.width-30?		screen.width-30		: w; //maximale breedte popup, rekening houdend met scrollbar
	h		 = h > screen.height-100?	screen.height-100	: h; //maximale hoogte popup, rekening houdend met scrollbar en Windows Taskbar

	var openWindow = window.open(url, 'newWindow', 'width=' + w + ',height=' + h + ',left=' + left + ',top=' + top + ', scrollbars=' + scroll);
	openWindow.focus();
}
