rem: return findRoot(oParentMenu); 
add: if(oSubmenu.cfg.getProperty("visible")) {  oSubmenu.hide();  } else {  this.clearActiveItem();  this.activeItem = oItem;  oItem.cfg.setProperty("selected", true);  oSubmenu.show();  }  } else {  var sURL = oItemCfg.getProperty("url"), bCurrentPageURL = (sURL.substr((sURL.length-1),1) == "#"), sTarget = oItemCfg.getProperty("target"), bHasTarget = (sTarget && sTarget.length > 0);  /* Prevent the browser from following links equal to "#" */  if( oTarget.tagName.toUpperCase() == "A" && bCurrentPageURL && !bHasTarget ) {  Event.preventDefault(oEvent);  }  if( oTarget.tagName.toUpperCase() != "A" && !bCurrentPageURL && !bHasTarget ) {  /* Follow the URL of the item regardless of whether or not the user clicked specifically on the anchor element. */  document.location = sURL;  }   /* If the item doesn't navigate to a URL and it doesn't have a submenu, then collapse the menu tree. */  if(bCurrentPageURL && !oSubmenu) {  var oRoot = this.getRoot();  if(oRoot.cfg.getProperty("position") == "static") {  oRoot.clearActiveItem();  } else {  oRoot.hide(); 
context: YAHOO.widget.MenuItem.prototype._onClick =    function(p_sType, p_aArgs, p_oMenuItem) {        function findRoot(p_oMenu) {            var oItem = p_oMenu.parent; // The parent MenuItem instance            if(oItem) {                var oParentMenu = oItem.parent;                if(                    oParentMenu &&                    (oParentMenu instanceof YAHOO.widget.Menu) &&                    oParentMenu.cfg.getProperty("position") == "dynamic"                ) {                    return findRoot(oParentMenu);                }            }            return p_oMenu;        }        var oRoot = findRoot(this.parent);        var sURL = this.cfg.getProperty("url");        if(            (sURL.substr((sURL.length-1),1) == "#") &&            oRoot &&            oRoot.cfg.getProperty("position") == "dynamic"        ) {            oRoot.hide();        }    };
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/menu.js/buggy/www/resources/yui/menu/menu.js