
var xhrVisit;

//fonction de création de l'objet xhr (ajax)
function createXhrObject(){
    if (window.XMLHttpRequest)
        return new XMLHttpRequest();
 
    if (window.ActiveXObject){
        var names = [
            "Msxml2.XMLHTTP.6.0",
            "Msxml2.XMLHTTP.3.0",
            "Msxml2.XMLHTTP",
            "Microsoft.XMLHTTP"
        ];
        for(var i in names){
            try{
            	return new ActiveXObject(names[i]);
            }
            catch(e){}
        }
    }
    window.alert("Votre navigateur ne prend pas en charge l'objet XMLHTTPRequest.");
    return null; // non supporté
}


function process(){
	//if(xhrVisit){
		try{
			xhrVisit = createXhrObject();
			xhrVisit.open("POST","visit/visit_req.php",true);
			xhrVisit.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); 
			xhrVisit.send(my_post);
		}
		catch(e){}
	//}
	//else{
		//window.alert('Pas de stats');
	//}
}


process();

