var basket_in_use=false;
japano.getText("./index.php?action=readbasket&rnd="+Math.random(),readbasket_cbf, {},true);

function basket_cbf(result)
{
  japano.getText("./index.php?action=readbasket&rnd="+Math.random(),readbasket_cbf, {},true);
}

function readbasket_cbf(result)
{ 
  out_buff=unescape(japano.dump(result)).replace(/\+/gmi,' ');
  d_basket.innerHTML=out_buff;
  basket_in_use=false;
}


function addbasket(box,ind)
{	
	if (basket_in_use==true){return;}
	basket_in_use=true;
	d_basket.innerHTML="обработка запроса....";
	if (box.checked)
	{
	japano.getText("./index.php?action=addbasket&id="+ind+"&rnd="+Math.random(),basket_cbf, {},true);	
	}else{
	japano.getText("./index.php?action=delbasket&id="+ind+"&rnd="+Math.random(),basket_cbf, {},true);	
	}

}

function cleanbasket()
{	
	
	if (basket_in_use==true){return;}
	basket_in_use=true;
	
	japano.getText("./index.php?action=cleanbasket&rnd="+Math.random(),basket_cbf, {},true);	
	d_basket.innerHTML="обработка запроса....";
}
