	// shows the flyout nav of a particular child (idRef)
	// and passes along the parent that might have called it (idOrig)
	function showFlyoutNav(idRef,idOrig) {
		//alert(document.getElementById('level1_4').offsetTop);
		var splitID, curLevel, idName;
		splitID = idRef.split("_");
		curLevel = parseInt(splitID[0]);
		idName = splitID[1];
		visibleMe("sublevel"+(curLevel)+"_"+idName);
		setHidden(curLevel,idName); // puts the background gradient in there
		
		changeStyle("sublevel"+(curLevel)+"_"+idName,"top",yPos(idRef,idOrig)); // sets yPos of new flyout
	}
	function showFlyoutNav2009(idRef,idOrig) {
		//alert(document.getElementById('level1_4').offsetTop);
		//alert(idRef);
		var splitID, curLevel, idName;
		splitID = idRef.split("_");
		curLevel = parseInt(splitID[0]);
		idName = splitID[1];
		visibleMe("sublevel"+(curLevel)+"_"+idName);
		setHidden(curLevel,idName); // puts the background gradient in there
		
		//changeStyle("sublevel"+(curLevel)+"_"+idName,"top",yPos(idRef,idOrig)); // sets yPos of new flyout
	}


	// hides a particular flyout menu
	function hideFlyoutNav(idRef,idOrig) {
		invisibleMe("sublevel"+idRef);
	}
	
	// puts the mouseover of a particular item
	function highlightThis(idName) {
		
		if (checkID("level"+idName)) {
			var curClass = document.getElementById("level"+idName).className;
			if(curClass.indexOf('hasMenu') != -1)					
				curClass=curClass.replace(/hasMenu/,"hasMenuOn");
			else if(curClass.indexOf('hasSubMenu') != -1)
				curClass=curClass.replace(/hasSubMenu/,"hasSubMenuOn");
			changeClass("level"+idName,curClass+" on");
		}
	}
	
		function highlightThis2009(idName) {
		
		if (checkID("level"+idName)) {
			var curClass = document.getElementById("level"+idName).className;
			changeClass("level"+idName,curClass+" on");
		}
	}


	// hides the mouseover of a particular item
	function unhighlightThis(idName) {
		if (checkID("level"+idName))  {
			var curClass = document.getElementById("level"+idName).className;
			curClass=curClass.substring(0,curClass.length-3);
			if(curClass.indexOf('hasMenuOn') != -1)
				curClass=curClass.replace(/hasMenuOn/,"hasMenu");
			else if(curClass.indexOf('hasSubMenuOn') != -1)
				curClass=curClass.replace(/hasSubMenuOn/,"hasSubMenu");
				
			changeClass("level"+idName,curClass);
		}
	}
	
// puts the background gradient in there
// gets height and width of flyout menu and places a background in there
	function setHidden(level,idName) {
		var offH = getOffH("level"+(level+1)+"Container"+level+"_"+idName);
		var offW = getOffW("level"+(level+1)+"Container"+level+"_"+idName);
		setHeight("level"+(level+1)+"Hidden"+level+"_"+idName,offH);
		setWidth("level"+(level+1)+"Hidden"+level+"_"+idName,offW);
	}
	
	// this takes a block ID and goes through the <div id="label2_1" class="label">
	// up to the max and calculates the height of it
	// this will determine the Y pos eventually
	function blockHeight(blockID,maxID) {
		var divObj, splitDiv, pHeight, pCount;
		pHeight = 0;
		pCount = 0;
		if (checkID(blockID)) {
			divObj = document.getElementById(blockID).getElementsByTagName("div");
			for (d = 0; d < divObj.length; d++) {
				if (divObj[d].className.indexOf("level") >=0) {
					pCount++;
					splitDiv = divObj[d].id.split("_");
					if (splitDiv[1]==maxID) {
						break;
					}
					pHeight = pHeight + getOffH(divObj[d].id);
				}
			}
		}
		return pHeight;
	}

	// determines the y pos 
	// id ref is current flyout ID
	// id Orig is previous parent flyout menu or main menu that called it
	function yPos(idRef,idOrig) {
		var splitID, curLevel, idName;
		var splitIDOrig, origLevel, origIdName;
		splitID = idRef.split("_");
		curLevel = parseInt(splitID[0]);
		idName = splitID[1];
		
		splitIDOrig = idOrig.split("_");
		origLevel = parseInt(splitIDOrig[0]);
		origIdName = splitIDOrig[1];
		
		var posHeight = 0;
		var levelID, divObj;
		// if current level is 1, we just need the height of the first menu
		if (curLevel == 1) {
			levelID = "level1Block1";
			posHeight = blockHeight(levelID,idName)
		} else {
			// level is a submenu flyout, so we just add the first menu, with the current menu
			levelID = "level"+(curLevel)+"Block"+idOrig;
			posHeight = blockHeight("level1Block1",origIdName)
			posHeight = posHeight + blockHeight(levelID,idName);
		}
		return posHeight;
	}
