function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
}



function screening() {
	var checkCounter = 0;
	var screeningMesg;
	document.getElementById("screening-score").style.display = "block";
	for (var i=1; i<=9; i++) {
		if (document.getElementById("check" + i).checked == true) {
			checkCounter++;
		}
	}
	if (checkCounter < 8) {
		document.getElementById("screening-mesg").innerHTML = "If you left one or more boxes blank, you may want to talk to your doctor about your diabetes risk and what you might be able to do to minimize it.";
	} else {
		document.getElementById("screening-mesg").innerHTML  = "Congratulations! Your risk for diabetes is probably low." ;	
	}
}


/*  CALCULATE BMI  */
function calcEnglish(form, feet, inches, pounds) {
   if ((! inches) || isNaN(inches)){
	   inches = 0;
   }
   
   if ((pounds <= 0) || isNaN(pounds)){
	   alert ('Please enter your weight.');
	   return false;
   }
   
      if (((inches <= 0) || isNaN(inches)) && ((feet <= 0) || isNaN(feet))){
	   alert ('Please enter your height.');
	   return false;
   }
   
   TotalInches = eval(feet*12) + eval(inches)
   form.calcval.value = Math.round(pounds * 703 * 10 / TotalInches / TotalInches) / 10
   return false;
}

function calcMetric(form, meters, kilograms) {
	if ((kilograms <= 0) || isNaN(kilograms)){
		alert ('Please enter your weight.');
		return false;
	}
	if ((meters <= 0) || isNaN(meters)){
		alert ('Please enter your height.');
		return false;
	}

	form.calcval.value = Math.round(kilograms * 10 / meters / meters) / 10
}

