	var eNavBarItemShown = null;

	var eMenuShown = null;

	function document_click()
	{
		if ("clsNavBarItemShown" != window.event.srcElement.className && null != eMenuShown) HideMenu();
	}

	function document_keypress()
	{
		if ("27" == window.event.keyCode && null != eMenuShown) HideMenu();
	}

	function window_blur()
	{
		if (null != eMenuShown) HideMenu();
	}
	
	function CacheAndBind()
	{
		window.CachedClick = document.onclick;
		window.CachedKeypress = document.onkeypress;
		window.CachedBlur = window.onblur;
		document.onclick = document_click;
		document.onkeypress = document_keypress;
		window.onblur = window_blur;
	}

	function UncacheAndRebind()
	{
		document.onclick = window.CachedClick;
		document.onkeypress = window.CachedKeypress;
		window.onblur = window.CachedBlur;
	}
	function HideMenu()
	{
		eMenuShown.style.visibility = "hidden";
		eMenuShown = null;
		eNavBarItemShown.className = "clsNavBarItem";
		eNavBarItemShown = null;
		UncacheAndRebind();
	}

	function ShowMenu(eSrc)
	{
		eMenuShown = document.all["divMenu" + eSrc.expItemNum];
		eNavBarItemShown = eSrc;
		eNavBarItemShown.className = "clsNavBarItemShown";
		if (null != eMenuShown) eMenuShown.style.visibility = "visible";
		CacheAndBind();
	}


	function FindTD(eSrc,eContainer)
	{
		while (eContainer.contains(eSrc))
		{
			if ("TD" == eSrc.tagName) return eSrc;
			eSrc = eSrc.parentElement;
		}
		return false;
	}


	function NavBar_mouseover(eContainer)
	{
		var eSrc = FindTD(window.event.srcElement,eContainer);
		if (FindTD(window.event.fromElement,eContainer) != eSrc)
		{
			if ("clsNavBarItem" == eSrc.className)
			{
				eSrc.className = "clsNavBarItemOver";
				if (null != eMenuShown)
				{
					HideMenu();
					ShowMenu(eSrc);
				}
			}
		}
	}

	function NavBar_mouseout(eContainer)
	{
		var eSrc = FindTD(window.event.srcElement,eContainer);
		if (FindTD(window.event.toElement,eContainer) != eSrc)
		{
			if ("clsNavBarItemOver" == eSrc.className) eSrc.className = "clsNavBarItem";
		}
	}


	function NavBar_click(eContainer)
	{
		window.event.cancelBubble = true;
		var eSrc = FindTD(window.event.srcElement,eContainer);
		if ("clsNavBarItemOver" == eSrc.className)
		{
			if (null != eMenuShown) HideMenu();
			ShowMenu(eSrc);
		}
		else if ("clsNavBarItemShown" == eSrc.className)
		{
			if (null != eMenuShown) HideMenu();
			eSrc.className = "clsNavBarItemOver";
		}
	}


	function HackURL(sURL)
	{
		var dDate = new Date().getTime();
		var sFrameURL = sURL.substring(0,sURL.indexOf("#"));
		var sHash = sURL.substring(sURL.indexOf("#"));
		if ("" != sFrameURL)
		{
			if (-1 < location.protocol.indexOf("file:")) return sHash.substring(1);
			else return sFrameURL + "?" + dDate + sHash;
		}
		else return sURL;
	}


	function Menu_hover()
	{
		var eSrc = window.event.srcElement;
		if ("clsMenu" != eSrc.className) eSrc.className = ("" == eSrc.className ? "clsMenuItemOver" : "");
	}

	function Menu_click()
	{
		HideMenu();
		top.location.href = HackURL(window.event.srcElement.expURL);
	}
	
	

	if ("object" == typeof(tblNavBar))
	{
		tblNavBar.onmouseover = new Function("NavBar_mouseover(this);");
		tblNavBar.onmouseout = new Function("NavBar_mouseout(this);");
		tblNavBar.onselectstart = new Function("return false;");
		tblNavBar.onclick = new Function("NavBar_click(this);");
	}
