
var last;
  function sm(num)
     {       
       if (last) last.display='none';
       if(!document.getElementById('sm'+num)) return;
       st=document.getElementById('sm'+num).style;
       st.display=st.display=='block'?'none':'block';
       last=st;
     } 

function loaded (num) {
	sm(num);
}

function del(num) {
	document.getElementById('cnt_'+num).value=0;
	document.bform.submit();
}

function buy (id) {
	window.location.href = "/buy/"+id+"/";
}