function xmlhttpPost(loc, camp, strURL) {

    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(loc, self.xmlHttpReq.responseText);
                
       
        } else updatepage(loc, '<img style="float:left;" src="images/ajax-loader.gif" border="0" ></img>');
    }

    self.xmlHttpReq.send(getquerystring(camp));
}

function getquerystring(camp) {

    var form     = document.forms['formular'];
    var word = form[camp].value;

    qstr = 'w=' + escape(word);  // NOTE: no '?' before querystring
        
    return qstr;
}

function updatepage(loc, str){
    document.getElementById(loc).innerHTML = str;
}
