
var xmlHttp;
function createXMLHttpRequest() {
      if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
       } else  if (window.XMLHttpRequest) {
            xmlHttp = new XMLHttpRequest();
        }
   
 }

function sendMessage(userID, userName, regNo, ip) {
    createXMLHttpRequest();
    var u = "userID=" + userID + "&userName=" + userName + "&regNo=" + regNo + "&ip=" + ip;
    var url = "http://www.qutu.com/countServlet?" + u;
    alert(url);
    xmlHttp.open("GET", url, true);
    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange = callback;
    xmlHttp.send(null);
}
function callback() {
    if (xmlHttp.readyState == 4) {
        if (xmlHttp.status == 200) {
        }
    }
}
function sendMessage(userID, userName, regNo, ip, time_size, time_unit) {
    createXMLHttpRequest();
    var u = "userID=" + userID + "&userName=" + userName + "&regNo=" + regNo + "&time_size=" + time_size + "&time_unit=" + time_unit + "&ip=" + ip;
    var url = "/countServlet?" + u;
    xmlHttp.open("GET", url, true);
    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange = callback;
    xmlHttp.send(null);
}

function countSearchClickStat(click_place, put_person) {
    createXMLHttpRequest();
    var u = "click_place=" + click_place + "&put_person=" +put_person;
    var url = "/getSearchClickStat.jsp?" + u;
	//var url = "http://www.qutu.com/getSearchClickStat.jsp?" + u;
   
    xmlHttp.open("GET", url, true);
    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xmlHttp.onreadystatechange = callback;
    xmlHttp.send(null);
}
