addOnload(initMenu);

function addOnload(newFunction) {
	var oldOnload = window.onload;
	
	if (typeof oldOnload == "function") {
		window.onload = function() {
			if (oldOnload) {
				oldOnload();
			}
			newFunction();
		}
	}
	else {
		window.onload = newFunction;
	} 
}

function initMenu() {
	document.getElementById("newhitbox").onmouseover = newsbox;
	document.getElementById("newhitbox").onmouseout = denewsbox;
	document.getElementById("abouthitbox").onmouseover = aboutbox;
	document.getElementById("abouthitbox").onmouseout = deaboutbox;
	document.getElementById("mediahitbox").onmouseover = mediabox;
	document.getElementById("mediahitbox").onmouseout = demediabox;
	document.getElementById("forumhitbox").onmouseover = forumbox;
	document.getElementById("forumhitbox").onmouseout = deforumbox;
}

function newsbox() {
	document.getElementById("news").className = "newshover";
}

function denewsbox() {
	document.getElementById("news").className = "news";	
}

function aboutbox() {
	document.getElementById("about").className = "abouthover";	
}

function deaboutbox() {
	document.getElementById("about").className = "about";	
}

function mediabox() {
	document.getElementById("media").className = "mediahover";	
}

function demediabox() {
	document.getElementById("media").className = "media";	
}

function forumbox() {
	document.getElementById("forum").className = "forumhover";	
}

function deforumbox() {
	document.getElementById("forum").className = "forum";	
}
