﻿var xmlhttp = false;
var xmlhttp1 = false;
var xmlhttp2 = false;
var xmlhttp3 = false;
function CreateXMLHttpRequest(){
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    xmlhttp1 = new ActiveXObject("Msxml2.XMLHTTP");
    xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP");
    xmlhttp3 = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttp1 = new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP");
      xmlhttp3 = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e2) {
      xmlhttp = false;
      xmlhttp1 = false;
      xmlhttp2 = false;
      xmlhttp3 = false;
    }
  }
  if (!xmlhttp && typeof XMLHttpRequest != "undefined") {
    xmlhttp = new XMLHttpRequest();
  }
  if (!xmlhttp1 && typeof XMLHttpRequest != "undefined") {
    xmlhttp1 = new XMLHttpRequest();
  }
  if (!xmlhttp2 && typeof XMLHttpRequest != "undefined") {
    xmlhttp2 = new XMLHttpRequest();
  }
  if (!xmlhttp3 && typeof XMLHttpRequest != "undefined") {
    xmlhttp3 = new XMLHttpRequest();
  }
}
CreateXMLHttpRequest();