/* FILE: menus2.cj REVISIONS: 10/29/2002 Initial creation ' Company: Utah DataNet, Inc. ' ' Copyright(C) 2003, All Rights Reserved Worldwide. No portion of this module may ' be used in or be supplied with any executable program or program collection without ' express written consent of Utah DataNet, Inc. or its assigns. '****************************************************** ' PURPOSE: Client-side general purpose routines for menus '****************************************************** ' MODIFICATION HISTORY ' ' 02/22/03 JRH Created from menus1.cj ' Modifed by changing references to constants so the ' better reflect usage. Added a separate classes. ' 02/23/2003 JRH Added setMouseOver2(this,sMsg) to allow sending a status ' message to Window.Status ' '****************************************************** */ var MENU_SELECTEDNAME var MENU_SELECTEDCLASS = "MENU_SELECTEDCLASS" ; var MENU_NOT_SELECTEDCLASS = "MENU_NOT_SELECTEDCLASS" ; var MENU_MOUSE_OVERCLASS = "MENU_MOUSE_OVERCLASS" ; /*********************************************************** setActiveMenu takes the name of the active menu for the page and sets it to the MENU_SELECTEDCLASS. This function should be called during the ONLOAD event for the page. ***********************************************************/ function setActiveMenu(sMenuName) { try { var oItem = document.all.item(sMenuName); MENU_SELECTEDNAME = sMenuName; if (oItem) { document.all.item(sMenuName).className = MENU_SELECTEDCLASS ; document.all.item(sMenuName).focus(); } } catch(e) { } } function setMouseOver2(oItem,sMsg) { try { if (oItem.name == MENU_SELECTEDNAME) { oItem.style.cursor = "default"; } else { oItem.className = MENU_MOUSE_OVERCLASS; oItem.style.cursor = "hand"; window.status = sMsg; } } catch(e) { } } function setMouseOver(oItem) { if (oItem) { if (oItem.name == MENU_SELECTEDNAME) { oItem.style.cursor = "default"; } else { oItem.className = MENU_MOUSE_OVERCLASS; oItem.style.cursor = "hand"; } } } function setMouseOut(oItem) { try { oItem.style.cursor = "default"; if (oItem.name != MENU_SELECTEDNAME ) { oItem.className = MENU_NOT_SELECTEDCLASS; window.status = ""; } } catch(e) { } }