function xmlhttpPost(nid) {
    var strURL = '/add_one_to_cart';
	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(nid));
}

function getquerystring(nid) {
	nid = 'w=' + escape(nid);
    return nid;
}

function updatepage(str){
	eval(str);
	//document.getElementById('i_cols').innerHTML = ' '+ tot_cnt +' items ';
	//window.alert(col_dob+" item was added");
	window.location = "/cart";
}