var menuData = { // construction du menu en notation JSON menuObject : [ { id:'12504', label:"Sociétés cotées",url_href:'',children: [ { id:'12650', label:"Présentation",url_href:'/landing/listedSecurities-12650-FR.html',children: [ ]}, { id:'187620', label:"S'introduire",url_href:'',children: [ { id:'187622', label:"Présentation",url_href:'/landing/landingGeneral-187622-FR.html',children : [ ]}, { id:'187623', label:"NYSE Euronext",url_href:'',children : [ { id:'188620', label:"Présentation",url_href:'/landing/landingGeneral-188621-FR.html', children: []}, { id:'188624', label:"Conseillers d'entreprise",url_href:'/editorial/wide/editorial-188626-FR.html', children: []}, { id:'188625', label:"Apporteurs de liquidité",url_href:'/editorial/wide/editorial-188630-FR.html', children: []} ]}, { id:'187624', label:"NYSE Alternext",url_href:'',children : [ { id:'188633', label:"Présentation",url_href:'/landing/landingGeneral-188634-FR.html', children: []}, { id:'188632', label:"Conseillers d'entreprise",url_href:'/editorial/wide/editorial-188637-FR.html', children: []} ]}, { id:'187625', label:"Marché libre",url_href:'',children : [ { id:'188642', label:"Présentation",url_href:'/landing/equitiesOP-188642-FR.html', children: []}, { id:'188643', label:"Bruxelles",url_href:'/editorial/wide/editorial-188643-FR.html', children: []}, { id:'188644', label:"Paris",url_href:'/editorial/wide/editorial-188644-FR.html', children: []} ]} ]}, { id:'187621', label:"Produits et services",url_href:'',children: [ { id:'189120', label:"Présentation",url_href:'/landing/landingGeneral-189120-FR.html',children : [ ]}, { id:'189121', label:"Market access center",url_href:'',children : [ { id:'189371', label:"Présentation",url_href:'/landing/landingGeneral-189371-FR.html', children: []}, { id:'189126', label:"Advisory",url_href:'/editorial/wide/editorial-189126-FR.html', children: []}, { id:'189127', label:"Market intelligence",url_href:'/editorial/wide/editorial-189127-FR.html', children: []}, { id:'189128', label:"Investor outreach",url_href:'/editorial/wide/editorial-189128-FR.html', children: []}, { id:'189129', label:"Infos pédagogiques",url_href:'/editorial/wide/editorial-189129-FR.html', children: []}, { id:'189130', label:"Visibilité",url_href:'/editorial/wide/editorial-189130-FR.html', children: []} ]}, { id:'1672', label:"Actualités & avis",url_href:'',children : [ { id:'3010', label:"Avis",url_href:'/search/advanced/notices/notices-4702-FR.html', children: []}, { id:'3011', label:"Annonces",url_href:'/search/advanced/eta/eta-4703-FR.html', children: []}, { id:'3013', label:"Actualité sociétés cotées",url_href:'/news/companypressreleases/wide/pressReleases-4704-FR.html', children: []}, { id:'3012', label:"Actualité Euronext",url_href:'/news/allnews/wide/news-4707-FR.html', children: []} ]}, { id:'189123', label:"Publications",url_href:'/tools/documentation/wide/documents-189123-FR.html',children : [ ]}, { id:'189124', label:"Listings eXchange",url_href:'',children : [ { id:'294320', label:"N° 2 - 3e trimestre 2011",url_href:'/editorial/wide/editorial-294321-FR.html', children: []}, { id:'279970', label:"N° 1 - 2ème trimestre 2011",url_href:'/editorial/wide/editorial-279971-FR.html', children: []}, { id:'282920', label:"Listed!",url_href:'/editorial/wide/editorial-282920-FR.html', children: []} ]} ]}, { id:'7214', label:"Liste sociétés cotées",url_href:'',children: [ { id:'19512', label:"Présentation",url_href:'',children : [ { id:'18912', label:"Par région",url_href:'/landing/listedcompanies/overview/lc-18912-FR.html', children: []}, { id:'18913', label:"Libellé",url_href:'/landing/listedcompanies/overview/lc-18913-FR.html', children: []}, { id:'18915', label:"Secteur",url_href:'/landing/listedcompanies/overview/lc-18915-FR.html', children: []}, { id:'18916', label:"Capitalisation",url_href:'/landing/listedcompanies/overview/lc-18916-FR.html', children: []} ]} ]}, { id:'189131', label:"Calendrier sociétés",url_href:'',children: [ { id:'18963', label:"NYSE Euronext",url_href:'/financialcalendar/financialCalendar-18963-FR.html',children : [ ]}, { id:'18964', label:"NYSE Alternext",url_href:'/financialcalendar/financialCalendarAlternext-18964-FR.html',children : [ ]} ]}, { id:'1741', label:"Nouvelles cotations",url_href:'',children: [ { id:'21562', label:"Présentation",url_href:'/landing/landingInfo-21562-FR.html',children : [ ]}, { id:'2129', label:"Introductions",url_href:'',children : [ { id:'1935', label:"A venir et actuelles",url_href:'/news/ipos/list/listIPOs-1935-FR.html', children: []}, { id:'1936', label:"Archives",url_href:'/news/ipos/archive/archivesIPOs-1936-FR.html', children: []} ]}, { id:'2132', label:"Nouvelles admissions",url_href:'',children : [ { id:'4768', label:"A venir et actuelles",url_href:'/news/listing/notices-4768-FR.html', children: []} ]}, { id:'2131', label:"Sessions spéciales",url_href:'',children : [ { id:'4770', label:"A venir et actuelles",url_href:'/news/newissue/list/specialSessions/nextrecentSessions-4770-FR.html', children: []}, { id:'4771', label:"Archives",url_href:'/news/newissue/archive/archives-4771-FR.html', children: []} ]} ]}, { id:'167723', label:"Evénements Listing",url_href:'',children: [ { id:'11656', label:"A venir et actuelles",url_href:'/bellsceremonies/BellEventsList-11656-FR.html',children : [ ]}, { id:'167724', label:"Archives",url_href:'/bellsceremonies/archives/BellEventsList-167724-FR.html',children : [ ]} ]}, { id:'189372', label:"Contacts",url_href:'',children: [ { id:'189373', label:"Admission",url_href:'/editorial/wide/editorial-189373-FR.html',children : [ ]}, { id:'189374', label:"Cotation internationale",url_href:'/editorial/wide/editorial-189374-FR.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(); } }