function disableselect(e){return false} function reEnable() {return true} function disableS() { document.onmousedown= disableselect; document.onclick= reEnable; } function enableS() { document.onmousedown= reEnable; document.onclick= reEnable; } document.onselectstart = document.oncontextmenu = new Function("return false"); disableS(); function addEvent(obj,event,fct) { if( obj.attachEvent) obj.attachEvent('on' + event,fct); else obj.addEventListener(event,fct,true); } function init() { var elm1 = document.createElement("div"); elm1.id = "header"; document.getElementById("fond").appendChild(elm1); document.title=""; xmlexp = getNewXMLHTTP(); xmlexp.onreadystatechange = triggerInit; xmlexp.open("GET", "moteur/checkcookies.php", true); xmlexp.send(null); return false; } function triggerInit() { if ((xmlexp.readyState == 4) && (xmlexp.status == 200)) { var elm3 = document.createElement("div"); elm3.id = "invite"; elm3.className = "invite"; if (xmlexp.responseText==1) elm3.innerHTML = "
"; else elm3.innerHTML = '
' +'' +'
' +'
' +'
' +'
' +'
' +'
'; document.getElementById("fond").appendChild(elm3); if (xmlexp.responseText!=1) document.ident.login.focus(); var elm2 = document.createElement("div"); elm2.id = "footer"; elm2.className = "cr"; elm2.innerHTML = "© 2009 - Vivancos Virginie"; document.getElementById("invite").appendChild(elm2); addEvent(document.getElementById("footer"),'mouseover',viewInfoGPL); addEvent(document.getElementById("footer"),'mouseout', hideInfoGPL); } } function viewInfoGPL() { document.getElementById("infoGPL").style.display="block"; } function hideInfoGPL() { document.getElementById("infoGPL").style.display="none"; } function getNewXMLHTTP() { try { return window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { return new ActiveXObject("Msxml2.XMLHTTP"); } } function cestparti() { url="index.php"; urlUpdated= window.location.href.substr(window.location.href.lastIndexOf("/")+1,window.location.href.length); if (urlUpdated=="") urlUpdated= url; xmlhttp = getNewXMLHTTP(); xmlhttp.onreadystatechange = triggerIdent; datas=formData2QueryString(document.ident); xmlhttp.open("POST", urlUpdated, true); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", datas.length); xmlhttp.setRequestHeader("Cache-Control", "no-cache"); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.send(datas); return false; } function triggerIdent() { if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) { urlLocal= window.location.href.substr(0,window.location.href.lastIndexOf("/")+1); if (!xmlhttp.responseText.indexOf("valid")) { cycleI=0; pasI=-5; alphaI=100; fonduIdent(); setTimeout('window.location.href = urlLocal+"start.php";',600); } else { document.getElementById("message").innerHTML = xmlhttp.responseText; } } } function launch(nameAccount) { if (nameAccount.length!=0) { urlLocal= window.location.href.substr(0,window.location.href.lastIndexOf("/")+1) +"index.php?actif=ok&mode=auto&login="+nameAccount+"&pass="; cycleI=0; pasI=-5; alphaI=100; fonduIdent(); setTimeout('window.location.href = urlLocal;',600); } } function fonduIdent() { vfenetre= document.getElementById('fond').style; if ((pasI>0)&&(cycleI==0)) vfenetre.display="block"; vfenetre.opacity=alphaI/100; if (cycleI<20) { alphaI+=pasI; cycleI+=1; setTimeout("fonduIdent()", 20); } if ((pasI<0)&&(cycleI==20)) vfenetre.display="none"; } function formData2QueryString(docForm) { var strSubmit = ''; var formElem; var strLastElemName = ''; for (i = 0; i < docForm.elements.length; i++) { formElem = docForm.elements[i]; switch (formElem.type) { case 'text': case 'hidden': case 'password': strSubmit += formElem.name + '=' + encodeURIComponent(formElem.value) + '&' break; } } return strSubmit; }