<!--

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] = "021340";

	aryPageCompare[01] = "021344";

	aryPageCompare[02] = "021347";

	aryPageCompare[03] = "021341";

	aryPageCompare[04] = "021342";

	aryPageCompare[05] = "021348";

	aryPageCompare[06] = "021349";

	aryPageCompare[07] = "021343";

	aryPageCompare[08] = "021350";

	aryPageCompare[09] = "021351";

	aryPageCompare[10] = "021352";

	aryPageCompare[11] = "021353";

	aryPageCompare[12] = "021354";

	aryPageCompare[13] = "021355";

	aryPageCompare[14] = "021356";

	aryPageCompare[15] = "021357";

	aryPageCompare[16] = "021358";

	aryPageCompare[17] = "h07981";

	aryPageCompare[18] = "h07983";

	aryPageCompare[19] = "h07984";
	
	aryPageCompare[20] = "h07985";

	aryPageCompare[21] = "021359";
	
	aryPageCompare[22] = "021360";

	aryPageCompare[23] = "021361";

	aryPageCompare[24] = "021362";

	aryPageCompare[25] = "021363";
	
	aryPageCompare[26] = "021364";
	
	aryPageCompare[27] = "021339";
	
	aryPageCompare[28] = "021366";

	aryPageCompare[29] = "021371";

	aryPageCompare[30] = "021372";

	aryPageCompare[31] = "021373";

	aryPageCompare[32] = "021374";

	aryPageCompare[33] = "021375";

	aryPageCompare[34] = "021376";
	
	aryPageCompare[35] = "021377";

	aryPageCompare[36] = "021378";

	aryPageCompare[37] = "021379";

	aryPageCompare[38] = "021370";
	

	//	---- 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 fncLinkToGroupPage(theForm) {

	var checkStr = theForm.txtGroupNumber.value.toLowerCase();

//	---- Ensure there is a value provided ----

	if (checkStr == "") {

		alert("Please enter a value for the \"Group Number\" field.");

		theForm.txtGroupNumber.focus();

		return (false);

	}

//	---- Ensure it is the right length ----	

	if (checkStr.length < 6 || checkStr.length > 9) {

		alert("Please enter between 6 and 9 characters in the \"Group Number\" field.");

		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 \"Group Number\" 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 = "/att/pdf/" + checkStr + ".pdf";

	} else {

		alert("The group number you entered is not on file.\nPlease check that you have entered it correctly.");

		theForm.txtGroupNumber.focus();

		return (false);

	}

//	---- Failsafe fall-through return ----	

	return (false);

}

//-->



