function display(sex,age,weight,feet,inches,activity) {
	height=12*feet + 1.0*inches;
	
	if (sex=="m" || sex =="M")
	{
		A = 9.72 * age;
		B = 864 - A;
		C = weight * 6.46;
		D= height * 12.8;
		E = C + D;
		if (activity=="sedentary"){
			F = 1 * E;
			activity = "Sedentary";
		}
		else if (activity=="low_activity"){
			F = 1.12 * E;
			activity = "Low Activity";
		}	
		else if (activity=="active"){
			F = 1.27 * E;
			activity = "Active";
		}	
		else if (activity=="very_active"){
			F = 1.54 * E;
			activity = "Very Active";
		}	
		target = Math.round(B + F);
		//alert ("Calorie Target = " + target)
		document.write("<html><body bgcolor=#ffffff><center><table width=600><tr><td><font face='Comic Sans MS' Color=black size=6><h1>Calorie Target</h1></font><font face='Comic Sans MS' Color=black size=5>" +"For a man that weighs " + weight + " pounds <br>and is " + feet + " feet " + inches + " inches <br> with an activity level of " + activity + ", <br>your calorie target is " + "<font color=red>" + target + " calories</font> per day.</center><p><font face='arial' size=3><a href=javascript:onClick=history.back();>Return</a></font></td></tr></table></center></body></html>");
	}
	else if (sex == "f" || sex == "F")
	{
		A= 7.31 * age;
		B = 387 - A;
		C = weight * 4.95;
		D = height * 16.78;
		E = C + D;
		if (activity == "sedentary"){
			F = 1 * E;
			activity = "Sedentary";
		}
		else if (activity=="low_activity"){
			F = 1.14 * E;
			activity = "Low Activity";
		}	
		else if (activity=="active"){
			F = 1.27 * E;
			activity = "Active";
		}	
		else if (activity=="very_active"){
			F = 1.45 * E;
			activity = "Very Active";
		}	
		target = Math.round(B + F);
		//alert ("Calorie Target = " + target)
		document.write("<html><body bgcolor=#ffffff><center><table width=600><tr><td><font face='Comic Sans MS' Color=black size=6><h1>Calorie Target</h1></font><font face='Comic Sans MS' Color=black size=5>" +"For a woman that weighs " + weight + " pounds <br>and is " + feet + " feet " + inches + " inches <br> with an activity level of " + activity + ", <br>your calorie target is " + "<font color=red>" + target + " calories</font> per day.</center><p><font face='arial' size=3><a href=javascript:onClick=history.back();>Return</a></font></td></tr></table></center></body></html>");
	}
	else alert("Error in Sex input box")
}