function hover(id) {
	var menuitem = document.getElementById(id);
	menuitem.className = "hover";
}
function hout(id) {
	var menuitem = document.getElementById(id);
	if(menuitem.className!="active")
		menuitem.className = "";
}
function hover(id, color) {
	var menuitem = document.getElementById(id);
	if(menuitem.className!="active")
		menuitem.className = "hover_"+color;
}
function initmenu() {
	var menu = document.getElementById("menu");
	var items = menu.getElementsByTagName("li");
	for(i=0; i<items.length; i++) {
		items[i].onmouseover = function() {hover(this.id);};
		items[i].onmouseout = function() {hout(this.id);};
		items[i].onclick = function() {location.href=this.firstChild.getAttribute("href");};
	}
}

window.onload = function() {
	initmenu();
};

