function addLoadEvent(func) {
	var oldonload = window.onload;
	
	if (typeof window.onload != "function") {
		window.onload = func;
	} else {
		window.onload = function () {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

/*
 * Initialse the menu for IE.
 */
function initMainMenu() {
	/* IE Check, Firefox uses CSS to render menu. */
	if (document.all && document.getElementById) {
		var navRoot = document.getElementById("dmenu2");
		if (navRoot) {
			for (i = 0; i < navRoot.childNodes.length; i++) {		
				var node = navRoot.childNodes[i];
				if (node.nodeName == "LI") {
					node.onmouseover = function() {
						this.className += " over2";
					}
					node.onmouseout = function() {
						this.className = this.className.replace(" over2", "");
					}
				}
			}
		}
	}
}