function getCheckedValue(radioObj) {
    if(!radioObj)
        return "";
    var radioLength = radioObj.length;
    if(radioLength == undefined)
        if(radioObj.checked)
            return radioObj.value;
        else
            return "";
    for(var i = 0; i < radioLength; i++) {
        if(radioObj[i].checked) {
            return radioObj[i].value;
        }
    }
    return "";   
}


function send_to_backet(menu_id,priceAndVolume,selectedCategory,lang) {
    
    var url = '?id='+menu_id+'&add_product_id='+priceAndVolume+'&cat='+selectedCategory+'&lang='+lang; 
    
    var color = document.forms["for_color"].elements["color"];
    var color_value = getCheckedValue(color);
    if (color_value) {
        url = url + '&color=' + color_value;    
    }

    document.location.href=url;
}