function lookingForMiniDiaporama(){var wPlaceHolder=0;var hPlaceHolder=0;$$('.minidiaporama').each(function(s){s.firstDescendant().id="ulMiniDiaporama";s.firstDescendant().className="crossfade transition-fadeoutfadein";s.firstDescendant().childElements().each(function(n,index){n.id="cf"+index+1;var newImg=document.createElement('img');newImg.src=n.firstDescendant().href;n.appendChild(newImg);n.removeChild(n.firstDescendant());});var cf=new Crossfade('ulMiniDiaporama',{interval:5,duration:2});});}
customMenuPrincipal=function(){if($('menu_menuprincipal')){$$('#menu_menuprincipal li').each(function(s,index){if(s.id.split('_')[2]=='23'){s.className='gobackhome';s.setAttribute('title','Page d\'accueil');}});var nodeDeMerde=$('menu_menuprincipal').lastChild.childNodes;for(i=0;i<nodeDeMerde.length;i++){if(nodeDeMerde[i].lastChild.nodeName=='UL')nodeDeMerde[i].lastChild.style.marginLeft=-(i-1)*97+"px";}}}
sfHover=function(menu){if(document.getElementById(menu)){var sfEls=document.getElementById(menu).lastChild.getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+=" sfhover";}
sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}}
function addLoadListenerPage(func){if(window.addEventListener){window.addEventListener("load",func,false);}else if(document.addEventListener){document.addEventListener("load",func,false);}else if(window.attachEvent){window.attachEvent("onload",func);}}
if(document.getElementById&&document.createTextNode){addLoadListenerPage(function(){if(window.attachEvent)sfHover("menu_menuprincipal");if(window.attachEvent)sfHover("menu_langue");customMenuPrincipal();lookingForMiniDiaporama();});}