
function xmlhttpPost(strURL,ff1,G_ID,msg) {
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', strURL, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText,ff1);
        }
    }
    self.xmlHttpReq.send(getquerystring(G_ID,msg));
}

function getquerystring(G_ID,msg) {
    qstr = G_ID;  // NOTE: no '?' before querystring
    if(msg)
	qstr=qstr+'&mess='+escape(msg);
    return qstr;
//    alert(msg);
}
function updatepage(str,ff1){
    document.getElementById(ff1).innerHTML = str;
}
