
function xmlhttpPost(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(self.xmlHttpReq.responseText);
        }
    }
    self.xmlHttpReq.send(getquerystring());
}
//---------------------------- post the quary string ------------------------------- 
function getquerystring() {
    var price = document.forms['frm'].price.value;
    var currency_pre = document.forms['frm'].currency_pre.value;
    var currency_post = document.forms['frm'].price_currency.value;

    qstr = 'price=' + escape(price) + '&currency_pre=' + escape(currency_pre)+ '&currency_post=' + escape(currency_post);  // NOTE: no '?' before querystring
     //  qstr="";
     //alert(qstr);
    return qstr;
}
//--------------------------- div id to change ----------------------------
function updatepage(str){
	//alert(str);
    document.getElementById("show_rate").innerHTML = str;
}

