function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh) {
	this.version = "990702 [Menu; m.js]";
	this.type = "Menu";
	this.mW = mw;
	this.mIH = mh;
	this.fontSize = fs||12;
	this.fontWeight = "plain";
	this.fontFamily = fnt;
	this.fontColor = fclr;
	this.fontColorHilite = fhclr;
	this.bgColor = "#002C63";
	this.mB = 1;
	this.mItemBorder = 1;
	this.mItemBgColor = bg;
	this.mLiteBgColor = "#ffffff";
	this.mBBgColor = "#002C63";
	this.mHiliteBgColor = bgh;
	this.mContainerBgColor = "#002C63";
	this.childMenuIcon = "arrows.gif";
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();

	this.hideOnMouseOut = false;

	this.addMenuItem = addMenuItem;
	this.addMenuSeparator = addMenuSeparator;
	this.writeMenus = writeMenus;
	this.FW_showMenu = FW_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;

	if (!window.ms) { window.ms = new Array(); }
	this.label = label || "mLabel" + window.ms.length;
	window.ms[this.label] = this;
	window.ms[window.ms.length] = this;
	if (!window.activeMenus) {
		window.activeMenus = new Array();
	}
}; 

function addMenuItem(label, action) {
	this.items[this.items.length] = label;
	this.actions[this.actions.length] = action;
};

function addMenuSeparator() {
	this.items[this.items.length] = "separator";
	this.actions[this.actions.length] = "";
	this.mItemBorder = 0;
};

function FIND(item) {
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
};

function writeMenus(co) {
	if (window.triedToWriteMenus) return;

	if (!co && document.layers) {
		window.delayWriteMenus = this.writeMenus;
		var timer = setTimeout('delayWriteMenus()', 250);
		co = new Layer(100);
		clearTimeout(timer);
	} else if (document.all || document.hasChildNodes) {
		document.writeln('<SPAN ID="mContainer"></SPAN>');
		co = FIND("mContainer");
	}

	window.fwHideMenuTimer = null;
	if (!co) return;	
	window.triedToWriteMenus = true; 
	co.isContainer = true;
	co.ms = new Array();
	for (var i=0; i<window.ms.length; i++) 
		co.ms[i] = window.ms[i];
	window.ms.length = 0;
	var countMenus = 0;
	var countItems = 0;
	var top = 0;
	var content = '';
	var lrs = false;
	if (document.layers) lrs = true;
	for (var i=0; i<co.ms.length; i++, countMenus++) {
		var m = co.ms[i];
		if (m.bgImageUp) {
			m.mB = 0;
			m.mItemBorder = 0;
		}
		if (lrs) {
			var mLayer = new Layer(100, co);
			var lite = new Layer(100, mLayer);
			lite.top = m.mB;
			lite.left = m.mB;
			var body = new Layer(100, lite);
			body.top = m.mB;
			body.left = m.mB;
		} else {
			content += ''+
			'<DIV ID="mLayer'+ countMenus +'" STYLE="position:absolute; z-index:10; left:10;top:'+ (i * 100) +';visibility:hidden;">\n'+
			'  <DIV ID="mLite'+ countMenus +'" STYLE="position:absolute; z-index:10; left:'+ m.mB +';top:'+ m.mB +';visibility:hide;">\n'+
			'	 <DIV ID="mFg'+ countMenus +'" STYLE="position:absolute;left:'+ m.mB +';top:'+ m.mB +';visibility:hide;">\n'+
			'';
		}
		var x=i;
		for (var i=0; i<m.items.length; i++) {
			var item = m.items[i];
			var childMenu = false;
			var defaultHeight = m.fontSize+6;
			var defaultIndent = m.fontSize;
			if (item.label) {
				item = item.label;
				childMenu = true;
			}
			m.mIH = m.mIH || defaultHeight;
			m.mItemIndent = m.mItemIndent || defaultIndent;
			var itemProps = 'font-family:' + m.fontFamily +';font-weight:' + m.fontWeight + ';fontSize:' + m.fontSize + ';';
			if (m.fontStyle) itemProps += 'font-style:' + m.fontStyle + ';';
			if (document.all) 
				itemProps += 'font-size:' + m.fontSize + ';" onMouseOver="onMenuItemOver(null,this);" onClick="onMenuItemAction(null,this);';
			else if (!document.layers) {
				itemProps += 'font-size:' + m.fontSize + 'px;'; 
			}
			var l;
			if (lrs) {
				l = new Layer(800,body);
			}
			var dTag	= '<DIV ID="mItem'+ countItems +'" STYLE="position:absolute;left:0;top:'+ (i * m.mIH) +';'+ itemProps +'">';
			var dClose = '</DIV>';
			if (m.bgImageUp) {
				m.mB = 0;
				m.mItemBorder = 0;
				dTag	= '<DIV ID="mItem'+ countItems +'" STYLE="background:url('+m.bgImageUp+');position:absolute;left:0;top:'+ (i * m.mIH) +';'+ itemProps +'">';
				if (document.layers) {
					dTag = '<LAYER BACKGROUND="'+m.bgImageUp+'" ID="mItem'+ countItems +'" TOP="'+ (i * m.mIH) +'" style="' + itemProps +'">';
					dClose = '</LAYER>';
				}
			}
			var textProps = 'position:absolute;left:' + m.mItemIndent + ';top:1;';
			if (lrs) {
				textProps +=itemProps;
				dTag = "";
				dClose = "";
			}

			var dText	= '<DIV ID="mItemText'+ countItems +'" STYLE="' + textProps + 'color:'+ m.fontColor +';">'+ item +'&nbsp</DIV>\n<DIV ID="mItemHilite'+ countItems +'" STYLE="' + textProps + 'top:1;color:'+ m.fontColorHilite +';visibility:hidden;">'+ item +'&nbsp</DIV>';
			if (item == "separator") {
				content += ( dTag + '<DIV ID="mSeparator'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n<DIV ID="mSeparatorLite'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n' + dClose);
			} else if (childMenu) {
				content += ( dTag + dText + '<DIV ID="childMenu'+ countItems +'" STYLE="position:absolute;left:0;top:3;"><IMG SRC="'+ m.childMenuIcon +'"></DIV>\n' + dClose);
			} else {
				content += ( dTag + dText + dClose);
			}
			if (lrs) {
				l.document.open("text/html");
				l.document.writeln(content);
				l.document.close();	
				content = '';
			}
			countItems++;  
		}
		if (lrs) {
			var focusItem = new Layer(100, body);
			focusItem.visiblity="hidden";
			focusItem.document.open("text/html");
			focusItem.document.writeln("&nbsp;");
			focusItem.document.close();	
		} else {
		  content += '	  <DIV ID="focusItem'+ countMenus +'" STYLE="position:absolute;left:0;top:0;visibility:hide;" onClick="onMenuItemAction(null,this);">&nbsp;</DIV>\n';
		  content += '   </DIV>\n  </DIV>\n</DIV>\n';
		}
		i=x;
	}
	if (document.layers) {		
		co.clip.width = window.innerWidth;
		co.clip.height = window.innerHeight;
		co.mContainerBgColor = this.mContainerBgColor;
		for (var i=0; i<co.document.layers.length; i++) {
			proto = co.ms[i];
			var m = co.document.layers[i];
			co.ms[i].mLayer = m;
			co.ms[i].mLayer.Menu = co.ms[i];
			co.ms[i].mLayer.Menu.co = co;
			var body = m.document.layers[0].document.layers[0];
			body.clip.width = proto.mW || body.clip.width;
			body.clip.height = proto.mH || body.clip.height;
			for (var n=0; n<body.document.layers.length-1; n++) {
				var l = body.document.layers[n];
				l.Menu = co.ms[i];
				l.mHiliteBgColor = proto.mHiliteBgColor;
				l.document.bgColor = proto.mItemBgColor;
				l.saveColor = proto.mItemBgColor;
				l.onmouseover = proto.onMenuItemOver;
				l.onclick = proto.onMenuItemAction;
				l.action = co.ms[i].actions[n];
				l.focusItem = body.document.layers[body.document.layers.length-1];
				l.clip.width = proto.mW || body.clip.width + proto.mItemIndent;
				l.clip.height = proto.mIH || l.clip.height;
				if (n>0) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.mItemBorder;
				l.hilite = l.document.layers[1];
				if (proto.bgImageUp) l.background.src = proto.bgImageUp;
				l.document.layers[1].isHilite = true;
				if (l.document.layers[0].id.indexOf("mSeparator") != -1) {
					l.hilite = null;
					l.clip.height -= l.clip.height / 2;
					l.document.layers[0].document.bgColor = proto.bgColor;
					l.document.layers[0].clip.width = l.clip.width -2;
					l.document.layers[0].clip.height = 1;
					l.document.layers[1].document.bgColor = proto.mLiteBgColor;
					l.document.layers[1].clip.width = l.clip.width -2;
					l.document.layers[1].clip.height = 1;
					l.document.layers[1].top = l.document.layers[0].top + 1;
				} else if (l.document.layers.length > 2) {
					l.childMenu = co.ms[i].items[n].mLayer;
					l.document.layers[2].left = l.clip.width -13;
					l.document.layers[2].top = (l.clip.height / 2) -4;
					l.document.layers[2].clip.left += 3;
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
			}
			body.document.bgColor = proto.bgColor;
			body.clip.width  = l.clip.width +proto.mB;
			body.clip.height = l.top + l.clip.height +proto.mB;
			var focusItem = body.document.layers[n];
			focusItem.clip.width = body.clip.width;
			focusItem.Menu = l.Menu;
			focusItem.top = -30;
            focusItem.captureEvents(Event.MOUSEDOWN);
            focusItem.onmousedown = onMenuItemDown;
			m.document.bgColor = proto.mBBgColor;
			var lite = m.document.layers[0];
			lite.document.bgColor = proto.mLiteBgColor;
			lite.clip.width = body.clip.width +1;
			lite.clip.height = body.clip.height +1;
			m.clip.width = body.clip.width + (proto.mB * 3) ;
			m.clip.height = body.clip.height + (proto.mB * 3);
		}
	} else {
		if ((!document.all) && (co.hasChildNodes)) {
			co.innerHTML=content;
		} else {
			co.document.open("text/html");
			co.document.writeln(content);
			co.document.close();	
		}
		if (!FIND("mLayer0")) return;
		var mCount = 0;
		for (var x=0; x<co.ms.length; x++) {
			var mLayer = FIND("mLayer" + x);
			co.ms[x].mLayer = "mLayer" + x;
			mLayer.Menu = co.ms[x];
			mLayer.Menu.co = "mLayer" + x;
			mLayer.style.zIndex = 10;
		    var s = mLayer.style;
			s.top = s.pixelTop = -300;
			s.left = s.pixelLeft = -300;

			var m = co.ms[x];
			m.mIW = m.mW || m.mIEWidth || 140;
			mLayer.style.backgroundColor = m.mBBgColor;
			var top = 0;
			for (var i=0; i<co.ms[x].items.length; i++) {
				var l = FIND("mItem" + mCount);
				l.Menu = co.ms[x];
				if (l.addEventListener) { 
					l.style.width = m.mIW;	
					l.style.height = m.mIH;
					l.style.top = top;
					l.addEventListener("mouseover", onMenuItemOver, false);
					l.addEventListener("click", onMenuItemAction, false);
					l.addEventListener("mouseout", mouseoutMenu, false);
				} else { 
					l.style.pixelWidth = m.mIW;	
					l.style.pixelHeight = m.mIH;
					l.style.pixelTop = top;
				}
				top = top + m.mIH+m.mItemBorder;
				l.style.fontSize = m.fontSize;
				l.style.backgroundColor = m.mItemBgColor;
				l.style.visibility = "inherit";
				l.saveColor = m.mItemBgColor;
				l.mHiliteBgColor = m.mHiliteBgColor;
				l.action = co.ms[x].actions[i];
				l.hilite = FIND("mItemHilite" + mCount);
				l.focusItem = FIND("focusItem" + x);
				l.focusItem.style.pixelTop = l.focusItem.style.top = -30;
				var childItem = FIND("childMenu" + mCount);
				if (childItem) {
					l.childMenu = co.ms[x].items[i].mLayer;
					childItem.style.pixelLeft = childItem.style.left = m.mIW -11;
					childItem.style.pixelTop = childItem.style.top =(m.mIH /2) -4;
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
				var sep = FIND("mSeparator" + mCount);
				if (sep) {
					sep.style.clip = "rect(0 " + (m.mIW - 3) + " 1 0)";
					sep.style.width = sep.style.pixelWidth = m.mIW;	
					sep.style.backgroundColor = m.bgColor;
					sep = FIND("mSeparatorLite" + mCount);
					sep.style.clip = "rect(1 " + (m.mIW - 3) + " 2 0)";
					sep.style.width = sep.style.pixelWidth = m.mIW;	
					sep.style.backgroundColor = m.mLiteBgColor;
					l.style.height = l.style.pixelHeight = m.mIH/2;
					l.isSeparator = true
					top -= (m.mIH - l.style.pixelHeight)
				} else {
					l.style.cursor = "hand"
				}
				mCount++;
			}
			m.mH = top-1;
			var lite = FIND("mLite" + x);
			var s = lite.style;
			s.height = s.pixelHeight = m.mH +(m.mB * 2);
			s.width = s.pixelWidth = m.mIW + (m.mB * 2);
			s.backgroundColor = m.mLiteBgColor;

			var body = FIND("mFg" + x);
			s = body.style;
			s.height = s.pixelHeight = m.mH + m.mB;
			s.width = s.pixelWidth = m.mIW + m.mB;
			s.backgroundColor = m.bgColor;

			s = mLayer.style;
			s.width = s.pixelWidth  = m.mIW + (m.mB * 4);
			s.height = s.pixelHeight  = m.mH+(m.mB*4);
		}
	}
	if (document.captureEvents) {	
		document.captureEvents(Event.MOUSEUP);
	}
	if (document.addEventListener) {	
		document.addEventListener("mouseup", onMenuItemOver, false);
	}
	if (document.layers && window.innerWidth) {
		window.onresize = NS4resize;
		window.NS4sIW = window.innerWidth;
		window.NS4sIH = window.innerHeight;
	}
	document.onmouseup = mouseupMenu;
	window.fwWroteMenu = true;
};

function NS4resize() {
	if (NS4sIW < window.innerWidth || 
		NS4sIW > window.innerWidth || 
		NS4sIH > window.innerHeight || 
		NS4sIH < window.innerHeight ) 
	{
		window.location.reload();
	}
};

function onMenuItemOver(e, l) {
	FW_clearTimeout();
	l = l || this;
	a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.document.bgColor = a.saveColor;
			if (a.hilite) a.hilite.visibility = "hidden";
			if (a.Menu.bgImageOver) {
				a.background.src = a.Menu.bgImageUp;
			}
			a.focusItem.top = -100;
			a.clicked = false;
		}
		if (l.hilite) {
			l.document.bgColor = l.mHiliteBgColor;
			l.zIndex = 10;
			l.hilite.visibility = "inherit";
			l.hilite.zIndex = 11;
			l.document.layers[1].zIndex = 10;
			l.focusItem.zIndex = this.zIndex +2;
		}
		if (l.Menu.bgImageOver) {
			l.background.src = l.Menu.bgImageOver;
		}
		l.focusItem.top = this.top;
		l.Menu.hideChildMenu(l);
	} else if (l.style && l.Menu) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.Menu.bgImageUp) {
				a.style.background = "url(" + a.Menu.bgImageUp +")";;
			}
		} 
		if (l.isSeparator) return;
		l.style.backgroundColor = l.mHiliteBgColor;
		l.zIndex = 10;  
		if (l.Menu.bgImageOver) {
			l.style.background = "url(" + l.Menu.bgImageOver +")";
		}
		if (l.hilite) {
			l.style.backgroundColor = l.mHiliteBgColor;
			l.hilite.style.visibility = "inherit";
		}
		l.focusItem.style.top = l.focusItem.style.pixelTop = l.style.pixelTop;
		l.focusItem.style.zIndex = l.zIndex +1;
		l.Menu.hideChildMenu(l);
	} else {
		return;
	}
	window.ActiveMenuItem = l;
};

function onMenuItemAction(e, l) {
	l = window.ActiveMenuItem;
	if (!l) return;
	hideActiveMenus();
	if (l.action) {
		eval("" + l.action);
	}
	window.ActiveMenuItem = 0;
};

function FW_clearTimeout()
{
	if (fwHideMenuTimer) clearTimeout(fwHideMenuTimer);
	fwHideMenuTimer = null;
	fwDHFlag = false;
};
function FW_startTimeout()
{
	fwStart = new Date();
	fwDHFlag = true;
	fwHideMenuTimer = setTimeout("fwDoHide()", 1000);
};

function fwDoHide()
{
	if (!fwDHFlag) return;
	var elapsed = new Date() - fwStart;
	if (elapsed < 1000) {
		fwHideMenuTimer = setTimeout("fwDoHide()", 1100-elapsed);
		return;
	}
	fwDHFlag = false;
	hideActiveMenus();
	window.ActiveMenuItem = 0;
};

function FW_showMenu(m, x, y, child) {
	if (!window.fwWroteMenu) return;
	FW_clearTimeout();
	if (document.layers) {
		if (m) {
			var l = m.mLayer || m;
			l.left = 1;
			l.top = 1;
			hideActiveMenus();
			if (this.visibility) l = this;
			window.ActiveMenu = l;
		} else {
			var l = child;
		}
		if (!l) return;
		for (var i=0; i<l.layers.length; i++) { 			   
			if (!l.layers[i].isHilite) 
				l.layers[i].visibility = "inherit";
			if (l.layers[i].document.layers.length > 0) 
				FW_showMenu(null, "relative", "relative", l.layers[i]);
		}
		if (l.parentLayer) {
			if (x != "relative") 
				l.parentLayer.left = x || window.pageX || 0;
			if (l.parentLayer.left + l.clip.width > window.innerWidth) 
				l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
			if (y != "relative") 
				l.parentLayer.top = y || window.pageY || 0;
			if (l.parentLayer.isContainer) {
				l.Menu.xOffset = window.pageXOffset;
				l.Menu.yOffset = window.pageYOffset;
				l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
				l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
				if (l.parentLayer.mContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.mContainerBgColor;
			}
		}
		l.visibility = "inherit";
		if (l.Menu) l.Menu.co.visibility = "inherit";
	} else if (FIND("mItem0")) {
		var l = m.mLayer || m;	
		hideActiveMenus();
		if (typeof(l) == "string") {
			l = FIND(l);
		}
		window.ActiveMenu = l;
		var s = l.style;
		s.visibility = "inherit";
		if (x != "relative") 
			s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
		if (y != "relative") 
			s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
		l.Menu.xOffset = document.body.scrollLeft;
		l.Menu.yOffset = document.body.scrollTop;
	}
	if (m) {
		window.activeMenus[window.activeMenus.length] = l;
	}
};

function onMenuItemDown(e, l) {
	var a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.eX = e.pageX;
			a.eY = e.pageY;
			a.clicked = true;
		}
    }
};

function mouseupMenu(e)
{
	hideMenu(true, e);
	hideActiveMenus();
	return true;
};

function mouseoutMenu()
{
	hideMenu(false, false);
	return true;
};


function hideMenu(mouseup, e) {
	var a = window.ActiveMenuItem;
	if (a && document.layers) {
		a.document.bgColor = a.saveColor;
		a.focusItem.top = -30;
		if (a.hilite) a.hilite.visibility = "hidden";
		if (mouseup && a.action && a.clicked && window.ActiveMenu) {
 			if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
				setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
			}
		}
		a.clicked = false;
		if (a.Menu.bgImageOver) {
			a.background.src = a.Menu.bgImageUp;
		}
	} else if (window.ActiveMenu && FIND("mItem0")) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.Menu.bgImageUp) {
				a.style.background = "url(" + a.Menu.bgImageUp +")";;
			}
		}
	}
	if (!mouseup && window.ActiveMenu) {
		if (window.ActiveMenu.Menu) {
			if (window.ActiveMenu.Menu.hideOnMouseOut) {
				FW_startTimeout();
			}
			return(true);
		}
	}
	return(true);
};

function PxToNum(pxStr)
{ 
	if (pxStr.length > 2) {
		n = Number(pxStr.substr(0, pxStr.length-2));
		return(n);
	}
	return(0);
};

function hideChildMenu(hcmLayer) {
	FW_clearTimeout();
	var l = hcmLayer;
	for (var i=0; i < l.Menu.childMenus.length; i++) {
		var theLayer = l.Menu.childMenus[i];
		if (document.layers) {
			theLayer.visibility = "hidden";
		} else {
			theLayer = FIND(theLayer);
			theLayer.style.visibility = "hidden";
		}
		theLayer.Menu.hideChildMenu(theLayer);
	}

	if (l.childMenu) {
		var childMenu = l.childMenu;
		if (document.layers) {
			l.Menu.FW_showMenu(null,null,null,childMenu.layers[0]);
			childMenu.zIndex = l.parentLayer.zIndex +1;
			childMenu.top = l.top + l.parentLayer.top + l.Menu.mLayer.top + l.Menu.mIH/3;
			if (childMenu.left + childMenu.clip.width > window.innerWidth) {
				childMenu.left = l.parentLayer.left - childMenu.clip.width + l.Menu.mLayer.left + 15;
				l.Menu.co.clip.left -= childMenu.clip.width;
			} else {
				childMenu.left = l.parentLayer.left + l.parentLayer.clip.width  + l.Menu.mLayer.left -5;
			}
			var w = childMenu.clip.width+childMenu.left-l.Menu.co.clip.left;
			if (w > l.Menu.co.clip.width)  
				l.Menu.co.clip.width = w;
			var h = childMenu.clip.height+childMenu.top-l.Menu.co.clip.top;
			if (h > l.Menu.co.clip.height) l.Menu.co.clip.height = h;
			l.document.layers[1].zIndex = 9;
			childMenu.visibility = "inherit";
		} else if (FIND("mItem0")) {
			childMenu = FIND(l.childMenu);
			var mLayer = FIND(l.Menu.mLayer);
			var s = childMenu.style;
			s.zIndex = mLayer.style.zIndex+1;
			if (document.all) { 
				s.pixelTop = l.style.pixelTop + mLayer.style.pixelTop + l.Menu.mIH/3;
				s.left = s.pixelLeft = (mLayer.style.pixelWidth) + mLayer.style.pixelLeft -5;
			} else { 
				var top = PxToNum(l.style.top) + PxToNum(mLayer.style.top) + l.Menu.mIH/3;
				var left = (PxToNum(mLayer.style.width)) + PxToNum(mLayer.style.left) -5;
				s.top = top;
				s.left = left;
			}
			childMenu.style.visibility = "inherit";
		} else {
			return;
		}
		window.activeMenus[window.activeMenus.length] = childMenu;
	}
};

function hideActiveMenus() {
	if (!window.activeMenus) return;
	for (var i=0; i < window.activeMenus.length; i++) {
		if (!activeMenus[i]) continue;
		if (activeMenus[i].visibility && activeMenus[i].Menu) {
			activeMenus[i].visibility = "hidden";
			activeMenus[i].Menu.co.visibility = "hidden";
			activeMenus[i].Menu.co.clip.left = 0;
		} else if (activeMenus[i].style) {
			var s = activeMenus[i].style;
			s.visibility = "hidden";
			s.left = -200;
			s.top = -200;
		}
	}
	if (window.ActiveMenuItem) {
		hideMenu(false, false);
	}
	window.activeMenus.length = 20;
};

function fwLoadMenus() { 
  if (window.fw_menu_0) return;
  window.fw_menu_0 = new Menu("root",120,16,"Verdana, Arial, Helvetica, sans-serif",9.5,"#002C63","#ffffff","#EBEBEB","#7D92AC");
  fw_menu_0.addMenuItem("<b>Quiénes Somos</b>","location='/contenido/info_general/quienes_somos.asp'");
  fw_menu_0.addMenuItem("<b>Historia</b>","location='/contenido/info_general/historia.asp'");
  fw_menu_0.addMenuItem("<b>Misión</b>","location='/contenido/info_general/mision.asp'");
  fw_menu_0.addMenuItem("<b>Organigrama</b>","location='/contenido/info_general/organigrama.asp'");
  fw_menu_0.addMenuItem("<b>SIG</b>","location='/contenido/info_general/certificaciones.asp'");
  fw_menu_0.addMenuItem("<b>Acuerdos</b>","location='/contenido/info_general/puertos_hermanos.asp'");
  fw_menu_0.addMenuItem("<b>Mirador</b>","location='/contenido/galeria/gal_02.asp'");
  fw_menu_0.addMenuItem("<b>Responsabilidad</b>","location='/contenido/info_general/rse_epv.asp'");
   fw_menu_0.hideOnMouseOut=false;
  window.fw_menu_1 = new Menu("root",150,16,"Verdana, Arial, Helvetica, sans-serif",9.5,"#002C63","#ffffff","#EBEBEB","#7D92AC");
  fw_menu_1.addMenuItem("<b>Atención Naves</b>","location='/contenido/info_comercial/opera_maritima.asp'");
  fw_menu_1.addMenuItem("<b>Atención Carga</b>","location='/contenido/info_comercial/infocarga.asp'");
  fw_menu_1.addMenuItem("<b>Servicio Multioperadores</b>","location='/contenido/info_comercial/manual_servicios.asp'");
  fw_menu_1.addMenuItem("<b>Servicios y Tarifas</b>","location='/contenido/info_general/reglamento_epv.asp'");
  fw_menu_1.addMenuItem("<b>Reglamento Coordinación</b>","location='/contenido/info_comercial/ReglamentoCoordinacion/Index_reglamentos.asp'");
  fw_menu_1.addMenuItem("<b>Reg. Servicio Movilización</b>","location='/contenido/info_comercial/reglamento_movilizac.asp'");
  fw_menu_1.addMenuItem("<b>Reclamos Clientes</b>","location='/contenido/info_general/reclamos_clientes.asp'");
	 fw_menu_1.hideOnMouseOut=false;
  window.fw_menu_2 = new Menu("root",130,16,"Verdana, Arial, Helvetica, sans-serif",9.5,"#002C63","#ffffff","#EBEBEB","#7D92AC");
  fw_menu_2.addMenuItem("<b>Planificación Naviera</b>","location='/contenido/servicio_linea/plan_frame.htm'");
  fw_menu_2.addMenuItem("<b>Contactos Servicios</b>","location='/contenido/servicio_linea/buzon_serv.asp'");
  fw_menu_2.hideOnMouseOut=false;
  window.fw_menu_3 = new Menu("root",120,16,"Verdana, Arial, Helvetica, sans-serif",9.5,"#002C63","#ffffff","#EBEBEB","#7D92AC");
  fw_menu_3.addMenuItem("<b>VTP</b>","location='/contenido/cruceros/terminal_pasajeros.asp'");
  fw_menu_3.addMenuItem("<b>Temp. 2009/2010</b>","location='/contenido/cruceros/arribos_2009.asp'");
  fw_menu_3.addMenuItem("<b>Circuito Turístico</b>","location='/contenido/cruceros/circuitos_turisticos.asp'");
   fw_menu_3.hideOnMouseOut=false;
  window.fw_menu_5 = new Menu("root",130,16,"Verdana, Arial, Helvetica, sans-serif",9.5,"#002C63","#ffffff","#EBEBEB","#7D92AC");
  fw_menu_5.addMenuItem("<b>Puerto Barón</b>","location='/contenido/desarrollo_proyectos/borde_costero04.asp'");
  /*fw_menu_5.addMenuItem("<b>Licitación Terminal 2</b>","location='/contenido/desarrollo_proyectos/terminal2.asp'");*/
  fw_menu_5.addMenuItem("<b>Norma PV</b>","location='/contenido/info_general/norma/norma.asp'");
   fw_menu_5.hideOnMouseOut=false;
  window.fw_menu_6 = new Menu("root",138,16,"Verdana, Arial, Helvetica, sans-serif",9.5,"#002C63","#ffffff","#EBEBEB","#7D92AC");
  fw_menu_6.addMenuItem("<b>Ubicación y Accesos</b>","location='/contenido/info_general/ubicacion_accesos.asp'");
  fw_menu_6.addMenuItem("<b>Infraestructura</b>","location='/contenido/info_comercial/infra_estructura.asp'");
  fw_menu_6.addMenuItem("<b>ZEAL</b>","location='/contenido/desarrollo_proyectos/xtra03.asp'");
  fw_menu_6.addMenuItem("<b>Líneas Regulares</b>","location='/contenido/info_comercial/cobertura.asp'");
  fw_menu_6.addMenuItem("<b>Directorio Servicios</b>","location='/contenido/info_comercial/director_clientes/director_clientes.asp'");
     fw_menu_6.hideOnMouseOut=false;
   window.fw_menu_4 = new Menu("root",130,16,"Verdana, Arial, Helvetica, sans-serif",9.5,"#002C63","#ffffff","#EBEBEB","#7D92AC");
  fw_menu_4.addMenuItem("<b>Estadísticas</b>","location='/contenido/info_comercial/estadisticas.asp'");
  fw_menu_3.addMenuItem("<b>Eventos Muelle Barón</b>","location='/contenido/cruceros/eventos_baron.asp'");
  fw_menu_4.addMenuItem("<b>Archivo de Noticias</b>","location='/listado_noticia.asp'");
  fw_menu_4.addMenuItem("<b>Memoria Anual</b>","location='/contenido/info_general/memoria_2009.asp'");
  fw_menu_4.addMenuItem("<b>Discursos</b>","location='/contenido/info_general/discursos.asp'");
  fw_menu_4.addMenuItem("<b>Boletín Nacional</b>","location='/contenido/boletin_chile/boletin.asp'");
  fw_menu_4.addMenuItem("<b>Sitios de Interés</b>","location='/contenido/info_comercial/sitiointeres.asp'");
   fw_menu_4.addMenuItem("<b>Revista EPV</b>","location='/contenido/info_general/revistaEPV.asp'"); 
   fw_menu_4.addMenuItem("<b>Estudio Aportes Puerto</b>","location='/contenido/info_general/estudio_aportes_puerto.asp'");
   fw_menu_4.addMenuItem("<b>Visitas</b>","location='/contenido/info_general/visitas.asp'");
   fw_menu_4.addMenuItem("<b>Exposición</b>","location='/contenido/info_general/paneles_expo2009/expo.asp'"); 
     fw_menu_4.hideOnMouseOut=false;
  fw_menu_6.writeMenus();
}


var n=document.layers?1:0;
var scrspeed=3.0;
var timSpeed=10,contHeight=100,scrollTim,active=0;
var jScroll,oScroll;
 
function makeScrollObj(obj,nest) {
        nest = (!nest) ? '' : 'document.'+nest+'.';
        this.css = (n) ? eval(nest+'document.'+obj) : eval('document.all.'+obj+'.style');
        this.scrollHeight = (n) ? this.css.document.height : eval('document.all.'+obj+'.offsetHeight');
        this.top = rtop;
        return this;
}
function rtop() {
        return (n) ? eval(this.css.top) : eval(this.css.pixelTop);
}
function scroll(speed) {
        var way=speed>0?1:0;
        if ((!way && oScroll.top()>-oScroll.scrollHeight+contHeight) || (oScroll.top()<0 && way)) {
                oScroll.css.top=oScroll.top()+speed;
                scrollTim=setTimeout("scroll("+speed+")",timSpeed);
        }
}
function noScroll() {
        clearTimeout(scrollTim);
}
function scrollInit() {
    oScroll=new makeScrollObj('divScroll2','divCont1');
        oScroll.css.visibility=(n) ? 'show' : 'visible';
}
// end functions


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}