function fichierverif(fichier){var get="";if(fichier.indexOf("?")==-1){get="?";}else{get="&";}
var timestamp=Math.round((new Date()).getTime()/1000);if(window.XMLHttpRequest)
xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else
return(false);xhr_object.open("POST",fichier+get+"t="+new Date().getTime(),false);xhr_object.send(null);if(xhr_object.readyState==4)
return(xhr_object.responseText);else return(false);}
function ajax_post(url,choix,contenu,div){if(window.XMLHttpRequest)
xhr=new XMLHttpRequest();else if(window.ActiveXObject)
xhr=new ActiveXObject("Microsoft.XMLHTTP");else
return(false);xhr.open("POST",url,true);xhr.onreadystatechange=function(){if(xhr.readyState==4&&xhr.status==200)
document.getElementById(div).innerHTML=xhr.responseText;};xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send('choix='+choix+'&contenu='+contenu+'&t='+new Date().getTime());}
function refresh(fichier,id){var get="";if(fichier.indexOf("?")==-1){get="?";}else{get="&";}
if(window.XMLHttpRequest)
xhr_object=new XMLHttpRequest();else if(window.ActiveXObject)
xhr_object=new ActiveXObject("Microsoft.XMLHTTP");else
return(false);xhr_object.open("GET",fichier+get+"t="+new Date().getTime(),false);xhr_object.onreadystatechange=function(){if(xhr_object.readyState==4){if(xhr_object.status==200){document.getElementById(id).innerHTML=xhr_object.responseText;}else{document.getElementById('connexion_net').innerHTML='Vérifiez votre connexion internet.';}}}
xhr_object.send(null);}
function correspondance(str,div)
{var xmlhttp;if(str.length<=0)
{document.getElementById(div).innerHTML="";return;}
if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
xmlhttp.onreadystatechange=function()
{document.getElementById(div).innerHTML='<center><img src=\'images/ajax-loader.gif\'></center>';if(xmlhttp.readyState==4&&xmlhttp.status==200)
{document.getElementById(div).innerHTML=xmlhttp.responseText;}}
xmlhttp.open("GET","ajax/ingame/recherche.php?q="+str+"&t="+new Date().getTime(),true);xmlhttp.send();}
function autosuggestion(str,action,div)
{if(str.length<=1)
{document.getElementById(div).innerHTML="";document.getElementById(div).style.border="0px";return;}
if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else
{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
xmlhttp.onreadystatechange=function()
{if(xmlhttp.readyState==4&&xmlhttp.status==200)
{document.getElementById(div).innerHTML=xmlhttp.responseText;document.getElementById(div).style.border="1px solid #A5ACB2";document.getElementById(div).style.position="absolute";document.getElementById(div).style.width="365px";document.getElementById(div).style.background="#f6f6f6";}}
xmlhttp.open("GET","ajax/structure/autosuggest.php?action="+action+"&q="+str+"&t="+new Date().getTime(),true);xmlhttp.send();}
