var objeto = null;
try {
   objeto = new XMLHttpRequest();
} catch (msxml) {
   try {
      objeto = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (microsoft) {
      try {
         objeto = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (falha) {
         objeto = null;
        }
     }
  }
if (objeto == null)
   alert("Erro ao criar uma solicitação!");
