var save;

function OrderChangeDown(th,i)
{
save = th.value;
}

function OrderChangeUp(th,i)
{
	if(isNaN(eval(th.value))||(eval(th.value<=0))||	(eval('parseInt(th.value) != parseFloat(th.value)'))	   )
		eval('th.value = '+save);
	
	while(eval('th.value').charAt(0)=='0')
		eval('th.value = th.value.substr(1)');

	eval('trash.total.value =parseFloat(trash.total.value)- parseFloat(trash.suma'+i+'.value)');
	eval('trash.suma'+i+'.value = parseFloat(trash.price'+i+'.value) * parseInt(th.value)');
	eval('trash.total.value =parseFloat(trash.total.value)+ parseFloat(trash.suma'+i+'.value)');
//	if(!isNaN(parseFloat(orderform.totalhrn.value))) orderform.zntotal.value=parseFloat(orderform.totalhrn.value)-parseFloat(orderform.totalhrn.value)*10/100;
}
