function getXHR(){
var req=null;
try{
req=new XMLHttpRequest();
}
catch(err1){
      try{
      req=new ActiveXObject("Msxml2.XMLHTTP");
      }
      catch(err2){
      try{
      req=new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch(err3){
      req=null;
      }
      }
}
return req;
}
