function iescroll(){document.getElementById("popup").style.position="absolute";window.onscroll=function(){var a=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;document.getElementById("popup").style.top=(a+hautfen)+"px"}}function Close_popup(){document.getElementById("popup").style.display="none";if(isIE==0){document.getElementById("popup_fond").style.display="none"}}function switcharg(b){if(document.getElementById){if(isIE==1){var a=document.getElementById("chargement")}else{var a=document.getElementById("chargement2")}if(b==true){a.style.display="block"}else{a.style.display="none"}}}function switchaide(){if(document.getElementById("fil_aide")){var a=document.getElementById("fil_aide");if(a.style.display=="block"){a.style.display="none"}else{a.style.display="block"}}}function fade(b){var d=parseInt(b);var a=parseInt(d+10);var c=document.getElementById("popup");if(a<80){c.style.opacity="."+a;c.style.filter="alpha(opacity:"+a+")";opacityID=window.setTimeout("fade('"+a+"')",10)}else{c.style.opacity="1";c.style.filter="alpha(opacity:100)"}}function popup(d,a){if(document.getElementById){var c=document.getElementById("popup");c.style.top=hautfen+"px";c.style.left=leftfen+"px";c.style.display="block";if(isIE==0){document.getElementById("popup_fond").style.display="block"}document.getElementById("popup_titre").innerHTML=d;document.getElementById("popup_contenu").innerHTML=a}if(isIE==1){var b=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;document.getElementById("popup").style.top=(b+hautfen)+"px"}}var req_login=new AJAX();req_login.setIndicatorFunction(switcharg);req_login.setCallbackFunction(login_submit);function login_check(){if(req_login.ready==true){document.getElementById("errlogin").style.display="";req_login.getFilePost("ajax_login.php","pseudo="+escape(document.login.pseudo.value).replace(/\+/g,"%2B")+"&mp="+escape(document.login.mp.value).replace(/\+/g,"%2B"))}}function login_submit(a){if(a=="0"){document.login.submit()}else{if(a=="2"){document.login.action="http://bidouland.tomsgames.com/index.php";document.login.submit()}else{if(a=="3"){document.login.action="http://m2.bidouland.tomsgames.com/index.php";document.login.submit()}else{if(a=="4"){document.login.submit()}else{document.getElementById("errlogin").style.display="block";if(document.getElementById("infov3")){document.getElementById("infov3").style.display="block"}}}}}}var req_maj=new AJAX();req_maj.setIndicatorFunction(switcharg);req_maj.setCallbackFunction(bidi_maj);function bidi_get(){if(req_maj.ready==true){req_maj.getFilePost("ajax_bidimaj.php","sel=1")}}function bidi_maj(a){document.getElementById("bidipez").innerHTML=a}function $(a){return document.getElementById(a)}curX=0;curY=0;curScrollX=0;curScrollY=0;function getCursor(a){a=a||window.event;curX=a.clientX;curY=a.clientY}function getScrollCursor(a){a=a||window.event;curScrollX=(a.pageX)?a.pageX:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;curScrollY=(a.pageY)?a.pageY:a.clientY+document.body.scrollLeft+document.documentElement.scrollTop}function getMove(a){getCursor(a);getScrollCursor(a)}function dragAndDrop(){var b=$("popup");var d=$("popup_haut");var e=false;iebug=true;var c;var a;if(b){document.onmousemove=function(f){if(iebug==true){getMove(f)}if(e==true){b.style.left=(curScrollX-c)+"px";b.style.top=(curScrollY-a)+"px"}};d.onmousedown=function(){e=true;c=curScrollX-b.offsetLeft;a=curScrollY-b.offsetTop;document.onmousedown=function(f){return false};document.onselectstart=new Function("return false")};d.onmouseup=function(){e=false;document.onmousedown=function(f){return true};document.onselectstart=new Function("return true")}}}function AJAX(){this.xhr_object=null;this.response=null;this.ready=true;this.asynchronous=true;this.autovalidate=false;if(typeof XMLHttpRequest=="undefined"){XMLHttpRequest=function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(a){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){}throw alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...")}}this.xhr_object=new XMLHttpRequest();this.indicatorFunction=null;this.setIndicatorFunction=function(a){if(typeof(a)=="function"){this.indicatorFunction=a}};this.callbackFunction=null;this.setCallbackFunction=function(a){if(typeof(a)=="function"){this.callbackFunction=a;this.autovalidate=true}};this.setSynchronous=function(){this.asynchronous=false};this.setAsynchronous=function(){this.asynchronous=true};this.getFileGet=function(a,b){return this.doRequest(a,"GET",b)};this.getFile=this.getFileGet;this.getFilePost=function(a,b){return this.doRequest(a,"POST",b)};this.getFileHeader=function(a,b){return this.doRequest(a,"HEAD",b)};this.doRequest=function(a,f,c){if(!this.ready||!this.xhr_object){return false}function e(l,k){var j=l.split("\n");for(var h=0,m=j.length,g=[];h<m-1;++h){g=j[h].split(": ");if(g[0].toLowerCase()==k.toLowerCase()){return g[1]}}return"Header inconnu..."}if(this.indicatorFunction){this.indicatorFunction(true)}this.ready=false;var d=this;function b(){if(d.xhr_object.readyState!=4){return}if(d.indicatorFunction){d.indicatorFunction(false)}var g=d.xhr_object.getAllResponseHeaders();if(f=="HEAD"){d.response=c?e(g,c):g}else{var h=e(g,"Content-Type");if(h!="Header inconnu..."&&(new RegExp("^text/xml.*$","gi")).test(h)){d.response=d.xhr_object.responseXML}else{if(d.xhr_object.status!=200&&d.xhr_object.status!=304){alert("Une erreur "+d.xhr_object.status+" est survenue, le serveur a detecté un problème dans les données transmises. Modifiez vos données ou bien contactez nous via la page contact si vous pensez que ces données sont correctes.")}d.response=d.xhr_object.responseText}if(d.callbackFunction){d.callbackFunction(d.xhr_object.responseText);if(d.autovalidate){d.validateRequest()}}}}if(f=="GET"&&typeof(c)!="undefined"&&c!=""){a+="?"+c}this.xhr_object.open(f,_AJAX_addDummyData(a),this.asynchronous);if(this.asynchronous){this.xhr_object.onreadystatechange=b}if(c){this.xhr_object.setRequestHeader("Content-type","application/x-www-form-urlencoded")}else{c=null}this.xhr_object.send(c);if(!this.asynchronous){b()}return true};this.hasResponse=function(){return this.response!=null};this.getResponse=function(){return this.response};this.setAutoValidate=function(a){this.autovalidate=a};this.validateRequest=function(){this.ready=true;this.response=null};this.cancelRequest=function(){this.xhr_object.abort();if(this.indicatorFunction){this.indicatorFunction(false)}this.validateRequest()}}function _AJAX_addDummyData(b){var a=new Date();if(b.indexOf("?")==-1){b+="?ajax_dummy="}else{b+="&ajax_dummy="}return b+a.getTime()};
