/**
 * Conference Registration
 * by Clint Tyler
 */

/*
 * Adds up the defined prices and gives a visible subtotal to the user
 */
function checkPrice(){
	var priceAddon = 3.95;
	var newSubtotal = priceAddon;
	$$('input[name="priceOptions"]').each(function(e){
		if(e.checked){
			newSubtotal = Number(newSubtotal) + Number(e.value);
		}
	});
	if (String(newSubtotal).include('.')) {
		$('subtotalHolder').update('$' + newSubtotal);
	}else{
		newSubtotal = newSubtotal + '.00';
		$('subtotalHolder').update('$' + newSubtotal);
	}
}

function resetPrices(){
	$$('input[name="priceOptions"]').each(function(e){
		if(e.checked){
			e.checked = false;
		}
	});
	$('confSelection').selectedIndex=0;
}

function loadSelectedConf(){
	new Ajax.Updater('regOptions_Loader', '/register/conference/files/ajax.php', {
	  parameters: { actionID:'getOptions', conf_id: $F('confSelection') }
	});
}

function checkPayForFunc() {
	$('payForElse').toggleClassName('noshow', 'show');
}