var menuData = { // construction du menu en notation JSON menuObject : [ { id:'12502', label:"Euronext",url_href:'',children: [ { id:'12651', label:"Introdução",url_href:'/landing/landingEquities-12651-PT.html',children: [ ]}, { id:'18867', label:"Informação do Mercado",url_href:'',children: [ { id:'1647', label:"Das empresas cotadas",url_href:'',children : [ { id:'1721', label:"Comunicados",url_href:'/news/companypressreleases/wide/pressReleases-1721-PT.html', children: []}, { id:'3260', label:"Procurar Comunicados de Imprensa",url_href:'/search/advanced/cpr/cpr-3260-PT.html', children: []}, { id:'1720', label:"Calendário emitente",url_href:'/financialcalendar/financialCalendar-1720-PT.html', children: []}, { id:'1724', label:"Relatórios anuais",url_href:'http://euronext.ar.wilink.com ', children: []} ]}, { id:'1717', label:"Da Euronext",url_href:'',children : [ { id:'1738', label:"Avisos",url_href:'/news/notices/notices-1738-PT.html', children: []}, { id:'1739', label:"Anúncios",url_href:'/news/trading_announcements/announcements-1739-PT.html', children: []}, { id:'3265', label:"Procurar Avisos de negociação",url_href:'/search/advanced/eta/eta-3265-PT.html', children: []}, { id:'1730', label:"Notícias",url_href:'/news/allnews/productnews/news-1730-PT.html', children: []}, { id:'3262', label:"Procurar Notícias",url_href:'/search/advanced/pressreleases/home-3262-PT.html', children: []} ]}, { id:'19112', label:"Dados históricos",url_href:'/tools/datacentre/cash-19112-PT.html',children : [ ]}, { id:'7319', label:"Estatísticas",url_href:'',children : [ { id:'7322', label:"Per period/topic",url_href:'/editorial/wide/editorial-8353-PT.html', children: []}, { id:'7323', label:"Por Região",url_href:'/editorial/wide/editorial-7333-PT.html', children: []}, { id:'11955', label:"Discontinued reports",url_href:'/editorial/wide/editorial-11955-PT.html', children: []} ]}, { id:'2244', label:"Regulamentação",url_href:'',children : [ { id:'3386', label:"Harmonizada",url_href:'/tools/documentation/wide/documents-3386-PT.html', children: []}, { id:'3387', label:"Não harmonizada",url_href:'/tools/documentation/wide/documents-3387-PT.html', children: []} ]}, { id:'18870', label:"Calendário negociação",url_href:'',children : [ { id:'2086', label:"Horário negociação",url_href:'/tools/documentation/wide/documents-2086-PT.html', children: []}, { id:'1690', label:"Calendário negociação",url_href:'/editorial/documentation/wide/documents-1690-PT.html', children: []} ]}, { id:'1645', label:"Eventos Euronext",url_href:'',children : [ { id:'21771', label:"Próximos eventos",url_href:'/news/generaleventscurrent/comingEvents-21771-PT.html', children: []}, { id:'21772', label:"Histórico",url_href:'/news/generaleventscurrent/comingEvents-21772-PT.html', children: []} ]}, { id:'7299', label:"MiFID",url_href:'',children : [ { id:'7300', label:"Em breve",url_href:'/editorial/wide/editorial-7300-PT.html', children: []}, { id:'7301', label:"Actualizações",url_href:'/editorial/wide/editorial-7301-PT.html', children: []}, { id:'7302', label:"Events",url_href:'/editorial/wide/editorial-7302-PT.html', children: []}, { id:'300570', label:"Market Quality",url_href:'', children: []} ]} ]}, { id:'1697', label:"Acções",url_href:'',children: [ { id:'1806', label:"Introdução",url_href:'/landing/equitiesEuronext-1806-PT.html',children : [ ]}, { id:'1805', label:"Indicadores de mercado",url_href:'',children : [ { id:'1801', label:"Melhores Performances",url_href:'/trader/bestperformers/topfloplist-1801-PT.html', children: []} ]}, { id:'20808', label:"Lista e cotações de acçcões",url_href:'',children : [ { id:'7213', label:"Sociedades cotadas",url_href:'/trader/priceslists/companyprofile-7213-PT.html', children: []}, { id:'1800', label:"Cotações",url_href:'/trader/priceslists/priceslists-1800-PT.html', children: []} ]}, { id:'203870', label:"Deferred Settlement (SRD)",url_href:'/editorial/wide/editorial-203870-PT.html',children : [ ]}, { id:'1802', label:"Pasta IPO",url_href:'',children : [ { id:'21563', label:"Introdução",url_href:'/landing/landingInfo-21563-PT.html', children: []}, { id:'2050', label:"Próximos e recentes",url_href:'/news/ipos/list/listIPOs-2050-PT.html', children: []}, { id:'2051', label:"Arquivos",url_href:'/news/ipos/archive/archivesIPOs-2051-PT.html', children: []}, { id:'22067', label:"New issue",url_href:'/news/listing/notices-22067-PT.html', children: []} ]}, { id:'1807', label:"Notícias & avisos",url_href:'',children : [ { id:'2046', label:"Avisos de mercado",url_href:'/news/notices/notices-2060-PT.html', children: []}, { id:'2049', label:"Entidades emitentes",url_href:'/news/companypressreleases/wide/pressReleases-2063-PT.html', children: []}, { id:'18665', label:"Calendário emitente",url_href:'/financialcalendar/financialCalendar-18665-PT.html', children: []}, { id:'2062', label:"Relatórios anuais",url_href:'http://euronext.ar.wilink.com/', children: []}, { id:'2048', label:"Notícias Euronext",url_href:'/news/allnews/productnews/news-2067-PT.html', children: []}, { id:'2047', label:"Eventos Euronext",url_href:'/news/generaleventscurrent/comingEvents-2047-PT.html', children: []} ]}, { id:'2052', label:"Euronext lista",url_href:'',children : [ { id:'2607', label:"O que é o Euronext?",url_href:'/editorial/wide/editorial-2607-PT.html', children: []}, { id:'2608', label:"Organização",url_href:'/editorial/wide/editorial-2608-PT.html', children: []} ]}, { id:'2054', label:"Classificação ICB",url_href:'',children : [ { id:'2083', label:"ICB classification",url_href:'/trader/productinfo/ftseclassification/ftseclassification-2083-PT.html', children: []} ]}, { id:'1803', label:"Estatísticas",url_href:'/editorial/wide/editorial-1803-PT.html',children : [ ]}, { id:'2055', label:"Publicações",url_href:'/tools/documentation/wide/documents-2055-PT.html',children : [ ]}, { id:'7220', label:"Consenso dos Analistas",url_href:'/trader/consensuslist/consensuslist-7220-PT.html',children : [ ]} ]}, { id:'1698', label:"Fundos",url_href:'',children: [ { id:'1844', label:"Introdução",url_href:'/landing/landingGeneral-1844-PT.html',children : [ ]}, { id:'1847', label:"Lista e cotações de fundos",url_href:'/trader/priceslists/priceslistsfunds-1847-PT.html',children : [ ]}, { id:'1843', label:"Novas admissões",url_href:'/news/newissue/list/specialSessions/nextrecentSessions-1843-PT.html',children : [ ]}, { id:'1849', label:"Notícias",url_href:'',children : [ { id:'2625', label:"Avisos de mercado",url_href:'/news/notices/notices-2628-PT.html', children: []}, { id:'2626', label:"Notícias Euronext",url_href:'/news/allnews/productnews/news-2629-PT.html', children: []} ]}, { id:'8710', label:"Informação produtos",url_href:'',children : [ { id:'11905', label:"Apresentação",url_href:'/editorial/wide/editorial-11905-PT.html', children: []}, { id:'11906', label:"Documentação",url_href:'/editorial/wide/editorial-11906-PT.html', children: []}, { id:'8711', label:"Euronext Fund Service",url_href:'/editorial/wide/editorial-1845-PT.html', children: []} ]} ]}, { id:'1696', label:"Warrants & certificados",url_href:'',children: [ { id:'1816', label:"Introdução",url_href:'/landing/equitiesOP-1816-PT.html',children : [ ]}, { id:'1812', label:"Lista e cotações",url_href:'/trader/priceslists/newpriceslistswarrants-1812-PT.html',children : [ ]}, { id:'1814', label:"Novas admissões",url_href:'/news/listing/notices-1814-PT.html',children : [ ]}, { id:'62818', label:"Innovation",url_href:'/editorial/wide/editorial-62818-PT.html',children : [ ]}, { id:'1811', label:"Notícias & avisos",url_href:'',children : [ { id:'2635', label:"Avisos de mercado",url_href:'/news/notices/notices-2639-PT.html', children: []}, { id:'2636', label:"Notícias Euronext",url_href:'/news/allnews/productnews/news-2640-PT.html', children: []} ]}, { id:'1813', label:"Informação produtos",url_href:'',children : [ { id:'2643', label:"Resumo do mercado",url_href:'/editorial/wide/editorial-2645-PT.html', children: []}, { id:'2644', label:"Issuers",url_href:'/editorial/wide/editorial-2644-PT.html', children: []}, { id:'2646', label:"Parceiros",url_href:'/editorial/wide/editorial-2646-PT.html', children: []} ]}, { id:'1818', label:"Estatísticas",url_href:'/editorial/wide/editorial-1818-PT.html',children : [ ]} ]}, { id:'1695', label:"ETF/Trackers",url_href:'',children: [ { id:'1825', label:"Introdução",url_href:'/landing/equitiesOP-1825-PT.html',children : [ ]}, { id:'1821', label:"ETF admitidos e cotação",url_href:'/trader/priceslists/pricesliststrackers-1821-PT.html',children : [ ]}, { id:'200021', label:"Deferred Settlement (SRD)",url_href:'/editorial/wide/editorial-200021-PT.html',children : [ ]}, { id:'1824', label:"Novas admissões",url_href:'/news/listing/notices-1824-PT.html',children : [ ]}, { id:'1822', label:"Notícias & avisos",url_href:'',children : [ { id:'2652', label:"Avisos de mercado",url_href:'/news/notices/notices-2654-PT.html', children: []}, { id:'2650', label:"Notícias Euronext",url_href:'/news/allnews/productnews/news-2657-PT.html', children: []} ]}, { id:'1819', label:"Informação produtos",url_href:'',children : [ { id:'2665', label:"NextTrack",url_href:'/editorial/wide/editorial-2679-PT.html', children: []} ]}, { id:'22218', label:"Participantes do mercado",url_href:'',children : [ { id:'22575', label:"Emitentes",url_href:'/editorial/wide/editorial-2666-PT.html', children: []}, { id:'2663', label:"Brokers",url_href:'/editorial/wide/editorial-2663-PT.html', children: []}, { id:'2664', label:"Criadores de mercado",url_href:'/editorial/wide/editorial-2664-PT.html', children: []} ]}, { id:'2660', label:"Estatísticas",url_href:'/editorial/wide/editorial-2660-PT.html',children : [ ]}, { id:'22271', label:"Publicações",url_href:'/editorial/wide/editorial-22271-PT.html',children : [ ]} ]}, { id:'8509', label:"ETVehicles",url_href:'',children: [ { id:'19162', label:"Introdução",url_href:'/landing/equitiesOP-19162-PT.html',children : [ ]}, { id:'21968', label:"Lista e cotações de ETVehicles",url_href:'/trader/etcs/etcs_landing-21968-PT.html',children : [ ]}, { id:'8517', label:"Notícias & avisos",url_href:'',children : [ { id:'8540', label:"Avisos",url_href:'/news/notices/notices-8540-PT.html', children: []}, { id:'8541', label:"Avisos de negociação",url_href:'/news/trading_announcements/announcements-8541-PT.html', children: []} ]}, { id:'8516', label:"Informação produtos",url_href:'',children : [ { id:'8539', label:"ETV segment",url_href:'/editorial/wide/editorial-8556-PT.html', children: []}, { id:'8537', label:"Emitente(s)",url_href:'/editorial/wide/editorial-8537-PT.html', children: []}, { id:'8538', label:"Criadores de mercado",url_href:'/editorial/wide/editorial-224423-PT.html', children: []}, { id:'89820', label:"Listing Fees",url_href:'/editorial/wide/editorial-89820-PT.html', children: []} ]}, { id:'8557', label:"Publicações",url_href:'/tools/documentation/wide/documents-8557-PT.html',children : [ ]} ]}, { id:'12820', label:"Índices",url_href:'',children: [ { id:'19574', label:"Introdução",url_href:'/landing/equitiesOP-19574-PT.html',children : [ ]}, { id:'4690', label:"Indicadores de mercado",url_href:'',children : [ { id:'4733', label:"Indicadores de mercado",url_href:'/trader/marketwatch/marketwatch-22167-PT.html', children: []} ]} ]}, { id:'12802', label:"Participantes do mercado",url_href:'',children: [ { id:'1628', label:"Membros",url_href:'',children : [ { id:'3417', label:"Introdução",url_href:'/landing/landingGeneral-3417-PT.html', children: []}, { id:'3395', label:"Notícias do mercado",url_href:'/forourclient/mrdoc/nodesc/wide/mrDoc-3447-PT.html', children: []}, { id:'3393', label:"Adesão de membros",url_href:'/editorial/wide/editorial-3455-PT.html', children: []}, { id:'163820', label:"Membership forms",url_href:'/editorial/wide/editorial-163820-PT.html', children: []}, { id:'1662', label:"Lista de membros",url_href:'/forourclient/mbs/market/list-1662-PT.html', children: []}, { id:'8510', label:"Custos",url_href:'/editorial/wide/editorial-8510-PT.html', children: []}, { id:'3405', label:"Serviços para membros",url_href:'/editorial/wide/editorial-3451-PT.html', children: []}, { id:'90268', label:"Broker Volume",url_href:'/editorial/wide/editorial-90268-PT.html', children: []}, { id:'3394', label:"Criadores de mercado",url_href:'/editorial/wide/editorial-3459-PT.html', children: []}, { id:'3403', label:"ISVs/ASPs",url_href:'/editorial/wide/editorial-3438-PT.html', children: []}, { id:'67968', label:"Universal Trading Platform",url_href:'/landing/landingGeneral-67969-PT.html', children: []}, { id:'3396', label:"Mercado / IT Docs",url_href:'/forourclient/mrdoc/general/wide/mrDoc-3477-PT.html', children: []}, { id:'3404', label:"Projectos",url_href:'/editorial/wide/editorial-165222-PT.html', children: []}, { id:'7287', label:"MiFID",url_href:'/editorial/wide/editorial-7288-PT.html', children: []}, { id:'7243', label:"Contactos",url_href:'/editorial/wide/editorial-7243-PT.html', children: []} ]}, { id:'21062', label:"Investidores institucionais",url_href:'',children : [ { id:'1630', label:"Introdução",url_href:'/editorial/wide/editorial-1630-PT.html', children: []} ]} ]} ]}, { id:'4386', label:"NYSE Alternext",url_href:'',children: [ { id:'21363', label:"Introdução",url_href:'/landing/equitiesAlternext-21363-PT.html',children: [ ]}, { id:'21775', label:"Informação do mercado",url_href:'',children: [ { id:'4346', label:"Da NYSE Alternext",url_href:'',children : [ { id:'4361', label:"Avisos",url_href:'/news/notices/notices-4361-PT.html', children: []}, { id:'19571', label:"Procurar Avisos",url_href:'/search/advanced/notices/notices-19571-PT.html', children: []}, { id:'4362', label:"Avisos de negociação",url_href:'/news/trading_announcements/announcements-4362-PT.html', children: []}, { id:'19572', label:"Procurar Avisos de negociação",url_href:'/search/advanced/eta/eta-19572-PT.html', children: []}, { id:'4365', label:"Notícias",url_href:'/news/press_releases/pressReleases-4365-PT.html', children: []}, { id:'19573', label:"Procurar Notícias",url_href:'/search/advanced/pressreleases/home-19573-PT.html', children: []}, { id:'4366', label:"Em foco",url_href:'/news/othernews/otherNews-4366-PT.html', children: []}, { id:'4367', label:"Subscrição",url_href:'/editorial/wide/editorial-4367-PT.html', children: []}, { id:'8555', label:"Boletins",url_href:'/news/newsletters/wide/newsletters-8555-PT.html', children: []} ]}, { id:'21462', label:"Das empresas cotadas",url_href:'',children : [ { id:'4347', label:"Comunicados",url_href:'/news/companypressreleases/wide/pressReleases-4347-PT.html', children: []}, { id:'19567', label:"Procurar Comunicados de Imprensa",url_href:'/search/advanced/cpr/cpr-19567-PT.html', children: []}, { id:'18666', label:"Calendário de publicações",url_href:'/financialcalendar/financialCalendarAlternext-18666-PT.html', children: []} ]} ]}, { id:'19116', label:"Acções",url_href:'',children: [ { id:'20662', label:"Introdução",url_href:'/landing/landingGeneral-20662-PT.html',children : [ ]}, { id:'19118', label:"Indicadores de mercado",url_href:'',children : [ { id:'7278', label:"Melhores Performances",url_href:'/trader/bestperformers/topfloplistalt-7278-PT.html', children: []} ]}, { id:'19119', label:"Sociedades cotadas",url_href:'',children : [ { id:'4340', label:"Tabela de preços",url_href:'/alternext/pricelist/pricelist-4340-PT.html', children: []}, { id:'4341', label:"Perfil do Emitente",url_href:'/alternext/companies/companies-4341-PT.html', children: []} ]}, { id:'4348', label:"Pasta IPO",url_href:'',children : [ { id:'4353', label:"Próximos e recentes",url_href:'/news/ipos/list/listIPOs-4353-PT.html', children: []}, { id:'4354', label:"Arquivos",url_href:'/news/ipos/archive/archivesIPOs-4354-PT.html', children: []} ]}, { id:'4344', label:"Organização do mercado",url_href:'',children : [ { id:'4357', label:"Organização do mercado",url_href:'/editorial/wide/editorial-4357-PT.html', children: []} ]}, { id:'4355', label:"Publicações",url_href:'/tools/documentation/wide/documents-4355-PT.html',children : [ ]}, { id:'7221', label:"Consenso dos Analistas",url_href:'/trader/consensuslist/consensuslist-7221-PT.html',children : [ ]} ]}, { id:'19117', label:"Participantes do mercado",url_href:'',children: [ { id:'4350', label:"Criadores de mercado",url_href:'/editorial/wide/editorial-4350-PT.html',children : [ ]}, { id:'4352', label:"Listing Sponsors",url_href:'',children : [ { id:'4413', label:"Apresentação",url_href:'/editorial/wide/editorial-4413-PT.html', children: []}, { id:'4414', label:"Lista",url_href:'/listingsponsor/listingSponsorAll-4414-PT.html', children: []} ]} ]}, { id:'4339', label:"Contactos",url_href:'',children: [ { id:'4867', label:"Contactos",url_href:'/editorial/wide/editorial-4867-PT.html',children : [ ]} ]} ]}, { id:'45072', label:"NYSE Arca Europe",url_href:'',children: [ { id:'40818', label:"Introdução",url_href:'/landing/landingNAE-40818-PT.html',children: [ ]}, { id:'50119', label:"How to join",url_href:'/editorial/wide/editorial-50119-PT.html',children: [ ]}, { id:'50120', label:"Market model",url_href:'/editorial/wide/editorial-50120-PT.html',children: [ ]}, { id:'50121', label:"Market rules",url_href:'/editorial/wide/editorial-50121-PT.html',children: [ ]}, { id:'61568', label:"Notícias & avisos",url_href:'',children: [ { id:'40578', label:"Notícias",url_href:'',children : [ { id:'61569', label:"Notícias",url_href:'/nysearcaeurope/news/infoflash-61569-PT.html', children: []}, { id:'21414', label:"Arquivos",url_href:'/nysearcaeurope/news/infoflash-21414-PT.html', children: []} ]}, { id:'61570', label:"Avisos",url_href:'/editorial/wide/editorial-61570-PT.html',children : [ ]} ]}, { id:'50122', label:"Technology",url_href:'/editorial/wide/editorial-50122-PT.html',children: [ ]}, { id:'82068', label:"NYSE Arca Europe members",url_href:'/editorial/wide/editorial-82068-PT.html',children: [ ]}, { id:'55018', label:"Instrument list",url_href:'/editorial/wide/editorial-55018-PT.html',children: [ ]}, { id:'305370', label:"Market Activity",url_href:'/landing/landingNAE-305370-PT.html',children: [ ]}, { id:'55019', label:"Stocks per country",url_href:'/nysearcaeurope/directory-55019-PT.html',children: [ ]}, { id:'66068', label:"Most active",url_href:'/nysearcaeurope/topfloplist-66068-PT.html',children: [ ]}, { id:'60768', label:"Contactos",url_href:'/editorial/wide/editorial-60768-PT.html',children: [ ]} ]}, { id:'46318', label:"SmartPool",url_href:'',children: [ { id:'46319', label:"Introdução",url_href:'/landing/landingGeneral-46319-PT.html',children: [ ]}, { id:'46320', label:"Mensagem da equipa",url_href:'/landing/landingGeneral-46320-PT.html',children: [ ]}, { id:'46321', label:"Papel de NYSE Euronext",url_href:'/landing/landingGeneral-46321-PT.html',children: [ ]}, { id:'46322', label:"Modelo de Mercado",url_href:'',children: [ { id:'46324', label:"Key Features",url_href:'/landing/landingGeneral-46324-PT.html',children : [ ]}, { id:'46325', label:"Porque escolher a SmartPool?",url_href:'/landing/landingGeneral-46325-PT.html',children : [ ]} ]}, { id:'46323', label:"Tornar-se membro",url_href:'/landing/landingGeneral-46323-PT.html',children: [ ]} ]} ], // méthodes de construction du menu en HTML referenceChannel : undefined, anchorElement : undefined, focusedElement : undefined, channelIDSelected : undefined, hasVisibleNodeChildren : false, buildMenu : function(elt, visibleNode) { var frag = document.createDocumentFragment(); var oldNode = elt.cloneNode(false); menuData.anchorElement = oldNode; menuData.channelIDSelected = visibleNode ; //menuData.buildSubMenu(elt, menuData.menuObject, 1); menuData.buildSubMenu(oldNode, menuData.menuObject, 1); frag.appendChild(oldNode); elt.parentNode.replaceChild(frag,elt); menuData.anchorElement.select("li.extensible").each(function(item) { item.addClassName("collapsed"); item.addClassName("collapsed-level"+item.level); }); var referenceChannel= $(visibleNode); menuData.focusedElement = referenceChannel; if (referenceChannel != undefined && referenceChannel != null) { level = referenceChannel.level ; if ( ! menuData.hasVisibleNodeChildren && (level == 2 || level == 3 || level == 4)) referenceChannel.addClassName("focusedLevel"+level) ; else if (level == 1) referenceChannel.addClassName("focused"); if (!referenceChannel.hasClassName("extensible")) referenceChannel = referenceChannel.up("li.extensible"); if (referenceChannel != undefined) { referenceChannel.expandMenu(); menuData.referenceChannel = referenceChannel; } } menuData.anchorElement.observe("click", menuClickObserver); $(document).observe("mouseover", menuOverObserver); }, buildSubMenu : function(elt, children, level) { var ul = new Element("ul"); children.each(function(item) { var li = new Element("li", {id : item.id}); li.level=level; if (item.children.length > 0) { if (item.id == menuData.channelIDSelected) menuData.hasVisibleNodeChildren = true ; li.update("
"+item.label+"
"); li.addClassName("extensible"); li.collapseMenu=menuFct.collapseMenu; li.expandMenu=menuFct.expandMenu; var subUl = menuData.buildSubMenu(li, item.children, level+1); subUl.hide(); } else li.update("
"+item.label+"
"); ul.insert(li); }); elt.insert(ul); return ul; } }; var menuFct = { collapseMenu : function () { var elt = $(this); if (elt.hasClassName("collapsed")) return; elt.removeClassName("expanded"); elt.removeClassName("expanded-level"+elt.level); elt.addClassName("collapsed"); elt.addClassName("collapsed-level"+elt.level); var toHide = elt.childElements()[1]; Effect.BlindUp(toHide, { duration: 0.2 }); // collapse children recursively elt.select('li.expanded').each(function(child) { child.collapseMenu() ; }) ; }, expandMenu : function () { var elt = $(this); // expand if not done yet if (!elt.hasClassName("expanded")) { elt.addClassName("expanded"); elt.addClassName("expanded-level"+elt.level); elt.removeClassName("collapsed"); elt.removeClassName("collapsed-level"+elt.level); var toShow = elt.childElements()[1]; Effect.BlindDown(toShow, { duration: 0.3 }); } // collapse sibblings elt.siblings().each(function(sib) { if (sib.match("li.extensible", "expanded")) sib.collapseMenu(); }); // expand father recursively var fatherToExpand = elt.up('.extensible'); if (fatherToExpand != undefined) fatherToExpand.expandMenu(); } }; var backToRefID = null; function menuOverObserver(e) { var element = Event.element(e); if (element.descendantOf(menuData.anchorElement)) // Over menu { // Just entered -> Cancel the back to reference channel callback if (backToRefID != null) { clearTimeout(backToRefID); backToRefID = null; } } // Not over menu and trigger not set yet else if (backToRefID == null) { // Trigger the back to reference channel callback backToRefID = setTimeout(function() { // open the reference node if (menuData.referenceChannel != undefined) { menuData.referenceChannel.expandMenu(); // collpase the children of the reference element menuData.referenceChannel.select('.expanded').each(function(child) { child.collapseMenu() ; }) ; } // collapse the brothers of the active element if (menuData.focusedElement != undefined) { menuData.focusedElement.siblings().each(function(sib) { if (sib.match("li.extensible", "expanded")) sib.collapseMenu() ; }) ; } }, 5000); } } function menuClickObserver(e) { var elt = Event.element(e); // Skip links if (elt.match("a div")||elt.match("a")) return; // Get the first extensible parent var extensibleParent = elt.match("li.extensible")?elt:elt.up("li.extensible"); // If not found, we're not in the menu if (extensibleParent == undefined) return; if (extensibleParent.expandMenu != undefined) // If found { if (extensibleParent.hasClassName("expanded")) extensibleParent.collapseMenu(); else extensibleParent.expandMenu(); e.stop(); } }