var menuData = { // construction du menu en notation JSON menuObject : [ { id:'1617', label:"Regulation",url_href:'',children: [ { id:'12602', label:"Overview",url_href:'/landing/regulation-12602-EN.html',children: [ ]}, { id:'1640', label:"Euronext regulation",url_href:'',children: [ { id:'2397', label:"Harmonised",url_href:'/tools/documentation/wide/documents-2397-EN.html',children : [ ]}, { id:'2396', label:"Non harmonised",url_href:'/tools/documentation/wide/documents-2396-EN.html',children : [ ]} ]}, { id:'1639', label:"Liffe regulation",url_href:'',children: [ { id:'2399', label:"Harmonised",url_href:'/tools/documentation/wide/documents-2399-EN.html',children : [ ]}, { id:'2398', label:"Non harmonised",url_href:'/tools/documentation/wide/documents-2398-EN.html',children : [ ]}, { id:'4507', label:"London Handbook",url_href:'',children : [ { id:'4457', label:"Introduction",url_href:'/editorial/wide/editorial-4457-EN.html', children: []}, { id:'4456', label:"Contract specifications",url_href:'/handbook/section/section-4460-EN.html', children: []}, { id:'4459', label:"Rules",url_href:'/handbook/section/section-4468-EN.html', children: []}, { id:'4458', label:"Trading Procedures",url_href:'/handbook/section/section-4469-EN.html', children: []} ]} ]}, { id:'1642', label:"Notices",url_href:'',children: [ { id:'4124', label:"Notices",url_href:'/news/notices/notices-4124-EN.html',children : [ ]}, { id:'3263', label:"Advanced search notices",url_href:'/search/advanced/notices/notices-3263-EN.html',children : [ ]}, { id:'4125', label:"Announcements",url_href:'/news/trading_announcements/announcements-4125-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("