add:  if (!("uiElements" in this.menuSpecs[menuName])) this.menuSpecs[menuName].uiElements = [subMenu]; else if (!arrayContains(this.menuSpecs[menuName].uiElements, subMenu)) this.menuSpecs[menuName].uiElements.push(subMenu);  
context: function mmgr_newmenu (parentNode, beforeNode, menuName, domId, attribs){    if (typeof domId == "undefined")        domId = menuName;    if (!ASSERT(menuName in this.menuSpecs, "unknown menu name " + menuName))        return null;    var menuSpec = this.menuSpecs[menuName];    var subMenu = this.appendSubMenu (parentNode, beforeNode, menuName, domId,                                      menuSpec.label, attribs);    this.createMenuItems (subMenu, null, menuSpec.items);    return subMenu;}
meta: 1567	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1567/1b77637aa0ade5c78587b45d9726bb8a54554f3a/menu-manager.js/buggy/js/lib/menu-manager.js