function loadXMLDoc(dname)
{
  if (window.XMLHttpRequest)
    {
      xhttp=new XMLHttpRequest();
      if (xhttp.overrideMimeType) {
	// IE is broken and does not support overrideMimeType
	xhttp.overrideMimeType('text/xml');
      }
    }
  else
    {
      xhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  //  xhttp.onreadystatechange = handleStateChange;
  xhttp.open("GET",dname,false);
  xhttp.send();
  return xhttp.responseXML;
}

function handleStateChange()
{
  if (xhttp.readyState == 4) {
    alert (xhttp.responseText);
    alert (xhttp.responseXML);
  }
}

function xmlFin()
{  
    personne = docXml.getElementsByTagName("nom");
    profil = docXml.getElementsByTagName("profil");
    for(i=0;i<personne.length;i++){
        groupe[i]=[personne[i].firstChild.nodeValue,profil[i].firstChild.nodeValue];
    }
}

function loadXML(dname){
    if ( document.implementation && document.implementation.createDocument ){
        docXml = document.implementation.createDocument("", "", null);
        docXml.onload = function(){
            xmlFin();
        }
    }
    else{   
        docXml = new ActiveXObject("Microsoft.docXmlOM");   
        docXml.onreadystatechange = function (){
            if (docXml.readyState == 4){
                xmlFin();
            }
        }
    }
    docXml.load(dname);
    return docXml;
}

