

function CalculateBMIDeprecated()
{
	if(CheckIfValid('bmi-weight', 'numerical', '!') &&
		CheckIfValid('bmi-height', 'numerical', '!'))
	{			
		var URL = "/util_/UserTests/ContentHandler.aspx?element=BMI";
		
		if($('bmi-weight').value)	URL += "&weight=" + $('bmi-weight').value;
		if($('bmi-height').value)	URL += "&height=" + $('bmi-height').value;
		
		doAjaxJSON(
			URL,
			null,
			SetContent, 
			"user-tests-bmi");
	}
	
	
	
    /**if(!CheckIfValid('bmi-weight', 'numerical', '!') ||
		!CheckIfValid('bmi-height', 'numerical', '!'))
		return;
	if($('bmi-weight').value)	URL += "&weight=" + $('bmi-weight').value;
	if($('bmi-height').value)	URL += "&height=" + $('bmi-height').value;*/
}

function CalculateWeightGoals()
{
	if($('goals-weight').value != "" && CheckIfValid('goals-weight', 'numerical', '!'))
	{			
		var URL = "/util_/UserTests/ContentHandler.aspx?element=goals";
		
		if($('goals-weight').value)	URL += "&weight=" + $('goals-weight').value;
		
		doAjaxJSON(
			URL,
			null,
			SetContent, 
			"user-tests-goals");
	}
	else if($('goals-day').value != "" && $('goals-month').value != "" && $('goals-year').value != "")
	{		
		var URL = "/util_/UserTests/ContentHandler.aspx?element=goals";
		
		URL += "&date=" + $('goals-year').value + "-" + $('goals-month').value + "-" + $('goals-day').value;
		
		doAjaxJSON(
			URL,
			null,
			SetContent, 
			"user-tests-goals");
	}
}
