// JavaScript Document	

function hidemenu() {
	for (j=0;j<mnunames.length;j++) {
		document.getElementById(mnunames[j]).style.visibility="hidden";
	}
}
function resetTimer() {
	clearTimeout(tm);
	if(off) {
		tm=setTimeout("hidemenu()"); }
	else {
		var k=0;
		for (j=0;j<mnunames.length;j++) {
			if(document.getElementById(mnunames[j]).style.visibility=="visible")
				k++;
		}
		if(k>1) tm=setTimeout("hidemenu()");			
	}
}
var tm, off;
//var id="";
var mnunames = new Array();

function addmenu(idnm, txt, lnk, color, width) {
	mnunames[mnunames.length]=idnm;
//	id=idnm;
	document.write("<!--ambRemove-->");
	document.write("<div style=\"position:absolute; width:" + width + "px;  visibility:hidden\" id=\"" + idnm  + "\">");
	document.write("	<div id=\"mnu_main\" class=\"mnu_main\">");
	for (i=0;i<txt.length;i++) {	
		document.write("		<div onMouseOver=\"off=false; resetTimer(); this.style.backgroundColor='" + color + "';\" onMouseOut=\"off=false; this.style.backgroundColor=document.getElementById('mnu_main').style.backgroundColor; resetTimer();\" class=\"mnu_lnk\"><a id=\"mnulnk\" href=\"" + lnk[i] + "\">" + txt[i] + "</a></div>");
	}
	document.write("	</div>");
	document.write("</div>");	
	document.write("<!--/ambRemove-->");
}
