function CalculateOnTheFly(obj)
{
var boxnum = document.calories.total.length;
var current = new Number(document.calories.total[0].value);
for(var i = 0;i<boxnum;i++){
	if (obj.checked == true )
		{
		document.calories.total[i].value  = current + new Number(obj.value);
		}
	else
		{
		document.calories.total[i].value  = current - new Number(obj.value);
		}
		} // for end
current=0;
}

function CalculateCalories()
{
var ycount = document.calories.yemek.length; 
var total = 0;
for(i=0 ; i< ycount ; i++)
	{
		if(document.calories.yemek[i].checked ==true)
		{
			total = new Number(total) + new Number(document.calories.yemek[i].value);
		}	
		 
	}
	document.calories.total.value  = total; 
	document.calories.total1.value  = total;
s}
function ClearAll()
{
var ycount = document.calories.yemek.length; 
	for(i=0 ; i< ycount ; i++)
		document.calories.yemek[i].checked = false;
document.calories.total.value  = 0; 
document.calories.total1.value  = 0;
}

function iskilo()
{
dc = document.calories;
var simdi ;
if (dc.weight.value == "") {	simdi = prompt("Kilonuzu belirtmelisiniz ?" , "");
if (simdi == null || simdi == ""){return false;}else{dc.weight.value = simdi ; return true;	}} else {return true;}
}