	var ns = (document.layers ? true : false);
	var ie = (document.all ? true : false);
    var moz= (document.getElementById ? true:false);
	if (ie==false && moz && true);
	// alert('e mozilla')
	// menu globals
	var spacing = 135;
	var x = 332;
	var	y = 102;

	// html globals
	if (ie) {
		startTag = "<span id=\"";
		endTag = "</span>";
	}
	if (ns) {
		startTag = "<ilayer name=\"";
		endTag = "</ilayer>";
	}

// here are the colors; BY DEFAULT THE HOVER TEXT COLOR IN IE IS THE BG COLOR IN NETSCAPE
	var itemColor = "#555555";
	var itemColorSel = "#999999";
	var bgColor = "#E7E7E7";

	// internal globals
	var menuTimer = null;
	var currentMenu = null;
	var menuPause = 500;

	//code
	function hilight(theMenu, theId, isOn) {
		if (isOn) {
			if (ie) {
				document.all["item" + theMenu + theId].style.color = itemColorSel;
			}
			if (ns) {
//				document.layers["menu" + theMenu].document.layers["item" + theMenu + theId].bgColor = itemColorSel;
				document.layers["menu" + theMenu].document.layers["item" + theMenu + theId].bgColor = "#FFFFFF";
			}
			stopTimer(theMenu);
		} else {
			if (ie) {
				document.all["item" + theMenu + theId].style.color = itemColor;
			}
			if (ns) {
				document.layers["menu" + theMenu].document.layers["item" + theMenu + theId].bgColor = bgColor;
			}
			pauseHide(theMenu);
		}
	}

	function showMenu(theId, isOn) {
		if (isOn) {
			if (ie) {
//				document.all["title" + theId].style.backgroundColor = "#FF0000";
				document.all["menu" + theId].style.visibility = "visible";
			}
			if (ns) {
//				document.layers["title" + theId].bgColor = "#FF0000";
				document.layers["menu" + theId].visibility = "show";
			}
			stopTimer(theId);
		} else {
			if (ie) {
//				document.all["title" + theId].style.backgroundColor = "transparent";
				document.all["menu" + theId].style.visibility = "hidden";
			}
			if (ns) {
//				document.layers["title" + theId].bgColor = "#FFFFFF";
				document.layers["menu" + theId].visibility = "hide";
			}
		}
	}

	function pauseHide(theId) {
		if (menuTimer) {
			clearTimeout(menuTimer);
		}
		currentMenu = theId;
		menuTimer = setTimeout("showMenu(" + theId + ", false)", menuPause);
	}

	function stopTimer(theId) {
		if (menuTimer) {
			clearTimeout(menuTimer);
			menuTimer = null;
		}
		if (currentMenu != null) {
			if (theId != currentMenu) {
				showMenu(currentMenu, false);
			}
			currentMenu = null;
		}
	}

function initMenu(relPath) {
	for (i = 0; i < numMenus; i++) {
		if (ie) {
/*if(i==numMenus-1)
	document.writeln('<div id="menu' + i + '" style="position: absolute; left: ' + (x + (spacing * i)-63) + 'px; top: ' + y + 'px; visibility: hidden;">');
	else*/
			document.writeln('<div id="menu' + i + '" style="position: absolute; left: ' + (x + (spacing * i)) + 'px; top: ' + y + 'px; visibility: hidden;">');
		}
		if (ns) {
/*	if(i==numMenus-1)
document.writeln('<layer name="menu' + i + '" left=' + (x + (spacing * i)-50) + ' top=' + y + ' visibility="hide">');
	else*/
			document.writeln('<layer name="menu' + i + '" left=' + (x + (spacing * i)) + ' top=' + y + ' visibility="hide">');
		}
		document.writeln('<table border=0 cellpadding=0 cellspacing=0>');
		document.writeln('<tr>');
		document.writeln('<td bgcolor="E7E7E7" style="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=90)"><table border=0 cellpadding=0 cellspacing=1>');
		theArray = eval("menu" + i);
		theLink = eval("link" + i);
		for (j = 0; j < theArray.length; j++) {
			document.writeln("<tr>");
			if (theArray[j] != "") {
				var theItem = theArray[j];
				if (theItem.charAt(0) == "-") {
					theItem = '<img src="' + relPath + 'images/nav-norm.gif" width=9 height=9 border=0> ' + theItem.substring(1);
				}
				if (theLink[j] != "") {
					document.writeln('<td height="16" bgcolor="#E7E7E7">' + startTag + 'item' + i + j + '">&nbsp;<a href="' + relPath + theLink[j] + '" class="menuitem" onMouseOver="hilight(' + i + ', ' + j + ', true)" onMouseOut="hilight(' + i + ', ' + j + ')">' + theItem + '</a>' + endTag + '&nbsp;</td>');
				} else {
					document.writeln('<td height="16" bgcolor="#E7E7E7">' + startTag + 'item' + i + j + '">&nbsp;<a href="#" class="menuitem" onMouseOver="hilight(' + i + ', ' + j + ', true)" onMouseOut="hilight(' + i + ', ' + j + ')">' + theItem + '</a>' + endTag + '&nbsp;</td>');
				}
			} else {
				document.writeln('<td height="16" bgcolor="#FFFFFF"><img src="' + relPath + 'images/dot-clear.gif" width=1 height=1 border=0></td>');
			}
			document.writeln("</tr>");
		}
		document.writeln('</table></td>');
		document.writeln('</tr>');
		document.writeln('</table>');
		if (ie) {
			document.writeln("</div>");
		}
		if (ns) {
			document.writeln("</layer>");
		}
	}
}