function hideObj(obj) {    if ( document.getElementById )    {        document.getElementById( obj ).style.display = "none";    }    else    if ( document.all )    {        document.all[obj].style.display = "none";    }}function showObj(obj) {  if (document.getElementById)    {document.getElementById(obj).style.display = "block";}  else    {if (document.all)       {document.all[obj].style.display = "block";}    }}function callToggleUnitTables( theObj ) {	if ( theObj.value == 'M' )	{		hideObj( 'DIVImperialWeight' ) ;		showObj( 'DIVMetricsWeight' ) ;		hideObj( 'DIVImperialHeight' ) ;		showObj( 'DIVMetricsHeight' ) ;	}	else	{		hideObj( 'DIVMetricsWeight' ) ;		showObj( 'DIVImperialWeight' ) ;		hideObj( 'DIVMetricsHeight' ) ;		showObj( 'DIVImperialHeight' ) ;	}}function hideAll_BMI_Paragraphs( ){		hideObj( 'PBMIResultsExtremelyObese' ) ;		hideObj( 'PBMIResultsVeryObese' ) ;		hideObj( 'PBMIResultsObese' ) ;		hideObj( 'PBMIResultsOverweight' ) ;		hideObj( 'PBMIResultsNormalWeight' ) ;		hideObj( 'PBMIResultsUnderweight' ) ;}function doCalculateBMI( ){// BMI Calculations:// 		 metrics: KG / ( M * M ) ... 		 68 \u00F7 (1.65)2 = 24.98// 		 imperical: ( Pounds / ( Inches * Inches ) * 703 ) ...( [150 \u00F7 (65)2] x 703 = 24.96		 var doc = document.forms[0] ;		 if ( doc.bmiUnitType[0].checked )		 {		 		 // Metric calculations		 		 var Kilograms = getFieldValue( doc.bmiKilograms , 'select' ) ;		 		 var Centimetres = eval( getFieldValue( doc.bmiCentimetres , 'select' ) ) / 100 ;  /* converted to Metres */		 		 var BMI_prov = ( Kilograms / ( Centimetres * Centimetres ) ) ;		 }		 else		 {		 		 // Imperial calculations		 		 var Stones = getFieldValue( doc.bmiStones , 'select' ) ;		 		 var Pounds = getFieldValue( doc.bmiPounds , 'select' ) ;		 		 var WeightI = eval( Stones * 14 ) + eval( Pounds ) ;		 		 		 		 var Feet = getFieldValue( doc.bmiFeet, 'select' ) ;		 		 var Inches = getFieldValue( doc.bmiInches , 'select' ) ;		 		 var HeightI = eval( Feet * 12 ) + eval( Inches ) ;		 		 		 		 		 var BMI_prov = ( WeightI  / ( HeightI * HeightI ) ) * 703 ;		 }		 var BMI_final = Math.round( BMI_prov * 10 ) / 10 ;		 doc.bmiResults.value = BMI_final ;//		document.getElementById('PBMIResults').innerHTML = "result's message appears here"		hideAll_BMI_Paragraphs( )		if ( BMI_final < 18.5 )		{			showObj( 'PBMIResultsUnderweight' ) ;		}		else if ( BMI_final < 25 ) 		{			showObj( 'PBMIResultsNormalWeight' ) ;		}		else if ( BMI_final < 30 ) 		{			showObj( 'PBMIResultsOverweight' ) ;		}		else if ( BMI_final < 35 ) 		{			showObj( 'PBMIResultsObese' ) ;		}		else if ( BMI_final < 40) 		{			showObj( 'PBMIResultsVeryObese' ) ;		}		else		{			showObj( 'PBMIResultsExtremelyObese' ) ;		}}
