        function http() {
          var http;
          if (window.XMLHttpRequest) {
            http = new XMLHttpRequest();
          } else if (window.ActiveXObject) {
            var avers = ["Microsoft.XmlHttp", "MSXML2.XmlHttp", "MSXML2.XmlHttp.3.0",  "MSXML2.XmlHttp.4.0", "MSXML2.XmlHttp.5.0"];
            for (var i = avers.length -1; i >= 0; i--) {
              http = new ActiveXObject(avers[i]);
            }
          }
          return http;
        }

        function httpMod(http) {
          http.setRequestHeader("Connection", "close");
          http.setRequestHeader("Pragma", "no-cache");
          http.setRequestHeader("Cache-Control", "must-revalidate");
          http.setRequestHeader("If-Modified-Since", document.lastModified);
          return http;
        }





        function AJAXmonitor(ID){
          var host = location.host;
          var page = location.pathname;
          var req = http();
          req.open("GET", 'http://'+host+'/include/ajax/userlogger.php?ID='+ID+'&width='+screen.width+'&height='+screen.height+'&color='+screen.colorDepth, true);
          req = httpMod(req);
          req.send(null);
        }

        function AJAXevent(event,obj){
          var host = location.host;
          var page = location.pathname;
          var e = ['', 'Load', 'Unload', 'Click', ''];
          var z = '';
          try {z += '|'+obj.href;} catch (failed){  }
          try {z += '|'+obj.target;} catch (failed){  }
          try {z = z.replace('http://'+document.location.hostname+'/','');} catch (failed){  }
          try {z = z.replace(/([\|]*[#][\|]*$)|([\|]*$)/g,'');} catch (failed){  }
          var req = http();
          req.open("GET", 'http://'+host+'/include/ajax/userlogger.php?page='+page+'&event='+e[event]+z, true);
          req = httpMod(req);
          req.send(null);
        }
