// variables used in calculateVo2max()
var restingPuls = 0;
var maximumPuls = 0;
var vo2max = 0;
var fitnessRating = 0;
var bodyWeight = 0;

// calculateMaxPuls()
// 2007-09-14
// Constructed - i.e.söderblom
function calculateVo2max()
{
	restingPuls = eval(document.FormVo2max.restingPuls.value);
	maximumPuls = eval(document.FormVo2max.maximumPuls.value);
	bodyWeight = eval(document.FormVo2max.bodyWeight.value);

	fitnessRating = (15 * maximumPuls) / restingPuls;
	vo2max = fitnessRating * bodyWeight;
	vo2max = vo2max / 10;
	vo2max = Math.round(vo2max);

	document.FormVo2max.vo2max.value = vo2max / 100;
	document.FormVo2max.fitnessRating.value = Math.round(fitnessRating);
}

