var DHTML = (document.getElementById || document.all || document.layers);//constructorfunction Menu(mw, mih) {	this.type = "Menu";	this.mw = mw;	this.mih = mih;	this.items = new Array();	this.urls = new Array();	this.addMenuItem = addMenuItem;	if(!window.menus) {		window.menus = new Array();	}	this.label = "menuLabel" + window.menus.length;	window.menus[window.menus.length] = this;}function addMenuItem(label, url) {	this.items[this.items.length] = label;	this.urls[this.urls.length] = url;}//variable Rapperfunction FW_showMenu(objMenu, x, y) {	var elmMenu = new getObj(objMenu.label).obj;	showMenu(elmMenu, x, y);}//timeoutlengthfunction FW_startTimeout() {	scheduleHideMenu(window.activeMenu.id, 600);}//main scriptfunction showMenu(menu, x, y) {	if(window.activeMenu) {		doHideMenu(window.activeMenu.id);	}	window.activeMenu=menu;	invi(menu.id, false);	move(menu.id, x, y);}function activateMenu(menu) {	clearTimeout(window.hideMenuId);	window.activeMenu=menu;}function scheduleHideMenu(menuid, sec) {	clearTimeout(window.hideMenuId);	window.hideMenuId=setTimeout('doHideMenu("'+menuid+'")', sec);}function doHideMenu(menuid) {	invi(menuid, true);}function canselHideMenu() {	clearTimeout(window.hideMenuId);}function selectItem(sender) {	changeCol(sender.id, '#FFCC33');}function unselectItem(sender) {	changeCol(sender.id, '#EEEEEE');}function clickItem(url) {	doHideMenu(window.activeMenu.id);	location.href=url;}//for multibrowserfunction getObj(name){	if(document.getElementById)	{		this.obj = document.getElementById(name);		this.style = document.getElementById(name).style;	}	else if(document.all)	{		this.obj = document.all[name];		this.style = document.all[name].style;	}	else if(document.layers)	{		this.obj = getObjNN4(document,name);		this.style = this.obj;	}}function getObjNN4(obj,name){	var x = obj.layers;	var foundLayer;	for(var i=0;i<x.length;i++)	{		if(x[i].id == name)			foundLayer = x[i];		else if(x[i].layers.length)			var tmp = getObjNN4(x[i],name);		if(tmp) foundLayer = tmp;	}	return foundLayer;}function invi(id, flag){	if (!DHTML) return;	var obj = new getObj(id);	obj.style.visibility = (flag) ? 'hidden' : 'visible';}function move(id, x, y){	if (!DHTML) return;	var obj = new getObj(id);	obj.style.left = x;	obj.style.top = y;}function changeCol(id, col){	if (!DHTML) return;	var obj = new getObj(id);	obj.style.backgroundColor = col;}//generate HTMLfunction writeMenus() {	writeMenuStyle();	writeMenuContent();}function writeMenuContent() {	var i, j, m, mi;	var menus = window.menus;	for(i = 0; i < menus.length; i++) {		m = menus[i];		document.write('<div class="menuOuterBox" id="' + m.label + '" onmouseover="activateMenu(this)" onmouseout="scheduleHideMenu(this.id, 800)" style="width:' + m.mw + 'px;">');		document.write('<div class="menuInnerBox" onmouseover="canselHideMenu(' + "'" + m.label + "'" + ')">');		document.write('<div style="padding-bottom: 1px;">');		for(j = 0; j < m.items.length; j++) {			document.write('<div style="padding-top: 1px;">');			if ( m.items[j].match( /table/i ) ) {			document.write('<div class="menuItem" id="' + m.label + '_' + j + '" onmouseover="selectItem(this)" onmouseout="unselectItem(this)" onclick="clickItem(' + "'" + m.urls[j] + "'" + ')" style="padding-top: 3px; height: 25px;">' + m.items[j] + '</div>');			} else {			document.write('<div class="menuItem" id="' + m.label + '_' + j + '" onmouseover="selectItem(this)" onmouseout="unselectItem(this)" onclick="clickItem(' + "'" + m.urls[j] + "'" + ')" style="height:' + m.mih + 'px;">' + m.items[j] + '</div>');			}			document.write('</div>');		}		document.write('</div></div></div>');	}}function writeMenuStyle() {	document.write('<style><!--');	document.write('div.menuOuterBox {');	document.write('	position: absolute;');	document.write('	visibility: hidden;');	document.write('	background-color: #999999;');	document.write('	x-index: 3;');	document.write('}');	document.write('div.menuInnerBox {');	document.write('	background-color: #EEEEEE;');	document.write('	color: #666666;');	document.write('	margin: 1px;');	document.write('	font-family: Hiragino Kaku Gothic Pro,ƒqƒ‰ƒMƒmŠpƒS Pro W3,‚l‚r ‚oƒSƒVƒbƒN,sans-serif;');	document.write('	font-weight: plain;');	document.write('	font-size: 12px;');	document.write('	fontSize: 12px;');	document.write('}');	document.write('div.menuItem {');	document.write('	background-color: #F5F1A4;');	document.write('	padding-left: 8px;');	document.write('	cursor: pointer;');	document.write('}');	document.write('--></style>');}//take old script for NN4if(!document.getElementById && !document.all && document.layers) {	document.write('<script src="./menuNN4.js"></script>');}