function mistigri_inline()
{
    var xhr=null;
    
    if (window.XMLHttpRequest) { 
        xhr = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
    {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
    //on définit l'appel de la fonction au retour serveur
    xhr.onreadystatechange = function() { alert_ajax(xhr); };
    
    //on appelle le fichier reponse.txt
    xhr.open("GET", "http://torlus.dyndns.org/apache2-default/mistigri/bdd_ajax_mistigri.php?connect=0", true);
    xhr.send(null);
    
    
}
function mistigri_last()
{
    var xhr=null;
    
    if (window.XMLHttpRequest) { 
        xhr = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
    {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
    //on définit l'appel de la fonction au retour serveur
    xhr.onreadystatechange = function() { alert_ajax(xhr); };
    
    //on appelle le fichier reponse.txt
    xhr.open("GET", "http://torlus.dyndns.org/apache2-default/mistigri/bdd_ajax_mistigri.php?connect=1", true);
    xhr.send(null);
    
    
}

function ajax()
{
    var xhr=null;
    
    if (window.XMLHttpRequest) { 
        xhr = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
    {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
    //on définit l'appel de la fonction au retour serveur
    xhr.onreadystatechange = function() { alert_ajax(xhr); };
    
    //on appelle le fichier reponse.txt
    xhr.open("GET", "http://coffreajouets.com/bdd_ajax.php?connect=0", true);
    xhr.send(null);
    
    
}
function ajax2()
{
    var xhr=null;
    
    if (window.XMLHttpRequest) { 
        xhr = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) 
    {
        xhr = new ActiveXObject("Microsoft.XMLHTTP");
    }
    //on définit l'appel de la fonction au retour serveur
    xhr.onreadystatechange = function() { alert_ajax(xhr); };
    
    //on appelle le fichier reponse.txt
    xhr.open("GET", "http://coffreajouets.com/bdd_ajax.php?connect=1", true);
    xhr.send(null);
    
    
}
function alert_ajax(xhr)
{
	var docXML= xhr.responseXML;
	var items = docXML.getElementsByTagName("donnee");
	
	var chaine = "";
	var tempo = "";
	var result ="";
	
	//on fait juste une boucle sur chaque element "donnee" trouvé
	for (i=0;i<items.length;i++)
	{
		
			
		chaine =  chaine  + "<font color='#FFFFFF'>" + items.item(i).firstChild.data + "</font><br />";
			
	}
	
	 
	document.getElementById('test').innerHTML =  chaine;
	
	
	//var objnew_texte = document.getElementById("message");				
	//objnew_texte.value = chaine;
}
