JavaScript calculation of BMI and BMR