	function mod(div, base)
	{
	return Math.round(div - (Math.floor(div/base)*base));
	}

	function calcBmi()
	{
	var b = document.beslim.Breakfast.value * 2;
	var e = document.beslim.Exercise.value *2;
	var s = document.beslim.Support.value *2;
	var m = document.beslim.Meals.value *2;
	var p = document.beslim.Plan.value *1;
	var r = document.beslim.Monitor.value *1;
	displaybmi = b + e + s + m + p + r;
	var rvalue = true;
	if ( (displaybmi <= 1) || (displaybmi >= 101) )
	{
	alert("Please enter a number no higher than 10 for each item.");
	rvalue = false;
	}
	if (rvalue)
	{
	if (displaybmi >=90 && displaybmi <=100) 
		document.beslim.comment.value = "A Prescription for Life - great probability of long-term success";
	if (displaybmi >=80 && displaybmi <=89)
		document.beslim.comment.value = "Somewhat Healthy Lifestyle - needs improvements to prevent weight regain";
	if (displaybmi >=70 && displaybmi <=79) 
		document.beslim.comment.value = "Fair Lifestyle - will probably regain weight unless there's improvement";
	if (displaybmi >=60 && displaybmi <=69) 
		document.beslim.comment.value = "Sub-Optimal Lifestyle - will gain the weight back and is headed towards poor health";
	if (displaybmi <60) 
		document.beslim.comment.value = "Unhealthy Lifestyle - lacks the behaviors to maintain a healthy weight and either is already unhealthy or will be soon";
	document.beslim.answer.value = displaybmi;
	}
	return rvalue;
	}