function xmlhttpPost(strURL, id) {
    var xmlHttpReq = false;
    var self = this;
		
        
        var quantity_new = 1;
        var quantity = 1;
    // 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, id, quantity_new);            
        }
    }
    self.xmlHttpReq.send(getquerystring(id, quantity));
}

function getquerystring(id, quantity) {
    qstr = 'id=' + escape(id) + '&quantity=' + escape(quantity);  // NOTE: no '?' before querystring
    return qstr;
}

function updatepage(str, id, quantity_new){
		
    document.getElementById("out_basket").innerHTML = str;
    document.getElementById("order_"+id).innerHTML = "<div><a href='/basket/' style='color:#2E6399;font-size:12px;'>В корзине</a></div>";
}
