var menuData = { // construction du menu en notation JSON menuObject : [ { id:'12503', label:"NYSE Liffe",url_href:'',children: [ { id:'12601', label:"Overzicht",url_href:'/landing/liffeLanding-12601-NL.html',children: [ ]}, { id:'12810', label:"Marktinformatie",url_href:'',children: [ { id:'1643', label:"Corporate actions",url_href:'',children : [ { id:'3960', label:"Mededelingen",url_href:'/news/corporateactions/wide_orclausemapping/corporateActions-3960-NL.html', children: []}, { id:'39419', label:"Laatste",url_href:'/editorial/wide/editorial-39419-NL.html', children: []}, { id:'39418', label:"Corp. Actions deze week",url_href:'/news/corporateactions/wide_orclausemapping/corporateActions-39418-NL.html', children: []}, { id:'101818', label:"Unusual Contracts",url_href:'/editorial/wide/editorial-101818-NL.html', children: []}, { id:'242371', label:"CAS",url_href:'/editorial/wide/editorial-242371-NL.html', children: []}, { id:'39568', label:"Beleid",url_href:'/editorial/wide/editorial-39568-NL.html', children: []} ]}, { id:'12808', label:"Nieuws & notices",url_href:'',children : [ { id:'19575', label:"Mededelingen",url_href:'/news/notices/notices-19575-NL.html', children: []}, { id:'22020', label:"Info Flashes",url_href:'/editorial/wide/editorial-22021-NL.html', children: []}, { id:'4765', label:"Nieuwe series",url_href:'/news/othernews/otherNews-4765-NL.html', children: []} ]}, { id:'1627', label:"LIFFE CONNECT®",url_href:'',children : [ { id:'3752', label:"Introductie",url_href:'/editorial/wide/editorial-3767-NL.html', children: []}, { id:'3746', label:"Producten",url_href:'/editorial/wide/editorial-3997-NL.html', children: []}, { id:'3747', label:"Toegang tot de markt",url_href:'/editorial/wide/editorial-3770-NL.html', children: []}, { id:'3776', label:"Verloop van de handel",url_href:'/editorial/wide/editorial-3776-NL.html', children: []}, { id:'3751', label:"Klantinformatie",url_href:'/editorial/wide/editorial-3773-NL.html', children: []}, { id:'3748', label:"Software ontwikkelaars",url_href:'/editorial/wide/editorial-4004-NL.html', children: []}, { id:'3750', label:"Training",url_href:'/editorial/wide/editorial-3775-NL.html', children: []} ]}, { id:'2246', label:"Reglementen",url_href:'',children : [ { id:'3388', label:"Harmonised",url_href:'/tools/documentation/wide/documents-3388-NL.html', children: []}, { id:'3389', label:"Non harmonised",url_href:'/tools/documentation/wide/documents-3389-NL.html', children: []}, { id:'21463', label:"London Handbook",url_href:'/editorial/wide/editorial-21464-NL.html', children: []} ]}, { id:'7320', label:"Statistieken",url_href:'',children : [ { id:'8522', label:"Periode/onderwerp",url_href:'/editorial/wide/editorial-7339-NL.html', children: []}, { id:'8523', label:"Per locatie",url_href:'/editorial/wide/editorial-8548-NL.html', children: []}, { id:'11956', label:"Beëindigde rapportages",url_href:'/editorial/wide/editorial-11956-NL.html', children: []} ]}, { id:'11855', label:"Liffe handelskalender",url_href:'/editorial/wide/editorial-11855-NL.html',children : [ ]}, { id:'18923', label:"Officiële feestdagen",url_href:'',children : [ { id:'1688', label:"Handelstijden",url_href:'/editorial/documentation/wide/documents-1688-NL.html', children: []}, { id:'30518', label:"Officiële feestdagen",url_href:'/editorial/documentation/wide/documents-30518-NL.html', children: []} ]} ]}, { id:'12901', label:"Producten",url_href:'',children: [ { id:'46177', label:"Derivatenkoersen",url_href:'/landing/landingDerivativesPrices-46177-NL.html',children : [ ]}, { id:'1709', label:"Obligatiederivaten",url_href:'',children : [ { id:'2037', label:"Overzicht",url_href:'/landing/landingInfo-2037-NL.html', children: []}, { id:'2034', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-2034-NL.html', children: []}, { id:'46170', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-46170-NL.html', children: []}, { id:'2036', label:"Nieuws & notices",url_href:'/news/notices/notices-3075-NL.html', children: []}, { id:'2038', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3107-NL.html', children: []}, { id:'2042', label:"Wholesale trading",url_href:'/editorial/wide/editorial-3534-NL.html', children: []}, { id:'2039', label:"Publicaties",url_href:'/tools/documentation/wide/documents-2039-NL.html', children: []}, { id:'164770', label:"Liquiditeitsprogramma",url_href:'/editorial/wide/editorial-164771-NL.html', children: []}, { id:'2040', label:"Levering",url_href:'/editorial/wide/editorial-4130-NL.html', children: []}, { id:'2041', label:"Handelskalender",url_href:'/editorial/wide/editorial-3538-NL.html', children: []} ]}, { id:'1710', label:"Commodities",url_href:'',children : [ { id:'3127', label:"Overzicht",url_href:'/landing/landingInfo-3127-NL.html', children: []}, { id:'46171', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-46171-NL.html', children: []}, { id:'3121', label:"Nieuws & notices",url_href:'/news/notices/notices-2888-NL.html', children: []}, { id:'3124', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3064-NL.html', children: []}, { id:'3123', label:"Handelskalender",url_href:'/editorial/wide/editorial-3068-NL.html', children: []}, { id:'3130', label:"Levering",url_href:'/editorial/wide/editorial-4127-NL.html', children: []}, { id:'3118', label:"Wholesale trading",url_href:'/editorial/wide/editorial-4256-NL.html', children: []}, { id:'3119', label:"Adviesgroepen",url_href:'/editorial/wide/editorial-3057-NL.html', children: []}, { id:'3116', label:"Publicaties",url_href:'/tools/documentation/wide/documents-3116-NL.html', children: []}, { id:'3125', label:"Achtergrondinformatie",url_href:'/editorial/wide/editorial-3049-NL.html', children: []}, { id:'3120', label:"Handelsorganisaties",url_href:'/editorial/wide/editorial-3053-NL.html', children: []}, { id:'3131', label:"Commodity rapporten",url_href:'/editorial/wide/editorial-3131-NL.html', children: []}, { id:'3132', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-3132-NL.html', children: []}, { id:'23868', label:"Incentives Schemes",url_href:'/editorial/wide/editorial-23869-NL.html', children: []}, { id:'85968', label:"Fees and Charges",url_href:'/editorial/wide/editorial-4123-NL.html', children: []}, { id:'176120', label:"Market updates",url_href:'/editorial/wide/editorial-176120-NL.html', children: []} ]}, { id:'1711', label:"Valuta",url_href:'',children : [ { id:'2123', label:"Overzicht",url_href:'/landing/landingInfo-2123-NL.html', children: []}, { id:'46172', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-46172-NL.html', children: []}, { id:'2124', label:"Marktoverzicht",url_href:'/trader/marketwatch/marketwatch-3217-NL.html', children: []}, { id:'2121', label:"Nieuws & notices",url_href:'/news/notices/notices-2893-NL.html', children: []}, { id:'2122', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3586-NL.html', children: []}, { id:'2120', label:"Handelskalender",url_href:'/editorial/wide/editorial-3591-NL.html', children: []}, { id:'2117', label:"Wholesale trading",url_href:'/editorial/wide/editorial-4258-NL.html', children: []}, { id:'2116', label:"Publicaties",url_href:'/tools/documentation/wide/documents-2116-NL.html', children: []}, { id:'2118', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-2118-NL.html', children: []} ]}, { id:'1694', label:"ETF opties",url_href:'',children : [ { id:'1857', label:"Overzicht",url_href:'/landing/landingInfo-1857-NL.html', children: []}, { id:'46173', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-46173-NL.html', children: []}, { id:'1861', label:"Nieuws & notices",url_href:'/news/notices/notices-2700-NL.html', children: []}, { id:'1856', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3095-NL.html', children: []}, { id:'1851', label:"Liquiditeitsprogramma",url_href:'/editorial/wide/editorial-4800-NL.html', children: []}, { id:'1858', label:"Publicaties",url_href:'/tools/documentation/wide/documents-1858-NL.html', children: []} ]}, { id:'1705', label:"STIRs",url_href:'',children : [ { id:'2099', label:"Overzicht",url_href:'/landing/landingInfo-2099-NL.html', children: []}, { id:'46174', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-46174-NL.html', children: []}, { id:'2093', label:"Nieuws & notices",url_href:'/news/notices/notices-3544-NL.html', children: []}, { id:'2097', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3554-NL.html', children: []}, { id:'2095', label:"Handelskalender",url_href:'/editorial/wide/editorial-3561-NL.html', children: []}, { id:'2098', label:"Wholesale trading",url_href:'/editorial/wide/editorial-3549-NL.html', children: []}, { id:'2087', label:"Publicaties",url_href:'/tools/documentation/wide/documents-2087-NL.html', children: []}, { id:'2102', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-2102-NL.html', children: []}, { id:'2101', label:"Packs & Bundles",url_href:'/editorial/wide/editorial-4511-NL.html', children: []}, { id:'2096', label:"Liquiditeitsprogramma",url_href:'/editorial/wide/editorial-2835-NL.html', children: []}, { id:'2090', label:"EURIBOR®",url_href:'/editorial/wide/editorial-4388-NL.html', children: []}, { id:'2092', label:"Eonia",url_href:'/editorial/wide/editorial-4398-NL.html', children: []}, { id:'11155', label:"STIR Options",url_href:'/editorial/wide/editorial-11162-NL.html', children: []} ]}, { id:'1699', label:"Aandelen indices",url_href:'',children : [ { id:'1896', label:"Overzicht",url_href:'/landing/landingInfo-1896-NL.html', children: []}, { id:'46175', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-46175-NL.html', children: []}, { id:'1892', label:"Marktoverzicht",url_href:'/trader/marketwatch/marketwatch-3177-NL.html', children: []}, { id:'1897', label:"Nieuws & notices",url_href:'/news/notices_orclausemapping/notices-2851-NL.html', children: []}, { id:'1901', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3503-NL.html', children: []}, { id:'1889', label:"Liquiditeitsprogramma",url_href:'/editorial/wide/editorial-4774-NL.html', children: []}, { id:'1895', label:"Handelskalender",url_href:'/editorial/wide/editorial-3528-NL.html', children: []}, { id:'1894', label:"Wholesale trading",url_href:'/editorial/wide/editorial-3522-NL.html', children: []}, { id:'1893', label:"Publicaties",url_href:'/tools/documentation/wide/documents-1893-NL.html', children: []}, { id:'1898', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-1898-NL.html', children: []}, { id:'1891', label:"Bclear Cscreen",url_href:'/alternext/landing/landing-1891-NL.html', children: []}, { id:'1888', label:"Week/Dag Opties",url_href:'/editorial/wide/editorial-1888-NL.html', children: []}, { id:'11355', label:"FTSE EPRA / NAREIT ",url_href:'/editorial/wide/editorial-11356-NL.html', children: []}, { id:'165670', label:"Dividend Index Futures",url_href:'/editorial/wide/editorial-165670-NL.html', children: []}, { id:'208870', label:"TOPIX Index Futures",url_href:'/editorial/wide/editorial-208870-NL.html', children: []} ]}, { id:'1693', label:"Aandelen futures",url_href:'',children : [ { id:'2731', label:"Overzicht",url_href:'/landing/landingInfo-2731-NL.html', children: []}, { id:'2721', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-2721-NL.html', children: []}, { id:'2722', label:"Marktoverzicht",url_href:'/trader/marketwatch/marketwatch-3169-NL.html', children: []}, { id:'2724', label:"Nieuws & notices",url_href:'/news/notices/notices-2739-NL.html', children: []}, { id:'2729', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3111-NL.html', children: []}, { id:'2720', label:"Liquiditeitsprogramma",url_href:'/editorial/wide/editorial-4806-NL.html', children: []}, { id:'2727', label:"Handelskalender",url_href:'/editorial/wide/editorial-3519-NL.html', children: []}, { id:'2723', label:"Wholesale trading",url_href:'/editorial/wide/editorial-3514-NL.html', children: []}, { id:'2726', label:"Publicaties",url_href:'/tools/documentation/wide/documents-2726-NL.html', children: []}, { id:'2725', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-2725-NL.html', children: []}, { id:'2719', label:"Bclear Cscreen",url_href:'/landing/landingGeneral-4562-NL.html', children: []} ]}, { id:'1692', label:"Aandelenopties",url_href:'',children : [ { id:'1834', label:"Overzicht",url_href:'/landing/landingInfo-1834-NL.html', children: []}, { id:'1830', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-1830-NL.html', children: []}, { id:'1833', label:"Marktoverzicht",url_href:'/trader/marketwatch/marketwatch-3161-NL.html', children: []}, { id:'1839', label:"Nieuws & notices",url_href:'/news/notices_orclausemapping/notices-2712-NL.html', children: []}, { id:'1835', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3084-NL.html', children: []}, { id:'1832', label:"Liquiditeitsprogramma",url_href:'/editorial/wide/editorial-3089-NL.html', children: []}, { id:'1837', label:"Handelskalender",url_href:'/editorial/wide/editorial-3511-NL.html', children: []}, { id:'1836', label:"Wholesale trading",url_href:'/editorial/wide/editorial-3077-NL.html', children: []}, { id:'1838', label:"Publicaties",url_href:'/tools/documentation/wide/documents-1838-NL.html', children: []}, { id:'1840', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-1840-NL.html', children: []}, { id:'1829', label:"Bclear Cscreen",url_href:'/landing/landingGeneral-4562-NL.html', children: []}, { id:'217020', label:"Week/Dag Opties",url_href:'/editorial/wide/editorial-217020-NL.html', children: []}, { id:'38619', label:"PBTS",url_href:'/editorial/wide/editorial-38619-NL.html', children: []}, { id:'237720', label:"Belgian Options",url_href:'/editorial/wide/editorial-237720-NL.html', children: []} ]}, { id:'1708', label:"Swapnote®",url_href:'',children : [ { id:'2114', label:"Overzicht",url_href:'/landing/landingInfo-2114-NL.html', children: []}, { id:'46176', label:"Koersen",url_href:'/trader/priceslistsderivatives/derivativespriceslists-46176-NL.html', children: []}, { id:'2115', label:"Nieuws & notices",url_href:'/news/notices/notices-3567-NL.html', children: []}, { id:'2111', label:"Productinformatie",url_href:'/trader/contractspecifications/wide/contractSpecifications-3582-NL.html', children: []}, { id:'2110', label:"Handelskalender",url_href:'/editorial/wide/editorial-3583-NL.html', children: []}, { id:'2112', label:"Wholesale trading",url_href:'/editorial/wide/editorial-3572-NL.html', children: []}, { id:'2106', label:"Pricing/EDSPs",url_href:'/editorial/wide/editorial-4303-NL.html', children: []}, { id:'2103', label:"Publicaties",url_href:'/tools/documentation/wide/documents-2103-NL.html', children: []}, { id:'2104', label:"End of day/EDSP",url_href:'/editorial/wide/editorial-2104-NL.html', children: []}, { id:'2108', label:"€Swapnote®",url_href:'/editorial/wide/editorial-4404-NL.html', children: []} ]} ]}, { id:'4561', label:"OTC diensten",url_href:'',children: [ { id:'4562', label:"Overzicht",url_href:'/landing/landingGeneral-4562-NL.html',children : [ ]}, { id:'4563', label:"Bclear - Equities",url_href:'',children : [ { id:'4573', label:"Overzicht",url_href:'/editorial/wide/editorial-4573-NL.html', children: []}, { id:'4578', label:"Go live preparation",url_href:'/editorial/wide/editorial-4578-NL.html', children: []}, { id:'4577', label:"Contracts & trading",url_href:'/editorial/wide/editorial-4577-NL.html', children: []}, { id:'4575', label:"Publicaties",url_href:'/editorial/wide/editorial-4575-NL.html', children: []}, { id:'4580', label:"Reported trades",url_href:'/editorial/wide/editorial-4658-NL.html', children: []}, { id:'34318', label:"US approved contracts",url_href:'/editorial/wide/editorial-34318-NL.html', children: []} ]}, { id:'54521', label:"Bclear - Commodities",url_href:'',children : [ { id:'54522', label:"Overzicht",url_href:'/editorial/wide/editorial-54522-NL.html', children: []}, { id:'54523', label:"Publicaties",url_href:'/editorial/wide/editorial-54523-NL.html', children: []}, { id:'54524', label:"Go live preparation",url_href:'/editorial/wide/editorial-54524-NL.html', children: []} ]}, { id:'4564', label:"Cscreen",url_href:'',children : [ { id:'4570', label:"Introductie",url_href:'/editorial/wide/editorial-4570-NL.html', children: []}, { id:'4571', label:"Publicaties",url_href:'/editorial/wide/editorial-4571-NL.html', children: []} ]}, { id:'4568', label:"Contact us",url_href:'/editorial/wide/editorial-4568-NL.html',children : [ ]}, { id:'98118', label:"OTC status",url_href:'http://marketstatus.production.euronext.com/otc.htm',children : [ ]} ]}, { id:'18871', label:"Educatie",url_href:'',children: [ { id:'4741', label:"Overzicht",url_href:'/editorial/wide/editorial-4741-NL.html',children : [ ]}, { id:'4174', label:"Spreker",url_href:'/editorial/wide/editorial-4174-NL.html',children : [ ]}, { id:'1828', label:"Workshops aandelenproducten",url_href:'',children : [ { id:'19213', label:"Equity courses",url_href:'/editorial/wide/editorial-19213-NL.html', children: []}, { id:'4781', label:"Registreren",url_href:'/editorial/wide/editorial-4781-NL.html', children: []}, { id:'4782', label:"Meer informatie",url_href:'/editorial/wide/editorial-4782-NL.html', children: []} ]}, { id:'3133', label:"Commodity workshops",url_href:'',children : [ { id:'4175', label:"Commodity workshops",url_href:'/editorial/wide/editorial-4177-NL.html', children: []}, { id:'4176', label:"Inschrijving",url_href:'/editorial/wide/editorial-4176-NL.html', children: []}, { id:'4173', label:"Verdere informatie",url_href:'/editorial/wide/editorial-4173-NL.html', children: []} ]}, { id:'4814', label:"Cursus renteproducten",url_href:'',children : [ { id:'4841', label:"Fixed Income courses",url_href:'/editorial/wide/editorial-4859-NL.html', children: []}, { id:'4843', label:"Registreren",url_href:'/editorial/wide/editorial-4843-NL.html', children: []}, { id:'4842', label:"Meer informatie",url_href:'/editorial/wide/editorial-4842-NL.html', children: []} ]}, { id:'4783', label:"Onze locatie",url_href:'/editorial/wide/editorial-4783-NL.html',children : [ ]} ]}, { id:'12809', label:"Klantenservice",url_href:'',children: [ { id:'4134', label:"Market services",url_href:'',children : [ { id:'4141', label:"Contact",url_href:'/editorial/wide/editorial-4141-NL.html', children: []}, { id:'4144', label:"Market status",url_href:'http://marketstatus.euronext.com/derivative.htm', children: []} ]}, { id:'4135', label:"Client relationship",url_href:'/editorial/wide/editorial-4135-NL.html',children : [ ]}, { id:'4136', label:"TRS & Clearing status",url_href:'/editorial/wide/editorial-4136-NL.html',children : [ ]}, { id:'21776', label:"Infrastructuur extranet",url_href:'/editorial/wide/editorial-21776-NL.html',children : [ ]} ]}, { id:'1621', label:"Membership",url_href:'',children: [ { id:'4122', label:"Overzicht",url_href:'/landing/landingGeneral-4122-NL.html',children : [ ]}, { id:'4113', label:"Lid worden",url_href:'/editorial/wide/editorial-4113-NL.html',children : [ ]}, { id:'4116', label:"Membership Forms",url_href:'/editorial/wide/editorial-4116-NL.html',children : [ ]}, { id:'4114', label:"Toegang dochteronderneming",url_href:'/editorial/wide/editorial-4114-NL.html',children : [ ]}, { id:'4112', label:"Trader Registration",url_href:'/editorial/wide/editorial-4112-NL.html',children : [ ]}, { id:'1663', label:"Membership Directory",url_href:'/forourclient/mbs/market/list-1663-NL.html',children : [ ]}, { id:'4123', label:"Fees and Charges",url_href:'/editorial/wide/editorial-4123-NL.html',children : [ ]} ]}, { id:'84918', label:"NYSE Liffe Clearing",url_href:'',children: [ { id:'54322', label:"Introductie",url_href:'/landing/liffeLanding-54322-NL.html',children : [ ]}, { id:'84920', label:"Clearing - TRS/CPS",url_href:'/editorial/wide/editorial-84920-NL.html',children : [ ]}, { id:'84919', label:"TRS & Clearing status",url_href:'http://marketstatus.production.euronext.com/clearing.htm',children : [ ]}, { id:'91368', label:"Span Information",url_href:'/editorial/wide/editorial-91368-NL.html',children : [ ]}, { id:'194920', label:"Future Initiatives",url_href:'/editorial/wide/editorial-194920-NL.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(); } }