var BMI;var strBMI;function square(number){return number*number;}function CalculateBMI(){var tmpobjFeet=document.getElementById('selFeet');var tmpobjInches=document.getElementById('selInches');var tmpobjWeight=document.getElementById('selWeight');var tmpobjdivBMI=document.getElementById('divBMI');var tmpobjspnBMI=document.getElementById('spnBMI');var intFeet=parseInt(tmpobjFeet.value);var intInches=parseInt(tmpobjInches.value);var intWeight=parseInt(tmpobjWeight.value);BMI=Math.round(((intWeight/square(((intFeet*12)+intInches)))*703)*10)/10;$("#tblBMI1").fadeOut("slow",function(){tmpobjspnBMI.innerHTML=BMI;if(BMI<18.5){tmpobjdivBMI.style.color='red';tmpobjdivBMI.innerHTML='Underweight';strBMI='Underweight';}if(BMI>18.4&&BMI<25){tmpobjdivBMI.style.color='green';tmpobjdivBMI.innerHTML='Normal';strBMI='Normal';}if(BMI>24.9&&BMI<30){tmpobjdivBMI.style.color='red';tmpobjdivBMI.innerHTML='Overweight';strBMI='Overweight';}if(BMI>29.9){tmpobjdivBMI.style.color='red';tmpobjdivBMI.innerHTML='Obese';strBMI='Obese';}$("#tblBMI").fadeIn("slow");});}function CalculateAgain1(){$("#tblBMI").fadeOut("slow",function(){$("#tblBMI1").fadeIn("slow");});}
