	var timesover=0;
	var timerID = null;
	//var boolFirstMenuFlag = true;
	var boolTimerOn = false;
	var intTimecount = 450;
	var intRunCount = 0;
	var intTabActive = 999;
	var intNumTabs = 6;
	var asTabs = new Array();
		asTabs[0] = "about";
		asTabs[1] = "borrow";
		asTabs[2] = "find";
		asTabs[3] = "learn";
		asTabs[4] = "quicklinks";
		asTabs[5] = "news";

	function doInitializeMenu() {
		for (i=0; i<intNumTabs; i++)
		{
				if(document.getElementById("menuitem-" + asTabs[i]).className=="mmhide_mainmenuitem mmhide_active")
					intTabActive = i;
		}
	}
	function settimeover(){
	timesover=1;
	}
	function doMenuOn(id) {
		/* initialize the menu to figure out which tab is set to active */
		if (intRunCount < 1)
		{
			doInitializeMenu();
			intRunCount++;
		}

	
		//if (boolFirstMenuFlag == true)
			//{
		/*hide any menus that might be open*/
			if (document.getElementById("menuitem-" + id).className == "mmhide_mainmenuitem mmhide_active" && timesover==0)
			{
			//alert("active");
			timesover=1;
			}
			else
			{
			timesover=1;
			doHideAll();
			/* if statement to check if the submenu acutally exists, because the home menu doesn't have one */
			if(document.getElementById("submenu-" + id))
				document.getElementById("submenu-" + id).style.display = "block"; /*turn on the submenu*/
		
			/*change the style of the tab to the hover style*/	
			document.getElementById("menuitem-" + id).className = "mmhide_mainmenuitem mmhide_hover"; 
	
			/* stop the timer */
			doStopTime(); 
			}
			//}
		}
		function doMenuOff(id) {
		for (i=0; i<intNumTabs; i++)
			{
					if(document.getElementById("menuitem-" + asTabs[i]).className=="mmhide_mainmenuitem mmhide_active")
						timesover=1;
			}


		/*start the timer */
		doStartTime(); 
	}
	function doSubMenuOn(){
		/* stop the timer */
		doStopTime(); 
	}
	function doSubMenuOff(){
	 	/* start the timer */
	 	doStartTime();
	}
	function doHideAll(){
	
		for (i=0; i<intNumTabs; i++)
		{
			/* if statement to check if the submenu exists before we try to hide it */
			if(document.getElementById("submenu-" + asTabs[i]))
				document.getElementById("submenu-" + asTabs[i]).style.display = "none"; /* hide the submenu */
			/*set all tabs to the inactive style */
			document.getElementById("menuitem-" + asTabs[i]).className="mmhide_mainmenuitem mmhide_inactive";
		}
		/*set the active tab to the active style*/
		if (intTabActive < 999)
		{
			document.getElementById("menuitem-" + asTabs[intTabActive]).className="mmhide_mainmenuitem mmhide_active";
		}
	}
	function doStopTime(){
		if (boolTimerOn){
			clearTimeout(timerID);
       	timerID = null;
        	boolTimerOn = false;
		}

	}
	function doStartTime(){
		if (boolTimerOn == false) {
			timerID=setTimeout( "doHideAll()" , intTimecount);
			boolTimerOn = true;
		}
	}

