//	recalculates the total cost of the conference

function updateTotalCost()
{
	//	initialize cost
	var myCost	= 0;
	
	//	check for exhibitor
	if (document.getElementById('registration_exhibitor_yes'))
	{
		if (document.getElementById('registration_exhibitor_yes').checked)
		{
			myCost	+= parseFloat(document.getElementById('conf_cost_exhibitor').value);	
		}
	}
	
	//	check if reg as exhibitor, if so remove reg cost
	if (document.getElementById('registration_exhibitor_yes') && (document.getElementById('registration_exhibitor_yes').checked))
	{
	}
	else
	{
		//	check full or student registration
		if (document.getElementById('register_full_student_full').checked)
		{
			myCost	+= parseFloat(document.getElementById('conf_cost_full').value);	
		}
		else if (document.getElementById('register_full_student_student').checked)
		{
			myCost	+= parseFloat(document.getElementById('conf_cost_student').value);	
		}
	}
	//	check for dinner
	if (document.getElementById('register_dinner_yes'))
	{
		if (document.getElementById('register_dinner_yes').checked)
		{
			myCost	+= parseFloat(document.getElementById('conf_cost_dinner').value);	
		}
	}

	//	check for proceedings
	if (document.getElementById('register_proceedings_yes'))
	{
		if (document.getElementById('register_proceedings_yes').checked)
		{
			myCost	+= parseFloat(document.getElementById('conf_cost_proceedings').value);	
		}
	}
	
/*
	//	check for full or student esai registration
	if (document.getElementById('register_full_student_esai_membership_full').checked)
	{
		myCost	+= parseFloat(document.getElementById('conf_cost_full_esai_membership').value);	
	}
	else if (document.getElementById('register_full_student_esai_membership_student').checked)
	{
		myCost	+= parseFloat(document.getElementById('conf_cost_student_esai_membership').value);	
	}
*/
	//	set the value of the totalCost hidden field
	document.getElementById('totalCost').value = myCost;
}

