function GetXmlHttpObject() {
  var xmlHttp=null;
  try {
    // Firefox, Opera 8.0+, Safari,IE7
    xmlHttp=new XMLHttpRequest();
  } catch (e) {
  // Internet Explorer 6 e precedenti
    try {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
  return xmlHttp;
}
function SostituisceCaratteriSpeciali(strInput) {
  var strOutput;
  strOutput = strInput.replace(/\n/g,"[CRLF]").replace(/\r/g,"").replace(/ /g,"%20").replace(/\+/g,"%2B");
  return strOutput;
}