function bind(a,c,b){return function(){a(c,b)}}function opacity(b,a){b.style.opacity=a/100;b.style.MozOpacity=a/100;b.style.KhtmlOpacity=a/100;b.style.filter="alpha(opacity="+a+")"}function fadeIn(b){for(var a=0;a<=10;a++){setTimeout(bind(opacity,b,a*10),a*100)}}function fadeOut(b){for(var a=0;a<=10;a++){setTimeout(bind(opacity,b,(10-a)*10),a*100)}}function firstElement(c){var d=c.childNodes;for(var b=0,a=d.length;b<a;b++){if(d[b].nodeType==1){return d[b]}}return false}function nextElement(a){while(a=a.nextSibling){if(a.nodeType==1){return a}}return false}banners=document.getElementById("banner").getElementsByTagName("div");leftBanners=[];for(var i=0,len=banners.length;i<len;i++){if(banners[i].className=="bannerleft"){leftBanners.push(banners[i])}}current=leftBanners.length-1;function loop(){if(current>0){fadeOut(leftBanners[current],1000);current--}else{if(current==0){fadeIn(leftBanners[leftBanners.length-1],1000);setTimeout(function(){for(var a=1;a<leftBanners.length-1;a++){opacity(leftBanners[a],100)}current=leftBanners.length-1},1010)}else{return}}setTimeout(loop,8000)}if(leftBanners.length>1){setTimeout(loop,8000)}links=document.getElementsByTagName("a");for(var i=0,len=links.length;i<len;i++){if(links[i].className=="external"){links[i].setAttribute("target","_blank")}}try{document.getElementsByName("planete")[0].onchange=function(){this.form.submit()}}catch(e){}messagerie=document.getElementById("messagerie");if(messagerie){messages=messagerie.getElementsByTagName("dl");for(var i=0,len=messages.length;i<len;i++){var hideButton=document.createElement("button");hideButton.setAttribute("type","button");hideButton.setAttribute("title","cacher le message");hideButton.onclick=function(){if(nextElement(this.parentNode).style.display=="none"){nextElement(this.parentNode).style.display="";this.style.backgroundPosition="0 100%";this.setAttribute("title","cacher le message")}else{nextElement(this.parentNode).style.display="none";this.style.backgroundPosition="0 0";this.setAttribute("title","afficher le message")}this.blur()};firstElement(messages[i]).insertBefore(hideButton,firstElement(firstElement(messages[i])))}function checkboxes(){for(var b=0,a=messages.length;b<a;b++){messages[b].getElementsByTagName("input")[0].checked=true}}function uncheckboxes(){for(var b=0,a=messages.length;b<a;b++){messages[b].getElementsByTagName("input")[0].checked=false}}if(messages.length>0){var options=document.createElement("fieldset");options.innerHTML='<button type="button" onclick="checkboxes()">Tout sélectionner</button> <button type="button" onclick="uncheckboxes()">Tout déselectionner</button>'}messagerie.firstChild.insertBefore(options,nextElement(messages[messages.length-1]));for(var i=0,len=messages.length;i<len;i++){if(messages[i].className=="new"){continue}messages[i].getElementsByTagName("dd")[0].style.display="none";messages[i].getElementsByTagName("button")[0].style.backgroundPosition="0 0";messages[i].getElementsByTagName("button")[0].setAttribute("title","afficher le message")}}function numToText(a){a=String(a);if(a.length<2){a="0"+a}return a}function count(a){if(a.timer[0]==0){if(a.timer[1]==0){if(a.timer[2]==0){return window.location.reload()}a.timer[2]--;a.timer[1]=59;a.timer[0]=59}else{a.timer[1]--;a.timer[0]=59}}else{a.timer[0]--}if(a.timer[2]==0&&a.timer[1]==0){a.innerHTML=numToText(a.timer[0])}else{if(a.timer[2]==0){a.innerHTML=numToText(a.timer[1])+":"+numToText(a.timer[0])}else{a.innerHTML=numToText(a.timer[2])+":"+numToText(a.timer[1])+":"+numToText(a.timer[0])}}setTimeout(function(){count(a)},1000)}spans=document.getElementsByTagName("span");for(var i=0,len=spans.length;i<len;i++){if(spans[i].className=="countdown"){if(!spans[i].innerHTML.match(/^\d{1,2}(:\d{1,2}){0,2}$/)){continue}match=spans[i].innerHTML.split(":");if(match.length==3){spans[i].timer=[Number(match[2]),Number(match[1]),Number(match[0])]}else{if(match.length==2){spans[i].timer=[Number(match[1]),Number(match[0]),0]}else{if(match.length==1){spans[i].timer=[Number(match[0]),0,0]}else{continue}}}count(spans[i])}};