function menuinit() {

	atags =	document.getElementsByTagName("li");

	i=0;


	while (atag = atags[i]) {
		if (atag.id == "menu1" || atag.id == "menu2" || atag.id == "menu3") {

//			atag.onclick = expandfunc;
			atag.onmouseover = expandfunc;
		}

		if(atag.id) {
//			atag.onmouseover = testover;
//			atag.onmouseout = testout;
		}

		i++;
	}

	function expandfunc(e) {

		if (!e) var e = window.event;

		target = e.target;
		if (!target) target = e.srcElement;

		while (target.tagName != "LI") {
			target = $(target).getParent();
		}

		parentlist = target;
		while (parentlist.tagName != "UL") {
			parentlist = $(parentlist).getParent();
		}
	
		hidefunc();

		parentlist.style.display = "block";

		if(document.getElementById(target.id+"_sub")) {

			document.getElementById(target.id+"_sub").style.display = "block";
		} 

	}

	function hidefunc() {
	
		trtags = document.getElementsByTagName("ul");

		i=0;
		while (trtag = trtags[i]) {		
			if (trtag.className == "showhide") trtag.style.display = "none";
		        i++;
		}


	}

	document.body.onclick = clickhidefunc;

	function clickhidefunc(e) {
		if (!e) var e = window.event;
		target = e.target;
		if (!target) target = e.srcElement;
		if (target.nodeName != "LI") hidefunc();
	}

	function testover() {
		this.className = "over";
	}

	function testout() {
		this.className = "";
	}

}

