function xmlhttpPost(strURL, divId, params, queString) {
    queString = queString ? queString : 'dumb';
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlHttpReq.open('POST', strURL, true);
    xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    xmlHttpReq.onreadystatechange = function() {
        if (xmlHttpReq.readyState == 4) {//complete
            updatepage(xmlHttpReq.responseText, divId);
        }else if(xmlHttpReq.readyState == 1){ //loading
            updatepage('<div style="padding:3px;"><div style="float:left"><img src="/content/img/indicators/mz_blue.gif" height="16px" width="16px" alt="Loading.."/></div><div style="float:left;padding-left:5px;">Loading..</div><div class="clear"></div></div>',divId)
        }
    }
    if(params){
        xmlHttpReq.send(getquerystring(params));
    }else{
        xmlHttpReq.send(queString);
    }
    
}

function getquerystring(params) {
    var qstr = '';
    for(i=0; i<params.length; i++){
        if(param = document.getElementById(params[i]))
        qstr += params[i] + '=' + escape(param.value) + '&' ;
    }
    return qstr;
}

function updatepage(str, divId){
    document.getElementById(divId).innerHTML = str;
}