function getXMLHTTPRequest() {

var id;

try {
 req=new XMLHttpRequest();}
catch (err1) {
 try {
  req=new ActiveXObject("Msxml2.XMLHTTP");}
 catch (err2) {
  try {
   req=new ActiveXObject("Microsoft.XMLHTTP");}
  catch (err3) {
   req=false;}
  }
 }
return req;
}

function CaricaDefault(nomefile,nomeid) {
 id=nomeid;
 var myurl=nomefile;
 //myRand=parseInt(Math.random()*999999999999999);
 var modurl=myurl;
 //+"?rand="+myRand;
 http.open("GET",modurl,true);
 http.onreadystatechange=useHttpResponse;
 http.send(null);
}

function useHttpResponse() {
if (http.readyState == 4) {
 if (http.status == 200) {
  var asp=http.responseText;
  document.getElementById(id).innerHTML=asp;
  }
 }
 //else {
 // document.getElementById('intestazione').innerHTML=php;
 //}
}


// --------------------------------------------
