	
function reCalc(newKM)
	{
	recipes.newKM.value=newKM;
	
	var totML;
	totML=0;
	var iX;
	iX = recipes.ixx.value;	

	for(var i=1 ; i< parseInt(iX) ; i++)
		{
		var prSel;
		var	prQty;
		eval('prSel = document.getElementById("prod' + i + '").className;');
		if (prSel == 'Selected')
			{			
			eval('prQty = recipes.qty' + i + '.value;');
			totML = totML + parseFloat(prQty);
			}	
		}
	
	if (totML > 0)
		{
		recipes.prodOld_calc.value=totML;
		if (recipes.newQty.value != '')
			recipes.submit();
		else
			{
			alert('Внесите нужное КОЛИЧЕСТВО, затем щелкните на подходящую меру объема.');
			recipes.newQty.select();
			}
		}
	else
		alert('Вначале щелкните на ПРОДУКТ(-Ы), общее количество которого(-ых) надо пересчитать!');
	}
	
function unSellProd()
	{
	var iX;
	iX = recipes.ixx.value;	
		
	for(var i=1 ; i< parseInt(iX) ; i++)
		eval('recipes.pr'+i+'.checked = false;');
		
	recipes.prodOld_calc.value=0;	
	recipes.newQty.value='';
		
	}	




