/*
  Função responsável por instanciar o Objeto XMLHttpRequest ou XMLHTTP(Microsoft)

*/
function ajaxInit() {
  var xmlhttp;
  try {
    // Navegadores como Firefox, Opera, Chrome e outros.
    // (Menos Navegadores Microsoft, ver abaixo)
    xmlhttp = new XMLHttpRequest();
  } catch (ee){
    try{
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); // Para Internet Explorer
    } catch (eee){
      try{
        // Também para Internet Explorer, 
        //conforme a versão pode variar o nome do ActiveX Object
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 
      } catch (E) {
        xmlhttp = false; // Caso não consiga instanciar o objeto
      }
    }
  }
  return xmlhttp;
}
