
	var Cost1 = 60, Cost2 = 0, Cost3 = 0, Total, x_amount;

function tally()
	{
	Cost = Cost1 + Cost2 + Cost3;
	Cost = dollar(Cost);
	document.orderform.x_amount.value = Cost;
	document.orderform.x_cust_id.value = document.orderform.DATE.value;
	}

function setcat1()
{
	document.orderform.category.value = "New Member Professional - $50.00";
}

function setcat2()
{
	document.orderform.category.value = "Renewing Member Professional - $60.00";
}

function setcat3()
{
	document.orderform.category.value = "New Member Full-Time Student - $30.00";
}

function setcat4()
{
	document.orderform.category.value = "Renewing Member Full-Time Student - $30.00";
}


function dollar (amount)
{
	amount = parseInt(amount * 100);
	amount = parseFloat(amount/100);
	if (((amount) == Math.floor(amount)) && ((amount - Math.floor (amount)) == 0))
	{
		amount = amount + ".00"
		return amount;
	}
	if ( ((amount * 10) - Math.floor(amount * 10)) == 0)
	{
		amount = amount + "0";
		return amount;
	}
	if ( ((amount * 100) - Math.floor(amount * 100)) == 0)
	{
		amount = amount;
		return amount;
	}
	return amount; 	
}
