
function setPrice(positive, id, upd)
{
    var curr = document.getElementById(id).value;
    if(positive)
    {
        var tmp = parseInt(curr) + parseInt(upd);
        document.getElementById(id).value = tmp;
    }
    else
    {
        var tmp = parseInt(curr) - parseInt(upd);
        if(tmp < upd)
            tmp = upd;
        document.getElementById(id).value = tmp;
    }

}
