function calcBMI() {
	var chart = $('VBBMIChart1');
	var indicator = $('imgBMIIndicator1');
	//var gender = $('VBBMICalcGender1').options[$('VBBMICalcGender1').selectedIndex].value;
	var gender = 1;
	var weight = parseInt($('VBBMICalcWeight1').value);
	//var heightInInches = parseInt($('VBBMICalcHeightFeet1').value) * 12 + parseInt($('VBBMICalcHeightInches1').value);
	var heightInInches = parseInt($('VBBMICalcHeightFeet1').value)/100;
	
	//alert((heightInInches));
	if (!isNaN(weight) && !isNaN(heightInInches)) {
		//var bmi = parseInt((weight / (heightInInches * heightInInches)) * 703);
		var bmi = parseFloat((weight / (heightInInches * heightInInches)));
		$('VBBMI1').innerHTML = bmi.toFixed(1);
		$('inputBmi').value = bmi.toFixed(1);
		var x = 0;
		if (gender == 1) {
			if (bmi<=18.5) {x=20+(bmi-0)/18.5*128;}else
			if (bmi<=23) {x=148+(bmi-18.5)/(24.9-18.5)*157;}else
			if (bmi<=27.5) {x=305+(bmi-23)/(30-23)*155;}else
			if (bmi<=32.5) {x=460+(bmi-27.5)/(40-27.5)*125;}else
			{x=585;}
			/*if (bmi < 18.5) { x = 70 + ((100 / 15) * (bmi - 0)); }
			else if (bmi < 22.9) { x = 194 + ((100 / 3) * (bmi - 18.5)); }
			else if (bmi < 27.4) { x = 343 + ((100 / 3) * (bmi - 22.9)); }
			else { x = 500 + ((100 / 14.6) * (bmi - 22.9)); }*/
			//if (bmi < 20.7) { x = 0 + ((100 / 20.7) * (bmi - 0)); }
			//else if (bmi < 26.4) { x = 100 + ((100 / 5.7) * (bmi - 20.7)); }
			//else if (bmi < 27.8) { x = 200 + ((100 / 1.4) * (bmi - 26.4)); }
			//else if (bmi < 31.1) { x = 300 + ((100 / 3.3) * (bmi - 27.8)); }
			//else if (bmi < 45.4) { x = 400 + ((100 / 14.3) * (bmi - 31.1)); }
			//else { x = 500 + ((100 / 14.6) * (bmi - 45.4)); }
		} else {
			if (bmi < 19.1) { x = 0 + ((100 / 19.1) * (bmi - 0)); }
			else if (bmi < 25.8) { x = 100 + ((100 / 6.7) * (bmi - 19.1)); }
			else if (bmi < 27.3) { x = 200 + ((100 / 1.5) * (bmi - 25.8)); }
			else if (bmi < 32.3) { x = 300 + ((100 / 5) * (bmi - 27.3)); }
			else if (bmi < 44.8) { x = 400 + ((100 / 12.5) * (bmi - 32.3)); }
			else { x = 500 + ((100 / 15.2) * (bmi - 44.8)); }
		}
		//alert(x);
		//x = x >= 647 ? 647 : x;
		//indicator.style.left = (x - 52) + 'px';
		indicator.style.left = (x) + 'px';
		indicator.show();
		chart.show();
		//alert("bmi="+bmi+";x="+indicator.style.left+";hitung="+((bmi-24.9)/(30-24.9)*165));
	} else {
		$('VBBMI1').innerHTML = '';
		indicator.style.left = '0px';
		chart.hide();
		indicator.hide();
	}
	return false;
}
