function httpRequest(url,div){

	var xhr_object = getHTTPObject();

	xhr_object.open("GET", url, true);
	
	xhr_object.onreadystatechange = function() {
	   if(xhr_object.readyState == 4) 
	   {
	   	document.getElementById(div).innerHTML = xhr_object.responseText ;
	   }
	}
	
	xhr_object.send(null);
}


function getHTTPObject() {
	httpObj = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) {
    	try {
			httpObj = new XMLHttpRequest();
        } catch(e) {
			httpObj = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	httpObj = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		httpObj = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		httpObj = false;
        	}
		}
    }
    if(!httpObj){
    	alert('httpRequest n\'est pas supporté par votre navigateur');
    }
	return httpObj;
} 
