... ph=document.getElementById('kol-vo').value; value=document.getElementById('kol-vo').value-1; if(value>=4) mat=ph*700; if(value<=3) mat=ph*500; ...