<!--

function fncValidGroupNumber(strGroup) {

	var aryPageCompare = new Array();

//	----------------------------------------------------

//	Enter the group number below.  Use lower case.

//	For each group number, there must be a corresponding

//	page ending with ".htm" and in lower case.  For

//	instance, group H98917 would be put

//	in the table as "h98917" and there must be a page

//	named "h98917.htm."

//	----------------------------------------------------

	aryPageCompare[00] = "manual";

	aryPageCompare[01] = "manual";

	aryPageCompare[02] = "manual";

//	---- Compare provided string to table ----	

	var tmpGroup = strGroup;

	for (i = 0; i < aryPageCompare.length; i++) {

		if (tmpGroup == aryPageCompare[i]) {

			return (true);

		}

	}

//	---- Not found, return false ----

	return (false);

}



function fncLinkToManualPage(theForm) {

	var checkStr = theForm.txtGroupNumber.value.toLowerCase();

//	---- Ensure there is a value provided ----

	if (checkStr == "") {

		alert("Please enter a value for the \"Password\" field.");

		theForm.txtGroupNumber.focus();

		return (false);

	}

//	---- Ensure it is the right length ----	

	if (checkStr.length < 6 || checkStr.length > 14) {

		alert("The Password you entered is not valid.\nPlease check that you have entered it correctly.");

		theForm.txtGroupNumber.focus();

		return (false);

	}

//	---- Ensure it has the right characters ----	

	var checkOK = "abcdefghijklmnopqrstuvwxyz0123456789";

	var allValid = true;

	for (i = 0;  i < checkStr.length;  i++) {

		ch = checkStr.charAt(i);

		for (j = 0;  j < checkOK.length;  j++)

			if (ch == checkOK.charAt(j))

			break;

		if (j == checkOK.length) {

			allValid = false;

			break;

		}

	}

	if (!allValid) {

		alert("Please enter only letter and digit characters in the \"Password\" field.");

		theForm.txtGroupNumber.focus();

		return (false);

	}

//	---- Compare string provided against the table ----	

//	---- If valid, redirect ----

//	---- Else, ask for valid group ----

	if (fncValidGroupNumber(checkStr)) {

		window.document.location.href = checkStr + ".htm";

	} else {

		alert("The Password you entered is not valid.\nPlease check that you have entered it correctly.");

		theForm.txtGroupNumber.focus();

		return (false);

	}

//	---- Failsafe fall-through return ----	

	return (false);

}

//-->

