if(!OB){var OB={}}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.strip=function(){return this.replace(/(<([^>]+)>)/ig,"").replace(">","").replace("<","")};String.prototype.space=function(){return this.replace(/_/g," ")};OB.Utils={truncate:function(a,c,b,d){if(!a){return""}if(!c){c=80}if(!b){b="…"}if(!d){d=false}if(a.length==0){return""}if(a.length>c){c=c-b.length;if(d){a.substring(0,c+1);a.replace("/s+?(S+)?$/","")}return a.substring(0,c)+b}else{return a}},showEl:function(b,a){b=getElmt(b);if(b){if(!a){b.style.display="block"}else{switch(a){case"height":b.style.height="auto";b.style.overflow="visible";break}}}},hideEl:function(b,a){b=getElmt(b);if(b){if(!a){b.style.display="none"}else{switch(a){case"height":b.style.height=0;b.style.overflow="hidden";break}}}},destroyEl:function(a){var c=getElmt(a);if(c.parentNode){c.parentNode.removeChild(c)}else{if(a[0]){for(var b=0;a[b];b++){destroyEl(a[b])}}}},toggleEl:function(a,b){a=getElmt(a);if(!b){b="block"}if(a.style.display==b||a.style.display==""){a.style.display="none"}else{a.style.display=b}return true},trim:function(a){return a.trim()},getBrowser:function(){if(navigator.appName.indexOf("Internet Explorer")!=-1){if(navigator.appVersion.indexOf("MSIE 7")!=-1){return"ie7"}return"ie"}if(navigator.appName.indexOf("Opera")!=-1){return"op"}if(navigator.appVersion.indexOf("Safari")!=-1){return"sf"}if(navigator.appName.indexOf("Konqueror")!=-1){return"kq"}if(navigator.appCodeName.indexOf("Mozilla")!=-1){return"mz"}},confirmOnQuit:function(a){if(a){window.onbeforeunload=function(){return a};document.body.onbeforeunload=function(){return a};return true}else{window.onbeforeunload=new Function();document.body.onbeforeunload=new Function();return true}},ajaxFail:function(b){if(b.status===401){if(locales&&locales.error&&locales.error.title&&locales.error.title[b.status]){if(OB.Diablog){var a=new OB.Diablog({noButton:true});a.setTitle(locales.error.title[b.status]);a.setContent(locales.error.text[b.status]);a.addButton("ok",{className:"orange",click:function(){window.location.reload()}})}else{alert(locales.error.text[b.status]);window.location.reload()}}else{window.location.reload()}}else{window.location.reload()}},placeholders:function(){YAHOO.util.Dom.batch(YAHOO.util.Dom.getElementsBy(function(a){return a.getAttribute("placeholder")}),function(a){if(a.value===""){YAHOO.util.Dom.setStyle(a,"color","gray");YAHOO.util.Dom.setStyle(a,"font-style","italic");a.value=a.getAttribute("placeholder")}YAHOO.util.Event.on(a,"focus",function(b){if(this.value===this.getAttribute("placeholder")){try{YAHOO.util.Dom.setStyle(this,"color",null);YAHOO.util.Dom.setStyle(this,"font-style",null)}catch(b){}this.value=""}});if(!YAHOO.env.ua.ie){YAHOO.util.Event.on(a,"blur",function(b){if(this.value===""){try{YAHOO.util.Dom.setStyle(this,"color","gray");YAHOO.util.Dom.setStyle(this,"font-style","italic")}catch(b){}this.value=this.getAttribute("placeholder")}})}})},Base64:{_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(c){var a="";var l,h,f,k,g,e,d;var b=0;c=OB.Utils.Base64._utf8_encode(c);while(b<c.length){l=c.charCodeAt(b++);h=c.charCodeAt(b++);f=c.charCodeAt(b++);k=l>>2;g=((l&3)<<4)|(h>>4);e=((h&15)<<2)|(f>>6);d=f&63;if(isNaN(h)){e=d=64}else{if(isNaN(f)){d=64}}a=a+this._keyStr.charAt(k)+this._keyStr.charAt(g)+this._keyStr.charAt(e)+this._keyStr.charAt(d)}return a},decode:function(c){var a="";var l,h,f;var k,g,e,d;var b=0;c=c.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(b<c.length){k=this._keyStr.indexOf(c.charAt(b++));g=this._keyStr.indexOf(c.charAt(b++));e=this._keyStr.indexOf(c.charAt(b++));d=this._keyStr.indexOf(c.charAt(b++));l=(k<<2)|(g>>4);h=((g&15)<<4)|(e>>2);f=((e&3)<<6)|d;a=a+String.fromCharCode(l);if(e!=64){a=a+String.fromCharCode(h)}if(d!=64){a=a+String.fromCharCode(f)}}a=OB.Utils.Base64._utf8_decode(a);return a},_utf8_encode:function(b){b=b.replace(/\r\n/g,"\n");var a="";for(var e=0;e<b.length;e++){var d=b.charCodeAt(e);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a},_utf8_decode:function(a){var b="";var d=0;var e=c1=c2=0;while(d<a.length){e=a.charCodeAt(d);if(e<128){b+=String.fromCharCode(e);d++}else{if((e>191)&&(e<224)){c2=a.charCodeAt(d+1);b+=String.fromCharCode(((e&31)<<6)|(c2&63));d+=2}else{c2=a.charCodeAt(d+1);c3=a.charCodeAt(d+2);b+=String.fromCharCode(((e&15)<<12)|((c2&63)<<6)|(c3&63));d+=3}}}return b}},decodeLinks:function(){YAHOO.util.Dom.batch(YAHOO.util.Selector.query("span.oblink"),function(g){var c=document.createElement("a");c.className=g.className;c.onclick=g.onclick;if(g.getAttribute("title").match(/&_base64/)){c.href=g.getAttribute("title")}else{var f=/^([^#]*?)(#.*)?$/;var b=g.getAttribute("title").match(f);var e=b[1];var d=b[2];c.href=OB.Utils.Base64.decode(e);if(YAHOO.lang.isString(d)){c.href+=d}}c.title="";c.innerHTML=g.innerHTML;g.parentNode.insertBefore(c,g);g.parentNode.removeChild(g)})},preventRightClick:function(){YAHOO.util.Event.on(document,"contextmenu",function(a){YAHOO.util.Event.preventDefault(a)})},popupExtLinks:function(){var a=document.getElementsByTagName("body")[0];if(YAHOO.util.Dom.hasClass(a,"__portal")||YAHOO.util.Dom.hasClass(a,"__admin")){YAHOO.util.Dom.batch(document.getElementsByTagName("a"),function(c){var b=window.location.host.split(".");var d=b[b.length-2]+"."+b[b.length-1];if(c.href.match("^http")&&!c.href.match(window.location.host+"|www."+d+"|admin."+d+"|forum."+d+"|forums."+d+"|ann."+d+"|idata."+d+"|ddata."+d+"|fdata."+d)&&!YAHOO.util.Dom.getAncestorByClassName(c,"dontpopup")){YAHOO.util.Event.on(c,"click",function(f){if(!this.onclick){YAHOO.util.Event.preventDefault(f);window.open(this)}})}})}},makeSectionMenus:function(){YAHOO.util.Dom.batch(YAHOO.util.Selector.query("#header .nav ul li .menu"),function(a){a.open=function(b){if(this._anim){this._anim.stop()}this._anim=new YAHOO.util.Anim(this,{height:{to:(YAHOO.util.Region.getRegion(this.getElementsByTagName("div")[0]).height+20)}},b?2:0.3,YAHOO.util.Easing.easeOutStrong);this._anim.animate()};a.close=function(b){if(YAHOO.env.ua.ie){window.__OB_SECTION_MENU=this}this._wait=setTimeout(function(c){if(YAHOO.env.ua.ie){c=window.__OB_SECTION_MENU}if(c._anim){c._anim.stop()}c._anim=new YAHOO.util.Anim(c,{height:{to:0}},b?2:0.2,YAHOO.util.Easing.easeOut);c._anim.animate()},100,this)};YAHOO.util.Event.on(a.parentNode.getElementsByTagName("a")[0],"mouseenter",function(b){this.parentNode.getElementsByTagName("div")[0].open(b.shiftKey)});YAHOO.util.Event.on(a.parentNode.getElementsByTagName("a")[0],"mouseout",function(b){this.parentNode.getElementsByTagName("div")[0].close(b.shiftKey)});YAHOO.util.Event.on(a,"mouseout",function(b){this.close(b.shiftKey)});YAHOO.util.Event.on(a,"mousemove",function(b){if(this._wait){clearTimeout(this._wait);this._wait=null}})})}};YAHOO.util.Event.onDOMReady(function(a){OB.Utils.placeholders();OB.Utils.decodeLinks();OB.Utils.popupExtLinks();OB.Utils.makeSectionMenus();YAHOO.util.Event.on(YAHOO.util.Selector.query(".notification .close a"),"click",function(b){YAHOO.util.Event.preventDefault(b);YAHOO.util.Dom.setStyle(YAHOO.util.Dom.getAncestorByClassName(this,"notification"),"display","none")})});OB.Utils.Shortener={uris:{},onSet:new YAHOO.util.CustomEvent("shortenedUriSet",OB.Bar),get:function(c,e,d,a){OB.Utils.Shortener.onSet.unsubscribeAll();if(e){OB.Utils.Shortener.onSet.subscribe(e,d,a)}if(OB.Utils.Shortener.uris[c]){OB.Utils.Shortener.onSet.fire(OB.Utils.Shortener.uris[c])}else{var b=document.createElement("script");b.type="text/javascript";b.src="http://0z.fr/OB.Utils.Shortener.set?~"+OB.Utils.Base64.encode(c);document.body.appendChild(b)}},set:function(b,c,a){OB.Utils.Shortener.uris[OB.Utils.Base64.decode(a)]=b+c;OB.Utils.Shortener.onSet.fire(b+c)}};OB.Utils.Adn={params:{blr:Array(),sid:null,bid:null,aid:"-1"},catcher:function(isClicked,format){var raw=window.__4N,blr=eval(OB.Utils.Base64.decode(OB.Utils.Adn.params.blr)),len=0,log="",sep="",posPassed=[],posToTest=["Left","Top"],r,i,src,pos;for(i=0,len=blr.length;i<len;i++){if(document.referrer.indexOf(blr[i])>0){return}}try{if(!isClicked){if(raw||raw!=""){for(pos in raw){if(raw[pos].indexOf){posPassed[pos]=true;log+=OB.Utils.Adn.log(pos,raw[pos],sep);sep="|"}}}for(i in posToTest){if(!posPassed[posToTest[i]]){log+=OB.Utils.Adn.checkAds(posToTest[i],sep);sep="|"}}}else{if(raw!=undefined){posPassed[format]=true;log+=OB.Utils.Adn.log(format,raw[format],sep)}if(log==""){log+=OB.Utils.Adn.checkAds(format,sep)}}if(log!=""){i=new Image();src="/_pdadn.php?";src+=Math.random();src+="&sid="+OB.Utils.Adn.params.sid;src+="&bid="+OB.Utils.Adn.params.bid;src+="&aid="+OB.Utils.Adn.params.aid;src+="&adn="+log;if(isClicked){src+="&click=true"}i.src=src}}catch(e){return}return},log:function(e,b,a){var d="";var c="";c+=a;c+=e;c+=":";for(r in b){if(b[r].indexOf){c+=d;c+=b[r];d=","}}return c},checkAds:function(g,b){var d={Tf:"http://openadext.tf1.fr/RealMedia/ads/click_lx.ads",Ps:"/PLURIELLES/"};var a=Array(),c="",e="Na";scripts=YAHOO.util.Selector.query(".ads_"+g);for(i in scripts){for(j in d){var f=new RegExp(d[j]);if(f.test(scripts[i].innerHTML)){a.push(j)}}}if(a.length==0){a.push(e)}c+=OB.Utils.Adn.log(g,a,b);return c}};
if(!OB){var OB={}}OB.HeadlinesPanel=function(a){this.element=a;this.panel;this.headlines;this.stopped=false;this.init()};OB.HeadlinesPanel.prototype={init:function(){this.panel=YAHOO.util.Dom.getElementsByClassName("big","div",this.element)[0];this.headlines=YAHOO.util.Dom.getElementsByClassName("headline","li",this.element);this.headlines[0].selected=true;for(var a=0;this.headlines[a];a++){this.headlines[a].background=new Image();this.headlines[a].background.src=this.headlines[a].getAttribute("rel")}YAHOO.util.Event.on(this.headlines,"mouseover",function(c,b){b.show(this);clearInterval(this.interval);b.stopped=true;b.startInterval()},this);YAHOO.util.Event.on(this.headlines,"mouseout",function(c,b){b.stopped=false},this);YAHOO.util.Event.on(this.headlines,"click",function(b){window.location=this.getElementsByTagName("a")[0].href});this.startInterval()},show:function(b){if(this.stopped){return false}this.replaceTheme(b.className.match(/h_[a-zA-Z0-9]+/)?b.className.match(/h_[a-zA-Z0-9]+/)[0]:"");for(var a=0;this.headlines[a];a++){this.headlines[a].selected=false}b.selected=true;YAHOO.util.Dom.setStyle(this.panel,"background-image","url("+b.background.src+")");var c=YAHOO.util.Dom.getElementsByClassName("title",null,this.panel)[0];c.removeChild(c.getElementsByTagName("a")[0]);c.appendChild(b.getElementsByTagName("a")[0].cloneNode(true))},roll:function(){for(var a=0;this.headlines[a];a++){if(this.headlines[a].selected){if(a==(this.headlines.length-1)){a=-1}return this.show(this.headlines[a+1])}}},startInterval:function(){if(this.interval){clearInterval(this.interval)}var a=this;this.interval=setInterval(function(){a.roll()},2000+Math.min(5000,parseInt(Math.random()*10000)))},replaceTheme:function(a){this.panel.className="big "+a}};YAHOO.util.Event.onDOMReady(function(){var a=YAHOO.util.Dom.getElementsByClassName("headlinesPanel","div");for(var b=0;a[b];b++){var c=new OB.HeadlinesPanel(a[b])}});
