function writediv(e,c){document.getElementById(c).innerHTML=e}function VerifCaptcha(c,f,e){if(c!=""){if(texte=file("require/verif.php?op=captcha&captcha="+escape(c)+"&captcha_d="+escape(f)+"&adress="+escape(e))){if(texte==1){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#B42B1F;">Code de s&eacute;curit&eacute; incorect !</span>',"verif_c")}else{if(texte==2){writediv('<span style="padding:1px;color:#F1F1F1;border: 1px solid #589E47;background: #688261;">'+c+" : Code de s&eacute;curit&eacute; ok !</span>","verif_c")}else{writediv(texte,"verif_c")}}}}}function VerifPseudo(c){if(c!=""){if(c.length<2){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#F1F1F1;">'+c+" : ce pseudo est trop court</span>","pseudobox")}else{if(c.length>30){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#F1F1F1;">'+c+" : ce pseudo est trop long</span>","pseudobox")}else{if(texte=file("require/verif.php?op=pseudo&pseudo="+escape(c))){if(texte==1){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#B42B1F;">'+c+" : ce pseudo est d&eacute;j&agrave; pris !</span>","pseudobox")}else{if(texte==2){writediv('<span style="padding:1px;color:#F1F1F1;border: 1px solid #589E47;background: #688261;">'+c+" : ce pseudo est libre !</span>","pseudobox")}else{writediv(texte,"pseudobox")}}}}}}}function VerifMail(c){if(c!=""){if(texte=file("require/verif.php?op=mail&mail="+escape(c))){if(texte==1){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#B42B1F;">'+c+" : ce mail est d&eacute;j&agrave; pris !</span>","mailbox")}else{if(texte==2){writediv('<span style="padding:1px;color:#F1F1F1;border: 1px solid #589E47;background: #688261;">'+c+" : ce mail est libre !</span>","mailbox")}else{writediv(texte,"mailbox")}}}}}function VerifEmail(c){if(c!=""){if(texte=file("require/verif.php?op=email&email="+escape(c))){if(texte==1){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#B42B1F;">'+c+" : est bannie !</span>","emailbox")}else{if(texte==2){writediv('<span style="padding:1px;color:#F1F1F1;border: 1px solid #589E47;background: #688261;">'+c+" : ok !</span>","emailbox")}else{writediv(texte,"emailbox")}}}}}function VerifSteamId(c){if(c!=""){if(texte=file("require/verif.php?op=steam_id&steamid="+escape(c))){if(texte==1){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#B42B1F;">SteamId incorect !</span>',"steamidbox")}else{if(texte==2){writediv('<span style="padding:1px;color:#F1F1F1;border: 1px solid #589E47;background: #688261;">SteamId ok !</span>',"steamidbox")}else{writediv(texte,"steamidbox")}}}}}function VerifIpServ(c){if(c!=""){if(texte=file("require/verif.php?op=ip_serv&ip="+escape(c))){if(texte==1){writediv('<span style="padding:1px;border: 1px solid #DF5548;background: #F4C7C4;color:#B42B1F;">Ip serveur incorect !</span>',"ipservbox")}else{if(texte==2){writediv('<span style="padding:1px;color:#F1F1F1;border: 1px solid #589E47;background: #688261;">Ip serveur ok !</span>',"ipservbox")}else{writediv(texte,"ipservbox")}}}}}function ajouter_com(){var g=getXhr();g.onreadystatechange=function(){if(g.readyState==4){if(g.status==200){leselect=g.responseText;document.getElementById("apercu_description_map").innerHTML=leselect}else{document.getElementById("apercu_description_map").innerHTML="Erreur !!!"}}else{document.getElementById("apercu_description_map").innerHTML="<img src='images/loading.gif' alt=''/>"}};g.open("POST","modules/Download/add_description.php",true);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var f=document.getElementById("description_map").value;var e=document.getElementById("id_map").value;var c=document.getElementById("id_user").value;g.send("description_map="+f+"&id_map="+e+"&id_user="+c+"")}function file(c){if(window.XMLHttpRequest){xhr_object=new XMLHttpRequest()}else{if(window.ActiveXObject){xhr_object=new ActiveXObject("Microsoft.XMLHTTP")}else{return(false)}}xhr_object.open("GET",c,false);xhr_object.send(null);if(xhr_object.readyState==4){return(xhr_object.responseText)}else{return(false)}}var updateStrength=function(e){var f=getStrength(e);var c=(100/32)*f;new Effect.Morph("psStrength",{style:"width:"+c+"px",duration:"0.4"})};var getStrength=function(c){intScore=0;if(c.match(/[a-z]/)){intScore=(intScore+1)}if(c.match(/[A-Z]/)){intScore=(intScore+5)}if(c.match(/\d+/)){intScore=(intScore+5)}if(c.match(/(\d.*\d.*\d)/)){intScore=(intScore+5)}if(c.match(/[!,@#$%^&*?_~]/)){intScore=(intScore+5)}if(c.match(/([!,@#$%^&*?_~].*[!,@#$%^&*?_~])/)){intScore=(intScore+5)}if(c.match(/[a-z]/)&&c.match(/[A-Z]/)){intScore=(intScore+2)}if(c.match(/\d/)&&c.match(/\D/)){intScore=(intScore+2)}if(c.match(/[a-z]/)&&c.match(/[A-Z]/)&&c.match(/\d/)&&c.match(/[!,@#$%^&*?_~]/)){intScore=(intScore+2)}return intScore};var checkboxHeight="25";var radioHeight="25";var selectWidth="190";document.write('<style type="text/css">input.styled { display: none; } select.styled { position: relative; width: '+selectWidth+"px; opacity: 0; filter: alpha(opacity=0); z-index: 5; } .disabled { opacity: 0.5; filter: alpha(opacity=50); }</style>");var Custom={init:function(){var e=document.getElementsByTagName("input"),g=Array(),c,f,h;for(a=0;a<e.length;a++){if((e[a].type=="checkbox"||e[a].type=="radio")&&e[a].className=="styled"){g[a]=document.createElement("span");g[a].className=e[a].type;if(e[a].checked==true){if(e[a].type=="checkbox"){position="0 -"+(checkboxHeight*2)+"px";g[a].style.backgroundPosition=position}else{position="0 -"+(radioHeight*2)+"px";g[a].style.backgroundPosition=position}}e[a].parentNode.insertBefore(g[a],e[a]);e[a].onchange=Custom.clear;if(!e[a].getAttribute("disabled")){g[a].onmousedown=Custom.pushed;g[a].onmouseup=Custom.check}else{g[a].className=g[a].className+=" disabled"}}}e=document.getElementsByTagName("select");for(a=0;a<e.length;a++){if(e[a].className=="styled"){f=e[a].getElementsByTagName("option");h=f[0].childNodes[0].nodeValue;c=document.createTextNode(h);for(b=0;b<f.length;b++){if(f[b].selected==true){c=document.createTextNode(f[b].childNodes[0].nodeValue)}}g[a]=document.createElement("span");g[a].className="select";g[a].id="select"+e[a].name;g[a].appendChild(c);e[a].parentNode.insertBefore(g[a],e[a]);if(!e[a].getAttribute("disabled")){e[a].onchange=Custom.choose}else{e[a].previousSibling.className=e[a].previousSibling.className+=" disabled"}}}document.onmouseup=Custom.clear},pushed:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight*3+"px"}else{if(element.checked==true&&element.type=="radio"){this.style.backgroundPosition="0 -"+radioHeight*3+"px"}else{if(element.checked!=true&&element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight+"px"}else{this.style.backgroundPosition="0 -"+radioHeight+"px"}}}},check:function(){element=this.nextSibling;if(element.checked==true&&element.type=="checkbox"){this.style.backgroundPosition="0 0";element.checked=false}else{if(element.type=="checkbox"){this.style.backgroundPosition="0 -"+checkboxHeight*2+"px"}else{this.style.backgroundPosition="0 -"+radioHeight*2+"px";group=this.nextSibling.name;inputs=document.getElementsByTagName("input");for(a=0;a<inputs.length;a++){if(inputs[a].name==group&&inputs[a]!=this.nextSibling){inputs[a].previousSibling.style.backgroundPosition="0 0"}}}element.checked=true}},clear:function(){inputs=document.getElementsByTagName("input");for(var c=0;c<inputs.length;c++){if(inputs[c].type=="checkbox"&&inputs[c].checked==true&&inputs[c].className=="styled"){inputs[c].previousSibling.style.backgroundPosition="0 -"+checkboxHeight*2+"px"}else{if(inputs[c].type=="checkbox"&&inputs[c].className=="styled"){inputs[c].previousSibling.style.backgroundPosition="0 0"}else{if(inputs[c].type=="radio"&&inputs[c].checked==true&&inputs[c].className=="styled"){inputs[c].previousSibling.style.backgroundPosition="0 -"+radioHeight*2+"px"}else{if(inputs[c].type=="radio"&&inputs[c].className=="styled"){inputs[c].previousSibling.style.backgroundPosition="0 0"}}}}}},choose:function(){option=this.getElementsByTagName("option");for(d=0;d<option.length;d++){if(option[d].selected==true){document.getElementById("select"+this.name).childNodes[0].nodeValue=option[d].childNodes[0].nodeValue}}}};window.onload=Custom.init;function getXhr(){var f=null;if(window.XMLHttpRequest){f=new XMLHttpRequest()}else{if(window.ActiveXObject){try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){f=new ActiveXObject("Microsoft.XMLHTTP")}}else{alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");f=false}}return f}function preview(){var e=getXhr();e.onreadystatechange=function(){if(e.readyState==4){if(e.status==200){leselect=e.responseText;document.getElementById("preview").innerHTML=leselect}else{document.getElementById("preview").innerHTML="Erreur !!!"}}else{document.getElementById("preview").innerHTML="<img src='images/loading.gif' alt=''/>"}};e.open("POST","modules/Forum/preview.php",true);e.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var c=document.getElementById("texte").value;e.send("texte="+c+"")}function calendrier(c){var e=getXhr();e.onreadystatechange=function(){if(e.readyState==4){if(e.status==200){leselect=e.responseText;document.getElementById("bloc_calendrier").innerHTML=leselect}else{document.getElementById("bloc_calendrier").innerHTML="Erreur !!!"}}else{document.getElementById("bloc_calendrier").innerHTML="<div style='text-align:center;'><img src='images/loading.gif' alt=''/></div>"}};e.open("GET",c,true);e.send(null)}function help(c){var e=getXhr();e.onreadystatechange=function(){if(e.readyState==4){if(e.status==200){leselect=e.responseText;document.getElementById("block-toggle-help").innerHTML=leselect}else{document.getElementById("block-toggle-help").innerHTML="Erreur !!!"}}else{document.getElementById("block-toggle-help").innerHTML="<div style='text-align:center;'>Chargement de l'aide en cours ....<br /><img src='images/loading.gif' alt=''/></div>"}};e.open("GET",c,true);e.send(null)}function load_page(c){var e=getXhr();e.onreadystatechange=function(){if(e.readyState==4){if(e.status!=200){document.getElementById("tab_com").innerHTML="Error code "+e.status}else{document.getElementById("tab_com").innerHTML=e.responseText}}else{document.getElementById("tab_com").innerHTML="<div style='Text-align:center;'><img src='images/loading.gif' alt=''/></div>"}};e.open("GET",c,true);e.send(null)}function toggleBlind(g,e,f){var c=new Date;c.setMonth(c.getMonth()+1);x=document.getElementById("block-show-"+g);y=document.getElementById("block-hide-"+g);if(e=="hide"){x.style.display="inline";y.style.display="none";ecrire_cookie("block-hide-"+g,"none",c)}else{x.style.display="none";y.style.display="inline";ecrire_cookie("block-hide-"+g,"inline",c)}Effect.toggle("block-toggle-"+g,f,{duration:1});return false}function ecrire_cookie(f,c,e){document.cookie=f+"="+escape(c)+((e==null)?"":("; expires="+e.toGMTString()))}function toggleDisp(){for(var c=0;c<arguments.length;c++){var e=$(arguments[c]);if(e.style.display=="none"){e.style.display="block"}else{e.style.display="none"}}}function toggleTab(k,f,l,e){if($("tabContent"+k).style.display=="none"){for(var g=1;g<=f;g++){if((l==null)||(l!=g)){var n="tabHeader"+g;var j=$(n);if(!j){var j=$("tabHeaderActive");j.id=n}var o="tabContent"+g;var m=$(o);if(m.style.display!="none"){if(e||typeof e=="undefined"){Effect.toggle(o,"blind",{duration:1.5,queue:{scope:"menus",limit:3}})}else{toggleDisp(o)}}}}var j=$("tabHeader"+k);if(j){j.id="tabHeaderActive"}j.blur();var m=$("tabContent"+k);m.style.marginTop="2px";if(e||typeof e=="undefined"){Effect.toggle("tabContent"+k,"blind",{duration:1.5,queue:{scope:"menus",position:"end",limit:3}})}else{toggleDisp("tabContent"+k)}}}function init_rating(n,h,c){var e=document.getElementsByTagName("div");for(var k=0;k<e.length;k++){if(e[k].className!="rating_"+n){continue}var f=e[k].firstChild.nodeValue;e[k].removeChild(e[k].firstChild);if(f>c||f<0){continue}for(var g=0;g<c;g++){var m=document.createElement("img");if(f>=1){m.setAttribute("title",g+1);m.setAttribute("style","vertical-align:middle");m.setAttribute("src","images/stars/"+h+"/rating_on.png");m.className="on";f--}else{if(f==0.5){m.setAttribute("style","vertical-align:middle");m.setAttribute("src","images/stars/"+h+"/rating_half.png");m.className="half";f=0}else{m.setAttribute("title",g+1);m.setAttribute("style","vertical-align:middle");m.setAttribute("src","images/stars/"+h+"/rating_off.png");m.className="off"}}var l=e[k].getAttribute("id").substr(7);m.setAttribute("id","star_"+l+"_"+g);m.onmouseover=new Function("evt","displayHover("+l+", "+g+", "+h+");");m.onmouseout=new Function("evt","displayNormal("+l+", "+g+", "+h+");");e[k].appendChild(m)}}}function view_rating(n,h,c){var e=document.getElementsByTagName("div");for(var k=0;k<e.length;k++){if(e[k].className!="rating_"+n){continue}var f=e[k].firstChild.nodeValue;e[k].removeChild(e[k].firstChild);if(f>c||f<0){continue}for(var g=0;g<c;g++){var m=document.createElement("img");if(f>=1){m.setAttribute("style","vertical-aligne:middle");m.setAttribute("src","images/stars/"+h+"/rating_on.png");m.className="on";f--}else{if(f==0.5){m.setAttribute("style","vertical-aligne:middle");m.setAttribute("src","images/stars/"+h+"/rating_half.png");m.className="half";f=0}else{m.setAttribute("style","vertical-aligne:middle");m.setAttribute("src","images/stars/"+h+"/rating_off.png");m.className="off"}}var l=e[k].getAttribute("id").substr(7);m.setAttribute("id","star_"+l+"_"+g);e[k].appendChild(m)}}}function displayHover(f,e,g){for(var c=0;c<=e;c++){document.getElementById("star_"+f+"_"+c).setAttribute("src","images/stars/"+g+"/rating_over.png")}}function displayNormal(g,f,h){for(var e=0;e<=f;e++){var c=document.getElementById("star_"+g+"_"+e).className;document.getElementById("star_"+g+"_"+e).setAttribute("src","images/stars/"+h+"/rating_"+c+".png")}}(function(n,p){var c=navigator.appVersion.match(/MSIE/i)?navigator.appVersion.replace(/.*?MSIE ([^;]+);.*/i,"$1"):null;function h(s,r){var t,q={};for(t in r){q[t]=r[t]}for(t in s){q[t]=s[t]}return q}function e(r,q){return(q||p).getElementsByTagName(r)}function f(){var q,t,s=n,u=p,v=u.documentElement,r=u.body;if(s.innerWidth){q=s.innerWidth;t=s.innerHeight}else{if(v.clientWidth){q=v.clientWidth;t=v.clientHeight}else{q=r.clientWidth;t=r.clientHeight}}return{w:q,h:t}}function o(){var u=p,t=u.documentElement,r=u.body,q,s;s=t.scrollHeight;q=t.scrollWidth;if(t.clientHeight>s){s=t.clientHeight}if(t.clientWidth>q){q=t.clientWidth}if(r.scrollHeight>s){s=r.scrollHeight}if(r.scrollWidth>q){q=r.scrollWidth}return{w:q,h:s}}function k(t,s,r,q){if(t.addEventListener){t.addEventListener(s,r,q)}else{t.attachEvent("on"+s,r)}}function m(r,q){for(var s in q){r.style[s]=q[s]}}function g(q,r){r=(r==1)?0.99999:r;q.style.opacity=r;q.style.filter="alpha(opacity="+r*100+")";q.style.MozOpacity=r;q.style.KhtmlOpacity=r}function i(t,v,u,s){this.elem=t||p.body;this.to=v!==undefined?v:1;var r=this.elem.style;this.from=(u===undefined?(!r.opacity&&r.opacity!==0?(this.to>0?0:1):parseFloat(r.opacity)):u);s=s||{};this.duration=s.duration||500;this.frameRate=s.frameRate||30;this.onFinish=s.onFinish;this.totalFrames=Math.ceil(this.duration/1000*this.frameRate);this.perFrame=(this.to-this.from)/this.totalFrames;this.frameNb=0;var q=this;this.next=function(){this.prog=setTimeout(function(){q.frame()},1000/this.frameRate)};this.frame=function(){g(this.elem,this.from+this.perFrame*this.frameNb);if(this.frameNb===this.totalFrames){g(this.elem,this.to);if(typeof this.onFinish=="function"){setTimeout(this.onFinish,1)}}else{this.frameNb++;this.next()}};this.next()}function l(v,t,D){var r,A,z,u,C,q,w,B,s;D=D||{};r=D.max_w;A=D.min_w;z=D.max_h;u=D.max_h;C=D.round===undefined?1:D.round;q=v/t;w=t/v;B=t;s=v;if(s<A){s=A;B=s*w}if(B<u){B=u;s=B*q}if(r&&(s>r)){s=r;B=s*w}if(z&&(B>z)){B=z;s=B*q}s=s<0?0:s;B=B<0?0:B;return{w:C?Math.round(s):s,h:C?Math.round(B):B}}var j={defaults:{mode:"max",enlarge:1,reduce:1,ffHack:0,zIndex:-1,position:"fixed",align:"center",vertAlign:"top",fadeAfter:0,fadeOptions:{duration:1000,frameRate:25}},redim:function(){var E=j,u,F,z=f(),r,A,C,D,w,t,v,q,s,B;u=E.img;A=C=D=w="";F=E.opt;t=u.fileDim;if(t){if(F.mode=="full"){v=s=z.w;q=B=z.h;if(!F.enlarge){if(v>t.w){v=s=t.w}if(q>t.h){q=B=t.h}}if(!F.reduce){if(s<t.w){s=t.w;v=Math.max(s,v)}if(B<t.h){B=t.h;q=Math.max(B,q)}}}else{s=v=z.w;B=q=0;if(!F.reduce){v=0}}t=l(t.w,t.h,{min_w:s,win_h:B,max_w:v,max_h:q,round:1});u.width=t.w;u.height=t.h;if(!u.width){u.removeAttribute("width")}if(!u.height){u.removeAttribute("height")}switch(F.align){case"left":D="0px";break;case"right":w="0px";break;default:D=-Math.round((t.w-z.w)/2)+"px"}if(F.vertAlign=="bottom"){C="0px"}else{if(F.vertAlign=="middle"){r=F.position=="fixed"?z.h:o().h;A=(-F.ffHack+(r-u.offsetHeight)/2)+"px"}else{A=u.hack||"0px"}}m(u,{left:D,right:w,top:A,bottom:C})}},show:function(){var r=j,q;q=r.img;q.fileDim={w:q.naturalWidth||q.clientWidth,h:q.naturalHeight||q.clientHeight};r.redim();if(r.fadeIt){i(r.img,1,0,r.opt.fadeOptions)}else{g(q,1)}},init:function(w,u){var t=j,q=e("body")[0],v,s,r;u=h(u,this.defaults);if(c&&c<7){u.position="absolute"}t.opt=u;v=u.fadeAfter;s=t.img=p.createElement("img");s.id="bgMax";m(s,{zIndex:u.zIndex,position:u.position});r=navigator.userAgent.match(/Firefox.(\d+(\.\d+))/);if(r&&parseFloat(r[1])<3){m(q,{zIndex:0,position:"relative",top:0,left:0});s.hack="-"+u.ffHack}q.insertBefore(s,q.childNodes[0]);s.onload=t.show;if(v!==false){g(s,0);if(v){setTimeout(function(){t.fadeIt=1},v)}else{t.fadeIt=1}}k(n,"resize",t.redim);s.src=w}};n.bgMax=j})(window,document);
