<!--
	// ****************************************************************************
	//  ClearRadio
	//
	//  Functionality to clear radio boxes in script.
	// ****************************************************************************

// This function simply takes a radio button object and makes sure that it is 'unchecked'
function check(radioButton) {
	radioButton.checked = false;
}

// This function takes a form object and then steps through each element in the form
// and 'clears', 'unchecks', or resets them to default options
function clearAll(theForm) {
	// For each element in the form
	for (var i = 0; i < theForm.length; i++) {
		
		// Assign the element's type to a variable
		var theType = theForm[i].type;
		
		// If the element is a checkbox or radio button then 'uncheck' it
		if ((theType == 'radio') || (theType == 'checkbox')) {
			theForm[i].checked = false;
		}
		
		// If the element is a textbox or textarea then set it's value to an empty string
		if ((theType == 'text') || (theType == 'textarea')) {
			theForm[i].value = '';
		}
		
		// If the element is a select (single) dropdown ...
		if (theType == 'select-one') {
			// ... and the elements name is 'Country' then set it to the default country ...
			if (theForm[i].name == 'Country') {
				theForm[i].options[217].selected = true;
			}
			// ... else set it to the first option in the list
			else {
				theForm[i].options[0].selected = true;
			}
		}
	}

	// Return false. This is necessary to stop the form's reset button from being activated and
	// reseting the form elements to any 'remembered' values
	return false;
}
// -->