function getXhr(){

	if(window.XMLHttpRequest)
	return new XMLHttpRequest();
	else if(window.ActiveXObject){
		try {
			return new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			return new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	else {
		alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		return false;
	}

}
function execAjaxFunc(script,params,func){

    
   
	var xhr = null ;
	var scriptName = script;
	var sync = true;
	
	xhr = getXhr();
	xhr.onreadystatechange = function(){
		if(xhr.readyState == 4 && xhr.status == 200){
			response = (xhr.responseText);
			inter =  setTimeout(func +"(\""+ (response) + "\")",100);
			
		}
	}
	xhr.open("POST",scriptName,sync);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xhr.send(params);
}

