// JavaScript Document
<!-- Begin
function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win1 = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win1.window.focus(); }
}
//  End -->

<!-- Begin
function monthPage() {
today = new Date();
m = new Array(
"jan.html","feb.html",
"mar.html","apr.html","may.html",
"jun.html","jul.html","aug.html",
"sep.html","oct.html",
"nov.html","dec.html"
);
window.location = m[today.getMonth()];
}
//  End -->
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->

<!--
function calcHeight()
{
  //find the height of the internal page
  var the_height=
    document.getElementById('frame').contentWindow.
      document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('frame').height=
      the_height;
}
//-->
<!--
function showhide(id){ 
if (document.getElementById){ 
obj = document.getElementById(id); 
if (obj.style.display == "none"){ 
obj.style.display = ""; 
} else { 
obj.style.display = "none"; 
} 
} 
} 
// -->
<!--
function change(id) {

document.getElementById('dd').className='white';document.getElementById('jl').className='white';document.getElementById('kw').className='white';document.getElementById('ea').className='white';document.getElementById('dm').className='white';document.getElementById('df').className='white';document.getElementById('lb').className='white';document.getElementById('km').className='white';document.getElementById('ac').className='white';

document.getElementById(id).className='highlight';

}
// -->
<!-- ImageReady Preload Script (bmbsinfo.psd) -->
<!--

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		bmbsinfo_05_bmbsinfo_02_over = newImage("bmbsinfoimages/bmbsinfo_05-bmbsinfo_02_ove.jpg");
		bmbsinfo_05_bmbsinfo_03_over = newImage("bmbsinfoimages/bmbsinfo_05-bmbsinfo_03_ove.jpg");
		bmbsinfo_05_bmbsinfo_04_over = newImage("bmbsinfoimages/bmbsinfo_05-bmbsinfo_04_ove.jpg");
		bmbsinfo_05_bmbsinfo_01_over = newImage("bmbsinfoimages/bmbsinfo_05-bmbsinfo_01_ove.jpg");
		preloadFlag = true;
	}
}

// -->
<!-- Begin
function mod(div,base) {
return Math.round(div - (Math.floor(div/base)*base));
}
function calcBmi() {
var w = document.bmi.weight.value * 1;
var HeightFeetInt = document.bmi.htf.value * 1;
var HeightInchesInt = document.bmi.hti.value * 1;
HeightFeetConvert = HeightFeetInt * 12;
h = HeightFeetConvert + HeightInchesInt;
displaybmi = (Math.round((w * 703) / (h * h)));
var rvalue = true;
if ( (w <= 35) || (w >= 500)  || (h <= 48) || (h >= 120) ) {
alert ("Invalid data.  Please check and re-enter!");
rvalue = false;
}
if (rvalue) {
if (HeightInchesInt > 11) {
reminderinches = mod(HeightInchesInt,12);
document.bmi.hti.value = reminderinches;
document.bmi.htf.value = HeightFeetInt + 
((HeightInchesInt - reminderinches)/12);
document.bmi.answer.value = displaybmi;
}
if (displaybmi <19) 
document.bmi.comment.value = "Underweight";
if (displaybmi >=19 && displaybmi <=25) 
document.bmi.comment.value = "Desirable";
if (displaybmi >=26 && displaybmi <=29) 
document.bmi.comment.value = "prone to health risks";
if (displaybmi >=30 && displaybmi <=40) 
document.bmi.comment.value = "Obese";
if (displaybmi >40) 
document.bmi.comment.value = "Extremely obese";
document.bmi.answer.value = displaybmi; }
return rvalue;
}
//  End -->

