/*
 * Prevents framing of our site when used in a JavaScript enabled browser.
 */
if (top.location != self.location)
{
	top.location = self.location;
}

/*
 * jumpMenu v1 (jmj)
 *
 * The select form element object is passed to this function where the URL
 * is extracted and used to change the URL in the current browser window.
 * 
 * Use the following code fragment as a guide to jumpMenu enable a select form element:
 * <select name="URL" onChange="jumpMenu(this.form.URL)">
 *
 */
function jumpMenu(passURL) {
	jumpURL=passURL.options[passURL.selectedIndex].value
	if (jumpURL!="") {
		window.location.href=jumpURL
	}
}

/*
 * isEmpty v1 (jmj)
 *
 * This function tests for "empty" text elements that are passed to it.
 *
 * Use the following code fragment as a guide to test for empty text fields:
 * <put example code here>
 *
 */
function isEmpty(passField) {

	if ((passField.value == null) || (passField.value == "")) {
		alert("This is a required field. Please fill it in.");
		passField.focus();
		passField.select();
		return false;
	}
	else {
		return true;
	}
}

/*
 * validatePassword v1 (jmj)
 *
 * For this function to work the password fields must be named
 * password1 and password2. This function currently only checks to make sure
 * the password and password confirm fields match. In a future version we
 * will do more stringent password validation.
 *
 */ 
function validatePassword(passForm) {
	
	if (passForm.password1.value != passForm.password2.value) {
		alert("The passwords you entered did not match. Please try again.");
		passForm.password1.focus();
		passForm.password1.select();
		return false;
	}
	else {
		return true;
	}		
}