/** * Menu 990702 * by gary smith, July 1997 * Copyright (c) 1997-1999 Netscape Communications Corp. * * Netscape grants you a royalty free license to use or modify this * software provided that this copyright notice appears on all copies. * This software is provided "AS IS," without a warranty of any kind. */ function Menu(label) { this.version = "990702 [Menu; menu.js]"; this.type = "Menu"; this.fontSize = 11; this.fontWeight = "plain"; this.fontFamily = "verdana,arial,helvetica"; this.fontColor = "#ffffff"; this.fontColorHilite = "#000000"; this.bgColor = "#aaaaaa"; this.menuBorder = 1; this.menuItemBorder = 1; this.menuItemBgColor = "#59709B"; this.menuLiteBgColor = "#6699cc"; this.menuBorderBgColor = "#777777"; this.menuHiliteBgColor = "#6699cc"; this.menuContainerBgColor = "#cccccc"; this.childMenuIcon = "../img/arrows.gif"; this.childMenuIconHilite = "../img/arrows2.gif"; this.items = new Array(); this.actions = new Array(); this.colors = new Array(); this.mouseovers = new Array(); this.mouseouts = new Array(); this.childMenus = new Array(); this.addMenuItem = addMenuItem; this.addMenuSeparator = addMenuSeparator; this.writeMenus = writeMenus; this.showMenu = showMenu; this.onMenuItemOver = onMenuItemOver; this.onMenuItemOut = onMenuItemOut; this.onMenuItemDown = onMenuItemDown; this.onMenuItemAction = onMenuItemAction; this.hideMenu = hideMenu; this.hideChildMenu = hideChildMenu; this.mouseTracker = mouseTracker; this.setMouseTracker = setMouseTracker; if (!window.menus) window.menus = new Array(); this.label = label || "menuLabel" + window.menus.length; window.menus[this.label] = this; window.menus[window.menus.length] = this; if (!window.activeMenus) window.activeMenus = new Array(); if (!window.menuContainers) window.menuContainers = new Array(); if (!window.mDrag) { window.mDrag = new Object(); mDrag.startMenuDrag = startMenuDrag; mDrag.doMenuDrag = doMenuDrag; this.setMouseTracker(); } if (window.MenuAPI) MenuAPI(this); } function addMenuItem(label, action, color, mouseover, mouseout) { this.items[this.items.length] = label; this.actions[this.actions.length] = action; this.colors[this.colors.length] = color; this.mouseovers[this.mouseovers.length] = mouseover; this.mouseouts[this.mouseouts.length] = mouseout; } function addMenuSeparator() { this.items[this.items.length] = "separator"; this.actions[this.actions.length] = ""; this.menuItemBorder = 0; } function writeMenus(container) { if (!container && document.layers) { if (eval("document.width")) container = new Layer(1000); } else if (!container && document.all) { if (!document.all["menuContainer"]) document.writeln(''); container = document.all["menuContainer"]; } if (!container && !window.delayWriteMenus) { window.delayWriteMenus = this.writeMenus; window.menuContainerBgColor = this.menuContainerBgColor; setTimeout('delayWriteMenus()', 3000); return; } container.isContainer = "menuContainer" + menuContainers.length; menuContainers[menuContainers.length] = container; container.menus = new Array(); for (var i=0; i