var http;
var result;

function processReqChange() {
//   alert('processReqChange()');
    if (http.readyState == 4) {
        if (http.status == 200) {
//     	    alert(http.responseText);	
 	    eval(http.responseText);
        } else {
            alert("There was a problem retrieving the XML data:\n" + http.statusText);
        }
    }
}

function xhr_request(what,host) {
//  alert('getxmldoc'); 
   if (host == '192.168.2.4') {
	   host = 'http://'+host+'/difatta_en/includes/'+what;
   } else {
	   host = 'http://'+host+'/includes/'+what;
   }
   url = host;
//   alert(url);
    if (window.XMLHttpRequest) {
	    http = new XMLHttpRequest();
	    http.onreadystatechange = processReqChange;
	    http.open("GET", url, true);
	    http.send(null);
    } else if (window.ActiveXObject) {
	    http = new ActiveXObject("Microsoft.XMLHTTP");
	    if (http) {
		    http.onreadystatechange = processReqChange;
		    http.open("GET", url, true);
		    http.send();
	    }
    } else {
//  	    alert('questo browser non supporta xmlhttprequest, link a ' + url );
 	    url = build_url(parms,1);
 	    what.location.href = url;
	    return; 	
    }
}
