" //if the menu is to be displayed horizontally, then start out with a general table row tag if (strMenuDirection == "H") { strMenu += "" } //for each item in the main menu list array for (i = 0; i < aryMainMenuList.length; i++) { //determine whether or not it has a submenu (reference array has a corresponding valid value [-1 indicates no submenu]) //if a submenu exists, then "turn off" the main menu href if (arySubMenuRef[i] != -1) { strHref = "javascript://" strOnClick = "hide_layers('" + strSubMenus + "');show_layers('mnu_" + i + "');" strMenuClass = strMainMenuWithSubMenuClass } //if no submenu exists, "turn on" the main menu href else { strHref = aryMainMenuHrefs[i] strOnClick = "" strMenuClass = strMainMenuClass } //if images are being used for main menu options, then define the images, set up the image swap functions on the //onmouseout and onmouseover events if (strType == 'image') { strImage = strButtonLoc + aryMainMenuImages[i] strImageO = strButtonLoc + aryMainMenuImagesO[i] strMouseOut = "MM_swapImgRestore()" // strMouseOver = "MM_swapImage('img_" + i + "','','" + strImageO + "',1);hide_layers('" + strSubMenus + "');show_layers('mnu_" + i + "');" strMouseOver = "MM_swapImage('img_" + i + "','','" + strImageO + "',1);" + strOnClick strDisplay = strImage //if no forced dimensions exist for image, set value to "" to be handled by called function) if (i+1 <= aryMainMenuImages_dim.length) {strImage_dim = aryMainMenuImages_dim[i]} else {strImage_dim = ""} if (i+1 <= aryMainMenuImagesO_dim.length) {strImageO_dim = aryMainMenuImagesO_dim[i]} else {strImageO_dim = ""} } //if images are not being used, then set the displayed option to be text the same as what is in the menu array //and set up the onmouseout and onmouseover events else { strMouseOut = "" // strMouseOver = "hideActiveMenus();" + strOnClick strMouseOver = strOnClick strDisplay = aryMainMenuList[i] strImage_dim = "" } strMenu += build_parent_menu_option(i, strHref, strMouseOut, strMouseOver, strOnClick, strType, strDisplay, strImgCommonStyle, strMenuClass, intMenuItemHeight, strImage_dim) } //if the main menu is to be displayed horizontally, then close out with a general closing table row tag if (strMenuDirection == "H") { strMenu += "" } strMenu += "
|
" } if (is_ie) { strMenu += "
" //if the main menu is to be displayed horizontally, then start out with a general table row tag if (strMenuDirection == "H") { strMenu += "" } //for each item in the main menu list array for (i = 0; i < aryMainMenuList.length; i++) { //determine starting pixel position of submenu (in case one is to be built) //Note: first main menu item base does not need to be advanced, as it IS the initial base if (strMenuDirection == "H") { if ((i + 1) % (intHorizontalMenuLimit + 1) == 1) { intMenuBase += intMenuNext } } else { if (i > 0) { intMenuBase += intMenuNext } } //determine whether or not it has a submenu (reference array has a corresponding valid value [-1 indicates no submenu]) //if a submenu exists, then "turn off" the main menu href, and set the main menu click event to show the submenu if (arySubMenuRef[i] != -1) { strHref = "javascript://" //if the main menu is using images (as opposed to text), then use the image itself as the basis for placement //of the resulting submenu, else use the spacer.gif image placed around the text as this basis if (strType == 'image') { strOnClick = "showMenu(menus.mnu_" + i + ",'offset'," + intMenuBase + ",'img_" + i + "',-1*intSubMenuOffset,0);" } else { //if the main menu is to be displayed horizontally, then place the submenu below the main menu option, //else place the submenu to the right of the main menu option if (strMenuDirection == "H") { strOnClick = "showMenu(menus.mnu_" + i + ",'offset'," + intMenuBase + ",'img_begofmenutext_" + i + "',-1*intSubMenuOffset,0);" } else { // strOnClick = "showMenu(menus.mnu_" + i + "," + strSubMenuLeft + "," + intMenuBase + ");" strOnClick = "showMenu(menus.mnu_" + i + ",'offset'," + intMenuBase + ",'img_endofmenutext_" + i + "',-1*intSubMenuOffset,0);" } } strMenuClass = strMainMenuWithSubMenuClass } //if no submenu exists, "turn on" the main menu href else { strHref = aryMainMenuHrefs[i] strOnClick = "" strMenuClass = strMainMenuClass } //if images are being used for main menu options, then define the images, set up the image swap functions on the //onmouseout and onmouseover events if (strType == 'image') { strImage = strButtonLoc + aryMainMenuImages[i] strImageO = strButtonLoc + aryMainMenuImagesO[i] strMouseOut = "MM_swapImgRestore()" strMouseOver = "hideActiveMenus();" + strOnClick + "MM_swapImage('img_" + i + "','','" + strImageO + "',1);" strDisplay = strImage //if no forced dimension exists for image, set value to "" to be handled by called function) if (i+1 <= aryMainMenuImages_dim.length) {strImage_dim = aryMainMenuImages_dim[i]} else {strImage_dim = ""} if (i+1 <= aryMainMenuImagesO_dim.length) {strImageO_dim = aryMainMenuImagesO_dim[i]} else {strImageO_dim = ""} } //if images are not being used, then set the displayed option to be text the same as what is in the menu array //and set up the onmouseout and onmouseover events else { strMouseOut = "" strMouseOver = "hideActiveMenus();" + strOnClick strDisplay = aryMainMenuList[i] strImage_dim = "" } strMenu += build_parent_menu_option(i, strHref, strMouseOut, strMouseOver, strOnClick, strType, strDisplay, strImgCommonStyle, strMenuClass, intMenuItemHeight, strImage_dim) } //if the main menu is to be displayed horizontally, then close out with a general closing table row tag if (strMenuDirection == "H") { strMenu += "" } strMenu += "
|
" } } //-------------------------------------------------------------------------------- function build_menu_layer (strMenuOption, strMenuTop, strMouseOver, strStyle) { var strLayer = "" //build layer strLayer += "