<!-- Returns the value of the selected radio button in the radio group, null if -->
<!-- none are selected, and false if the button group doesn't exist -->
function $RF(el, radioGroup) {
    if($(el).type && $(el).type.toLowerCase() == 'radio') {
        var radioGroup = $(el).name;
        var el = $(el).form;
    } else if ($(el).tagName.toLowerCase() != 'form') {
        return false;
    }

    var checked = $(el).getInputs('radio', radioGroup).find(
        function(re) {return re.checked;}
    );
    return (checked) ? $F(checked) : null;
}

<!-- Checks validity of truck fields in registration form -->
function checkTruckText() {
	if ($RF('OversizeTruck') == 1 && $('OversizeTruckText').value == '') {
		alert('Please supply a description detailing your oversize truck/trailer needs.');
		$('OversizeTruckText').focus();
		return false;
	} else {
		return true;
	}
}

<!-- Confirm fees and arrival date --->
function confirmBooth() {
	var totalFees = $('totalFees').innerHTML
	var checkInDay = $RF('boothCheckIn').capitalize();
	var promptString = "You have chosen to arrive on " + checkInDay + " and your total booth fees come to: $" + totalFees + "\n\nPress OK to continue or and Cancel to make revisions to booth selection.";
	if (confirm(promptString)) {
		return true;
	} else {
		$('boothSize').focus();		
		return false;
	}
}

<!-- Calculates booth fees in registration form -->
function calculateFees() {
	<!--- Show further options --->
	$('checkIns').show();
	
	<!--- Init fees --->
	var totalFees = 0;
	var satAddFee = 0;
	var friAddFee = 0;
	
	if ($RF('boothSize') == 'single') {
		totalFees = 105;
		satAddFee = 0;
		friAddFee = 5;
		if ($RF('boothCheckIn') == 'saturday') {
			totalFees += satAddFee ;
		} else if ($RF('boothCheckIn') == 'friday') {
			totalFees += friAddFee;
		}
	} else if ($RF('boothSize') == 'double') {
		totalFees = 235;
		satAddFee = 0;
		friAddFee = 10;
		if ($RF('boothCheckIn') == 'saturday') {
			totalFees += satAddFee;
		} else if ($RF('boothCheckIn') == 'friday') {
			totalFees += friAddFee;
		}		
	}
	
	<!--- Set total fees --->
	$('totalFees').innerHTML = totalFees;
	$('satAddFee').innerHTML = satAddFee;
	$('friAddFee').innerHTML = friAddFee;	
}
