// // // Simple popup menu implementation: // // var gActiveMenu = null; function SimpleMenuBar(aMenuId, aOptions, aMenuItemList) { var div = document.getElementById(aMenuId); this.mDiv = div; div._menu = this; this.mOptions = aOptions || new Object(); // Grab any options for the menu... // // "style" - CSS style to associate with each menu item // this.mStyle = this.mOptions["style"] || "menuitem"; // Create the TABLE for the menu bar... var menuTable = document.createElement("TABLE"); div.appendChild(menuTable); // Create the TBODY to contain the rows... var tbody = document.createElement("TBODY"); menuTable.appendChild(tbody); // Create the TR for the menu bar... var row = document.createElement("TR"); tbody.appendChild(row); // Create the TD for each menu item... for (var i=0; i