Ну, во первых это не моя работа.
Код:
|
/**
* mm_menu 20MAR2002 Version 6.0
* Andy Finnell, March 2002
* Copyright (c) 2000-2002 Macromedia, Inc.
*
* based on menu.js
* 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 addMenuItem(label, mHeight, action) {
this.items[this.items.length] = label;
this.menuNewItemHeight[this.menuNewItemHeight.length] = mHeight;
this.actions[this.actions.length] = action;
}
function FIND(item) {
if( window.mmIsOpera ) return(document.getElementById(item));
if (document.all) return(document.all[item]);
if (document.getElementById) return(document.getElementById(item));
return(false);
}
function writeMenus(container) {
if (window.triedToWriteMenus) return;
var agt = navigator.userAgent.toLowerCase();
window.mmIsOpera = agt.indexOf("opera") != -1;
if (!container && document.layers) {
window.delayWriteMenus = this.writeMenus;
var timer = setTimeout('delayWriteMenus()', 500);
container = new Layer(100);
clearTimeout(timer);
} else if (document.all || document.hasChildNodes || window.mmIsOpera) {
document.writeln('<span id="menuContainer"></span>');
container = FIND("menuContainer");
}