var menuData = { // construction du menu en notation JSON menuObject : [ { id:'12505', label:"Individual investor",url_href:'',children: [ { id:'12700', label:"Overview",url_href:'/landing/investorIndividual-12700-EN.html',children: [ ]}, { id:'1925', label:"My Euronext",url_href:'',children: [ { id:'3040', label:"Register",url_href:'/myEuronext/users/registration-22267-EN.html',children : [ ]}, { id:'2203', label:"User",url_href:'',children : [ { id:'3039', label:"Log in",url_href:'/myEuronext/login/login-3039-EN.html', children: []}, { id:'3041', label:"Profile",url_href:'/myEuronext/profile/profile-3041-EN.html', children: []} ]}, { id:'2200', label:"My portfolio",url_href:'/myEuronext/portfolio/listPortfolio-2200-EN.html',children : [ ]}, { id:'2201', label:"My watchlist",url_href:'/myEuronext/portfolio/listPortfolio-2201-EN.html',children : [ ]}, { id:'2202', label:"My alerts",url_href:'/myEuronext/alerts/listAlerts-2202-EN.html',children : [ ]}, { id:'45218', label:"Single Order Book",url_href:'/editorial/wide/editorial-45218-EN.html',children : [ ]} ]}, { id:'21773', label:"Netherlands",url_href:'',children: [ { id:'18814', label:"Overview",url_href:'/landing/landingGeneral-18814-EN.html',children : [ ]} ]}, { id:'1750', label:"Belgium",url_href:'',children: [ { id:'21515', label:"Overview",url_href:'/landing/homeBrussels-21515-EN.html',children : [ ]}, { id:'39574', label:"My Euronext Brussels",url_href:'/editorial/wide/editorial-39574-EN.html',children : [ ]} ]}, { id:'21513', label:"United Kingdom",url_href:'',children: [ { id:'21514', label:"Overview",url_href:'/landing/landingGeneral-21514-EN.html',children : [ ]}, { id:'3700', label:"How to start trading",url_href:'',children : [ { id:'3699', label:"How to start trading",url_href:'/editorial/wide/editorial-3699-EN.html', children: []}, { id:'22567', label:"Data & Trading Tools",url_href:'/editorial/wide/editorial-23818-EN.html', children: []} ]}, { id:'3698', label:"Partner Brokers",url_href:'',children : [ { id:'3702', label:"Introduction",url_href:'/editorial/wide/editorial-3702-EN.html', children: []}, { id:'3703', label:"ADM Securities",url_href:'/editorial/wide/editorial-3703-EN.html', children: []}, { id:'3704', label:"GNI Touch®",url_href:'/editorial/wide/editorial-3704-EN.html', children: []}, { id:'37618', label:"Interactive Brokers",url_href:'/editorial/wide/editorial-37618-EN.html', children: []}, { id:'3707', label:"MF Global Ltd",url_href:'/editorial/wide/editorial-3707-EN.html', children: []}, { id:'3706', label:"Monument Securities Ltd",url_href:'/editorial/wide/editorial-3706-EN.html', children: []}, { id:'3709', label:"ODL Securities",url_href:'/editorial/wide/editorial-3709-EN.html', children: []}, { id:'3705', label:"Rensburg Sheppards",url_href:'/editorial/wide/editorial-3705-EN.html', children: []}, { id:'3708', label:"Sucden Financial",url_href:'/editorial/wide/editorial-3708-EN.html', children: []} ]}, { id:'39420', label:"Trading Simulation game",url_href:'http://usftradinggame.euronext.if5.com/',children : [ ]} ]}, { id:'1754', label:"France",url_href:'',children: [ { id:'21516', label:"Overview",url_href:'/landing/landingGeneral-21516-EN.html',children : [ ]} ]}, { id:'33118', label:"Portugal",url_href:'',children: [ { id:'33119', label:"Overview",url_href:'/landing/landingGeneral-33119-EN.html',children : [ ]} ]}, { id:'12753', label:"Education",url_href:'',children: [ { id:'1747', label:"The exchange",url_href:'',children : [ { id:'1786', label:"About Nyse Euronext",url_href:'/editorial/wide/editorial-1786-EN.html', children: []}, { id:'1785', label:"Financial organisations",url_href:'/editorial/wide/editorial-1785-EN.html', children: []} ]}, { id:'1748', label:"Products",url_href:'',children : [ { id:'1789', label:"Stocks",url_href:'/editorial/wide/editorial-2284-EN.html', children: []}, { id:'1793', label:"Warrants & Certificates",url_href:'/editorial/wide/editorial-2304-EN.html', children: []}, { id:'1794', label:"ETF/Trackers",url_href:'/editorial/wide/editorial-2308-EN.html', children: []}, { id:'1795', label:"Options",url_href:'/editorial/wide/editorial-2316-EN.html', children: []}, { id:'1790', label:"Futures",url_href:'/editorial/wide/editorial-2321-EN.html', children: []}, { id:'1797', label:"Euronext indices",url_href:'/editorial/wide/editorial-2329-EN.html', children: []}, { id:'1791', label:"National indices",url_href:'/editorial/wide/editorial-2331-EN.html', children: []}, { id:'1796', label:"Bonds",url_href:'/editorial/wide/editorial-2337-EN.html', children: []}, { id:'1792', label:"Dutch investment funds",url_href:'/editorial/wide/editorial-2340-EN.html', children: []} ]}, { id:'1654', label:"Investment clubs",url_href:'',children : [ { id:'2150', label:"Amsterdam",url_href:'/editorial/wide/editorial-2150-EN.html', children: []}, { id:'2152', label:"Brussels",url_href:'/editorial/wide/editorial-2152-EN.html', children: []}, { id:'2151', label:"Paris",url_href:'/editorial/wide/editorial-2151-EN.html', children: []} ]}, { id:'2147', label:"Questions",url_href:'/editorial/wide/faq-2147-EN.html',children : [ ]}, { id:'2149', label:"Glossary",url_href:'/common/glossary/glossary-2149-EN.html',children : [ ]}, { id:'13167', label:"Events",url_href:'',children : [ { id:'13168', label:"Coming events",url_href:'/news/generaleventscurrent/comingEvents-13168-EN.html', children: []}, { id:'13169', label:"Past events",url_href:'/news/generaleventscurrent/comingEvents-13169-EN.html', children: []} ]} ]}, { id:'1657', label:"Publications",url_href:'',children: [ { id:'1766', label:"General documentation",url_href:'/tools/documentation/wide/documents-1766-EN.html',children : [ ]}, { id:'1765', label:"Newsletters",url_href:'/news/newsletters/wide/newsletters-1765-EN.html',children : [ ]}, { id:'1767', label:"Recommended books",url_href:'/editorial/wide/editorial-1767-EN.html',children : [ ]} ]} ]} ], // méthodes de construction du menu en HTML referenceChannel : undefined, anchorElement : undefined, focusedElement : undefined, channelIDSelected : undefined, hasVisibleNodeChildren : false, buildMenu : function(elt, visibleNode) { menuData.anchorElement = elt; menuData.channelIDSelected = visibleNode ; menuData.buildSubMenu(elt, menuData.menuObject, 1); menuData.anchorElement.select("li.extensible").each(function(item) { item.addClassName("collapsed"); item.addClassName("collapsed-level"+item.level); }); var referenceChannel=$(visibleNode); menuData.focusedElement = $(visibleNode) ; 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(); } }