function Basket(id, action, color, count) {
    var req = new JsHttpRequest();
    req.onreadystatechange = function() {
        if (req.readyState == 4) {                       
             document.getElementById('basket').innerHTML = req.responseText;
         } 
    }
    req.open(null, '/open_scripts/basket.php', true);
    req.send( { id: id, action: action, color: color, count: count } );
    if (action == 'add') {
    	setTimeout("basket_window('/open_scripts/basket_window.php', '')", 1000);
    }
}