aPositions = new Array(); aImages = new Array(); // Modify these for positioning the DHTML menus. These represent their // X-distances from the left-end of the menu-anchor div. aPositions[0] = 14; aPositions[1] = 98; aPositions[2] = 170; aPositions[3] = 260; aPositions[4] = 346; aPositions[5] = 426; menuYPos = 38; anchorX = 0; anchorY = 0; // These shouldn't really need to be modified, this is just a little hack // to allow menu open/close functions to toggle the nav images. aImages[0] = 0; aImages[1] = 2; aImages[2] = 4; aImages[3] = 6; aImages[4] = 8; aImages[5] = 10; aImages[6] = 12; // Once the window is done loading, start creating the menus window.onLoad=startRunning; function startRunning(){ anchorX = window.document.layers['menuAnchor'].pageX; anchorY = window.document.layers['menuAnchor'].pageY; while(eval("window.MET_menu_arr" + arrcnt)) { tempMenu = "menu" + arrcnt tempArray = "MET_menu_arr" + arrcnt temp = createMenus(tempMenu,tempArray,arrcnt); eval(tempMenu + "= getObject(temp)"); arrcnt++; } DoneBuildingMenus = 1; } function getObject(obj,x,y){ var theObj if (typeof obj == "string"){ theObj = eval(obj) }else{ theObj = obj } return theObj } function overColor(myItem,myColor,localmenuBGColor){ myItem.bgColor = localmenuBGColor; } function outColor(myItem,localbgColor){ myItem.bgColor = localbgColor; } function createMenus(mymenu,myarray,arrindex){ tempArray = eval(myarray); menuWidth = tempArray[0]; menuBackgroundColor = tempArray[1]; menuBorderColor = tempArray[2]; menuBackgroundOverColor = tempArray[3]; dfltTextColor = tempArray[4]; mouseovercolor = tempArray[5]; isSubMenu = tempArray[6]; xpos = aPositions[arrindex-1] + anchorX; // changed to allow for browser-dependent tweaking ypos = menuYPos + anchorY; // changed to allow for browser-dependent tweaking myparent = tempArray[9]; x=10; lnk = tempArray[x]; txt = tempArray[x+1]; subMenu=tempArray[x+2]; // This will see if ther is a URL, if so setup href if (lnk){href = "HREF='" + lnk + "'"}else{href="";} cntr=0; numItems = (tempArray.length - x + 1) / 3; mylayer = new Layer(menuWidth); mylayer.menuBackgroundColor = menuBackgroundColor; mylayer.clip.width = menuWidth + 2*borderWidth; moveto(mylayer,xpos,ypos); mylayer.bgColor= borderColor; mylayer.visibility = "hide"; myparent ? mylayer.parent = eval(myparent):null; mylayer.myname = mymenu; // Clear parent will clear the timeout of the parent menu mylayer.onMouseOver = menuMouseOver; mylayer.onMouseOut = menuMouseOut; cntr=0; while (txt){ cntr++; item = new Layer(menuWidth,mylayer); item.visibility="inherit"; item.bgColor = menuBackgroundColor; // This sets the background color of the item within the menu item.menuBackgroundColor = menuBackgroundColor; // This is the color that the menu item should return to. item.menuBackgroundOverColor = menuBackgroundOverColor; item.subMenu = subMenu; item.clip.width = menuWidth; item.clip.height = 16; contentTextOpen = ""; if(cntr > 1) { contentTextOpen += ""; } contentTextOpen += ""; contentTextClose += "
"; contentTextClose = "
"; item.overtxt = contentTextOpen + "  " + txt + "" + contentTextClose; item.offtxt = contentTextOpen + "  " + txt + "" + contentTextClose; item.onMouseOver = subMenuMouseOver item.onMouseOut = subMenuMouseOut // Write the link and data to the layer item.document.write(item.offtxt); item.document.close(); item.moveBy(borderWidth,(cntr-1)*(mylayer.layers[cntr-1].clip.height) + borderWidth); mylayer.clip.height = mylayer.clip.height + item.clip.height; x+=3; lnk = tempArray[x]; txt = tempArray[x+1]; subMenu=tempArray[x+2]; if (lnk){href = "HREF='" + lnk + "'"}else{href="";} } mylayer.clip.height += 2*borderWidth; mylayer.index = arrindex; return mylayer; } function menuMouseOver(){ navRoll(aImages[this.index], 'over'); clearTimeout(this.tid); } function menuMouseOut(){ this.tid = setTimeout('hideMenuAction('+this.index+');', 500); } function subMenuMouseOver(){ if (this.subMenu){ if (this.parentLayer){ hideAllSubMenu(this.parentLayer.myname) } showMenu(this.subMenu,this); } overColor(this,"",this.menuBackgroundOverColor); } function subMenuMouseOut(){ if (this.subMenu){ localMenu = getObject(this.subMenu); localMenu.tid = setTimeout('localMenu.visibility = \'hide\'', 200); } outColor(this,this.menuBackgroundColor); } function showMenu (menuid) { if (!DoneBuildingMenus) {return false} localMenu0 = getObject('menu'+menuid); hideAll(); navRoll(aImages[menuid], 'over'); localMenu0.visibility = 'show'; } function hideMenuAction(menuid) { localMenu1 = getObject('menu'+menuid); localMenu1.visibility = 'hide'; navRoll(aImages[menuid], 'out'); } function hideMenu (menuid) { if (!DoneBuildingMenus) {return false} getObject('menu'+menuid).tid = setTimeout('hideMenuAction('+menuid+')', 500); } function hideAll() { for(i=1; i