<script language="JavaScript">
function zat()
{ var d=document
var k=0
k += Number(eval("summa.forma.options[summa.forma.selectedIndex]").value);
return k
}
function cena (obj){
var a1=1*obj.iz1.value
var a2=1*obj.iz2.value;
var a3=1*obj.norma.value;
var a4=1*obj.gos.value;
var a5=1*obj.proc.value;
var a6=100;
var a7=10;
var a8=1*obj.result.value;
var a11=0;
var h=a2*a6/a3/2/100;
var s=((a8*h)+(a2/a3)*a4*(a5/a6)-(a1/a7))
if (s<a11){s=a11}
var ss=Math.round(s*100)/100;
obj.res.value=ss
}
</script>
<form name="summa">
<table border="0" class="txt" align="center" cellspacing="2" cellpadding="2"><tbody><tr><td align="center" class="mb12"><b>Описание товара</b></td><td align="center"><b><br></b></td></tr><tr><td class="mb11">
<table border="0" cellspacing="2" cellpadding="2" class="txt">
<tbody><tr><td><b>Заточка:</b></td><td align="RIGHT">
<select name="forma" onchange="summa.result.value=zat()"><option value="0">нет
<option value="20">+1
<option value="40">+2
<option value="80">+3
<option value="160">+4
<option value="320">+5
</select>
<input type="hidden" name="result" size="10" value="0">
</td><td></td><td></td>
<tr><td><b>Износ:</b></td>
<td align="RIGHT"><input class="tab" type="text" size="2" name="iz1" maxlength="3" onblur="if (value == '') {value='0'}" onfocus="if (value == '0') {value =''}" value="0"></td>
<td align="CENTER"><b>/</b></td>
<td align="LEFT"><input class="tab" type="text" size="2" name="iz2" maxlength="3" onblur="if (value == '') {value='0'}" onfocus="if (value == '0') {value =''}" value="0"></td>
<tr><td><b>Идеальное состояние:</b></td><td align="RIGHT"><b>0</b></td><td align="CENTER"><b>/</b></td><td align="LEFT"><input class="tab" type="text" size="2" name="norma" maxlength="3" onblur="if (value == '') {value='0'}" onfocus="if (value == '0') {value =''}" value="0"></td></tr>
<tr><td><b>Гос. цена:</b></td><td align="RIGHT"><input class="tab" type="text" size="2" name="gos" maxlength="3" onblur="if (value == '') {value='0'}" onfocus="if (value == '0') {value =''}" value="0"></td>
<td></td><td><b>кр.</b></td></tr>
<tr><td><b>Процентная ставка:</b></td><td align="RIGHT"><input class="tab" type="text" size="1" name="proc" maxlength="2" onblur="if (value == '') {value='50'}" onfocus="if (value == '50') {value =''}" value="50"></td><td></td><td><b>%</b></td></tr>
<tr><td><b>Итого:</b></td><td align="RIGHT"><input class="tab" type="text" size="6" name="res" maxlength="6" value="0"></td><td></td><td><b>кр.</b></td></tr>
<tr><td colspan="2" align="RIGHT"><input class="bottom" type="button" onclick="cena (summa)" value="Посчитать"></td>
<td colspan="2" align="RIGHT"><input class="bottom" type="reset" value="очистить"></td>
</tr></tbody></table>
<td valign="TOP" class="mb13"><b></b><font class="red"><br></font></td></tr></tbody></table>
<table cellpadding="0" cellspacing="0" border="0" width="610"><tbody><tr><td height="1"><tr><td></td></tr></tbody></table>