context:                 function addToMenuItem(nameValueArray, menuItem) {                    // Assign id to menu item                    if (menuItem.element.id == "")                        YAHOO.util.Dom.generateId(menuItem.element);                    // Handle click on menu item                    menuItem.clickEvent.subscribe(xformsOnMenuBarItemClick,                        {"control": control, "value": nameValueArray[1]});                    // Create sub-menu if necessary                    if (nameValueArray.length > 3) {                        // Show submenu when mouse over menu item                        menuItem.mouseOverEvent.subscribe(xformsOnMenuBarItemMouseOver);                        menuItem.mouseOutEvent.subscribe(xformsOnMenuBarItemMouseOut);                        // Create submenu                        var subMenu = new YAHOO.widget.Menu(menuItem.element.id + "menu");                        //subMenu.mouseOverEvent.subscribe(onSubmenuMouseOver, subMenu, true);                        //subMenu.mouseOutEvent.subscribe(onSubmenuMouseOut,subMenu, true);                        // Add menu items to submenu                        for (var arrayIndex = 3; arrayIndex < nameValueArray.length; arrayIndex++) {                            // Extract information from the first 3 position in the array                            var childArray = nameValueArray[arrayIndex];                            var name = childArray[0];                            var value = childArray[1];                            var selected = childArray[2];                            // Create menu item and add to menu                            var subMenuItem = new YAHOO.widget.MenuItem(name, { url: "#" });//                            console.log(subMenuItem);                            subMenu.addItem(subMenuItem);                            // Add sub-sub menu                            addToMenuItem(childArray, subMenuItem)                        }                        menuItem.cfg.setProperty("submenu", subMenu);                        document.xformsOverlayManager.register(subMenu);                    }                }
meta: 5390	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5390/270daf85c320dc421f25685b24fed34c05265686/xforms.js/buggy/src/examples/web/ops/javascript/xforms.js