//HIGHLIGHTS INPUT AND TEXT FIELDS

function btn(btnme){
	if(btnme !=''){
		window.document.getElementById(btnme).style.backgroundColor = '#ff0000';
		window.document.getElementById(btnme).style.color = '#fff';
		}
	}


//ADJUSTS DISPLAY PROPERTY BY ID
function onoff(objid,val)
	{
	window.document.getElementById(objid).style.display = val;
	}

//==========================

function cHeight(){
	if (window.document.getElementById('HeightFEET').value == '' || window.document.getElementById('HeightINCHES').value == '')
		{
		alert('Please complete your height in feet and inches')
		}else{
		heightInFresult = window.document.getElementById('HeightFEET').value*12;
		heightInIresult = window.document.getElementById('HeightINCHES').value;
		Htotal1 = ((parseInt(heightInFresult)+parseInt(heightInIresult))/39.37).toFixed(2);
		window.document.getElementById('HeightInM').value = Htotal1;
		window.document.getElementById('HeightInCM').value = Htotal1*100;
		if (Htotal1 == '2.41')
			{
			alert("Don't be silly.  No-one's that tall.")
			}
		}
	}

function cWeight1(){
	if (window.document.getElementById('WeightKILOS').value == '')
		{
		alert('Please complete your weight in kilos')
		}else{
		window.document.getElementById('WeightKILOR').value = (window.document.getElementById('WeightKILOS').value / 0.4536).toFixed(1)
		}
	}

//AT 14 POUNDS TO A STONE==============
function cWeight2(){
	if (window.document.getElementById('WeightSTONE1').value == '' || window.document.getElementById('WeightPOUNDS1').value == '')
		{
		alert('Please complete your weight in stone and pounds')
		}else{
		weightInSresult = window.document.getElementById('WeightSTONE1').value*14;
		weightInPresult = window.document.getElementById('WeightPOUNDS1').value;
		Wtotal1 = parseInt(weightInSresult) + parseInt(weightInPresult);
		window.document.getElementById('WeightInK').value = (Wtotal1*0.453599081915458).toFixed(2);		
		window.document.getElementById('WeightInP').value = (Wtotal1).toFixed(2);
		}
	}
	
