/* utilisation
    var c = document.getElementById("scroll");
    document.getElementById('tmp').innerHTML = "<img src='admin/commun/images/indicator.gif'>";
    var xmlhttp = getHTTPObject(c,"xml","innerHTML/value");
    xmlhttp.open("POST", "req.php",true);
    xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
    xmlhttp.send("img="+file+"&param="+param);
*/
function getHTTPObject(c,mode,typ,tmp) {
    
  var xmlhttp = false;
  /* Compilation conditionnelle d'IE */
  /*@cc_on
  @if (@_jscript_version >= 5)
     try
     {
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
     }
     catch (e)
     {
        try
        {
           xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        catch (E)
        {
           xmlhttp = false;
        }
     }
  @else
     xmlhttp = false;
  @end @*/
    
  /* on essaie de créer l'objet si ce n'est pas déjà fait */
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
  {
     try
     {
        xmlhttp = new XMLHttpRequest();
        // Évite un bug du navigateur Safari :
        if (xmlhttp.overrideMimeType) {
            xmlhttp.overrideMimeType("text/xml");
        }

     }
     catch (e)
     {
        xmlhttp = false;
        window.status("Votre navigateur ne prend pas en charge l'objet XMLHTTPRequest.");
     }
  }
    
    if (xmlhttp)
    {
        xmlhttp.onreadystatechange=function()
        {
            if (xmlhttp.readyState == 4) /* 4 : état "complete" */
            {
               if (xmlhttp.status == 200) /* 200 : code HTTP pour OK */
               {
                    if (mode != "xml"){
                        //alert( xmlhttp.responseText);
                        if (typ){
                            c.innerHTML = xmlhttp.responseText;
                        } else {
                            c.value = xmlhttp.responseText;
                        }
                    } else{
                        parsexml(xmlhttp.responseXML,c);
                    }
                    document.getElementById(((tmp) ? tmp:"tmp")).innerHTML = "";   
               } else {
                    window.status = xmlhttp.status + " " + xmlhttp.statusText;
               }
            } else {
                 window.status =  xmlhttp.readyState;

            }
        }
    }
    return xmlhttp;
}

function parsexml(xml,c){

}


