function getHttpObject() {
  var xmlhttp;
  if (window.ActiveXObject){
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e){
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E){
        xmlhttp = false;
      }
    }
  }else if (window.XMLHttpRequest) {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}

function addListener(obj, eventType, func, cap){
  if(obj.attachEvent){
    obj.attachEvent('on' + eventType, func);
  }else if(obj.addEventListener){
    obj.addEventListener(eventType, func, cap);
  }else {
    alert('No support on your Browser');
    return false;
  }
}
