function xmlhttpPost(strURL,url_foto) {
	document.getElementById("result_image").innerHTML = "<img src='/images/ajax-loader.gif' />";
    var xmlHttpReq = false;
    var self = this;
    // Xhr per Mozilla/Safari/Ie7
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // per tutte le altre versioni di IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('GET', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getquerystring(url_foto));
}

function getquerystring(url_foto) {    
    qstr = 'data=' + escape(url_foto);  // NOTARE bene che non viene messo '?' prima della querystring
    return qstr;
}

function updatepage(str){
    document.getElementById("result_image").innerHTML = str;
}
