function rez(i) { var val1 = parseInt(document.kalk['k_3_'+i].value); var val2 = parseInt(document.kalk['k_4_'+i].value); var val3 = val1 * val2; document.kalk['k_6_'+i].value = val3; }