var cur_hind = 0;
var pplaces = 0;
var pgame = 0;
var inited = 0;
function initvars()
{
  inited = 1;
  pplaces = parseInt(document.getElementById("v_pplaces").value);
  pgame = parseInt(document.getElementById("v_pgame").value);
  cur_hind = parseInt(document.getElementById("v_price").value);
  cur_hind = cur_hind - pgame;
  cur_hind = cur_hind - pplaces;
}
function setprice2(i)
{
  if(!inited)
    initvars();
  cur_hind += i;
  document.getElementById("hind").innerHTML = cur_hind;
  document.getElementById("price").value = cur_hind;
}
function setprice(i, o)
{
  if(!o.checked)
    i = -i;
  setprice2(i);
}
