function calculate()
{
	var height = document.getElementById("height").value;

	var weight;
	if ( document.getElementById("gender").value == "male" )
		weight = ( height - 60 ) * 6 + 106;
	else
		weight = ( height - 60 ) * 5 + 100;

	var frame1 = Math.round(weight * 1.1);
	var frame2 = Math.round(weight * .9);

	var inches = height % 12;
	var feet = ( height - inches ) / 12;

	var results = "As a " + feet + "'" + inches + "\" " + document.getElementById("gender").value + ", your ideal weight is <span style='color:red'>" + weight + " lbs</span>. Depending on how big your body frame is, your ideal weight could vary between " + frame2 + " lbs and " + frame1 + " lbs."  



	x = document.getElementById("results");
	x.innerHTML = results;
	x.style.display = "block";
}


