﻿function xmlhttp_get(url, func, async)
{
   // Try Mozilla and IE xmlhttp objects...

    var xmlhttp;
    MS=0;
    try {
      xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
      MS=1;
     } catch (e) {
      try {
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
        MS=1;
      } catch (e) {
       xmlhttp=false;
      }
     }

    if (!xmlhttp) {
      try {
      xmlhttp = new XMLHttpRequest();
      } catch (e) {
        xmlhttp=false;
      }
    }

    if (!xmlhttp)
     return;


  xmlhttp.open("GET", url, true);
  xmlhttp.onreadystatechange=func;
  document.xmlhttp=xmlhttp;
  if (!MS)
    xmlhttp.send(null);
  else{
    xmlhttp.send();
  }

  return xmlhttp;
}

