// program lists

var NoDegree = new Array();

NoDegree[0] = '||Select a degree type first';



var Masters = new Array();

Masters[0] = '||Select a program';

Masters[1] = '51||Master of Education: Educational Management';

Masters[2] = '52||Master of Education: Technology in Education';

Masters[3] = '53||Master of Health Services Administration';

Masters[4] = '54||Master of Public Administration';

Masters[5] = '117||MBA: Accounting';

Masters[6] = '46||MBA: Acquisition';

Masters[7] = '91||MBA: Finance';

Masters[8] = '118||MBA: Healthcare';

Masters[9] = '92||MBA: Hospitality and Tourism Management';

Masters[10] = '47||MBA: Human Resource Management';

Masters[11] = '119||MBA:  Information Systems Management';

Masters[12] = '120||MBA: International Business';

Masters[13] = '48||MBA: Management';

Masters[14] = '49||MBA: Marketing';

Masters[15] = '121||MBA: Professional Studies';

Masters[16] = '122||MBA: Project Management';

Masters[17] = '123||MBA: Public Administration';

Masters[18] = '58||MS in Accounting: Accounting Information Systems';

Masters[19] = '59||MS in Accounting: Controllership';

Masters[20] = '131||MS in Accounting: Public Accounting';

Masters[21] = '60||MS in Accounting: Taxation';

Masters[22] = '93||MSIS: Computer Security Management';

Masters[23] = '94||MSIS: Decision Support System Management';

Masters[24] = '95||MSIS: Enterprise Resource Management';

Masters[25] = '96||MSIS: Network Management';

Masters[26] = '97||MSIS: Software Engineering Management';

Masters[27] = '98||MSIS: Systems Development Management';

Masters[28] = '134||MSHRM: Human Resource Generalist';
Masters[29] = '135||MSHRM: Human Resource and Organizational Development Concentration';
Masters[30] = '133||Master of Education: Adult Education and Development';


var ExecCert= new Array();

ExecCert[0] = '||Select a program';

ExecCert[1] = '61||Business Administration: Acquisition';

ExecCert[2] = '62||Business Administration: Human Resource Management';

ExecCert[3] = '63||Business Administration: Management';

ExecCert[4] = '64||Business Administration: Marketing';

ExecCert[5] = '69||Accounting: Accounting';

ExecCert[6] = '70||Accounting: Accounting Information Systems';

ExecCert[7] = '71||Accounting: Controllership';

ExecCert[8] = '72||Accounting: Taxation';

ExecCert[9] = '89||Information Systems: Networking';

ExecCert[10] = '90||Information Systems: Software Engineering';



var BBA = new Array();

BBA[0] = '||Select a program';

BBA[1] = '1||Acquisition and Contract Management';

BBA[2] = '2||Banking';

BBA[3] = '3||E-Business';

BBA[4] = '4||Finance';

BBA[5] = '78||Hospitality and Tourism Management';

BBA[6] = '5||Human Resource Mgmt';

BBA[7] = '6||Legal Studies';

BBA[8] = '7||Management';

BBA[9] = '8||Marketing';

BBA[10] = '79||Retail Management';

BBA[11] = '132||Health Services Administration';


var BS = new Array();

BS[0] = '||Select a program';

BS[1] = '9||Accounting';

BS[2] = '126||CJ: Criminal Justice Administration';

BS[3] = '127||CJ: Computer Security and Forensics';

BS[4] = '128||CJ: Homeland Security and Emergency Management';

BS[5] = '129||CJ: Homeland Security Technology';

BS[6] = '14||Economics';

BS[7] = '15||International Business';

BS[8] = '80||IS: Computer Security';

BS[9] = '81||IS: Database Developer';

BS[10] = '82||IS: Database Management';

BS[11] = '83||IS: Homeland Security and Information Systems';

BS[12] = '84||IS: Internetworking Technology';

BS[13] = '85||IS: Networking';

BS[14] = '86||IS: Programming';

BS[15] = '87||IS: Security Administration';

BS[16] = '88||IS: Web Development';



var AssocArts = new Array();

AssocArts[0] = '||Select a program';

AssocArts[1] = '17||Accounting';

AssocArts[2] = '18||Acquisition & Contract Management';

AssocArts[3] = '19||Business Administration';

AssocArts[4] = '130||Criminal Justice';

AssocArts[5] = '23||Economics';

AssocArts[6] = '24||General Studies';

AssocArts[7] = '77||Information Systems';

AssocArts[8] = '26||Marketing';



var Diploma = new Array();

Diploma[0] = '||Select a program';

Diploma[1] = '27||Accounting';

Diploma[2] = '28||Acquisition and Contract Management';

Diploma[3] = '99||IS: Computer Security';

Diploma[4] = '100||IS: Database Developer';

Diploma[5] = '101||IS: Database Management';

Diploma[6] = '102||IS: Homeland Security and Information Systems';

Diploma[7] = '103||IS: Internetworking Technology';

Diploma[8] = '104||IS: Networking';

Diploma[9] = '105||IS: Programming';

Diploma[10] = '106||IS: Security Administration';

Diploma[11] = '107||IS: Web Development';



var UndergradCert = new Array();

UndergradCert[0] = '||Select a program';

UndergradCert[1] = '40||Accounting: Advanced Accounting';

UndergradCert[2] = '39||Accounting: Introductory Accounting';

UndergradCert[3] = '43||Business Administration: Management';

UndergradCert[4] = '44||Business Admin: Small Business Mgmt. & Entrepreneurship';

UndergradCert[5] = '41||Business Administration: Acquisition and Contract Mgmt.';

UndergradCert[6] = '42||Business Administration: E-Business';

UndergradCert[7] = '108||IS: Computer Security';

UndergradCert[8] = '109||IS: Database Developer';

UndergradCert[9] = '110||IS: Database Management';

UndergradCert[10] = '111||IS: Homeland Security and Information Systems';

UndergradCert[11] = '112||IS: Internetworking Technology';

UndergradCert[12] = '113||IS: Networking';

UndergradCert[13] = '114||IS: Programming';

UndergradCert[14] = '115||IS: Security Administration';

UndergradCert[15] = '116||IS: Web Development';



var PhD = new Array();

PhD[0] = ':Select a program';





function RefreshArrays(){



	NoDegree[0] = '||Select a degree type first';

	

	Masters[0] = '||Select a program';

	Masters[1] = '51||Master of Education: Educational Management';

	Masters[2] = '52||Master of Education: Technology in Education';

	Masters[3] = '53||Master of Health Services Administration';

	Masters[4] = '54||Master of Public Administration';

	Masters[5] = '117||MBA: Accounting';

	Masters[6] = '46||MBA: Acquisition';

	Masters[7] = '91||MBA: Finance';

	Masters[8] = '118||MBA: Healthcare';

	Masters[9] = '92||MBA: Hospitality and Tourism Management';

	Masters[10] = '47||MBA: Human Resource Management';

	Masters[11] = '119||MBA:  Information Systems Management';

	Masters[12] = '120||MBA: International Business';

	Masters[13] = '48||MBA: Management';

	Masters[14] = '49||MBA: Marketing';

	Masters[15] = '121||MBA: Professional Studies';

	Masters[16] = '122||MBA: Project Management';

	Masters[17] = '123||MBA: Public Administration';

	Masters[18] = '58||MS in Accounting: Accounting Information Systems';

	Masters[19] = '59||MS in Accounting: Controllership';

	Masters[20] = '131||MS in Accounting: Public Accounting';

	Masters[21] = '60||MS in Accounting: Taxation';

	Masters[22] = '93||MSIS: Computer Security Management';

	Masters[23] = '94||MSIS: Decision Support System Management';

	Masters[24] = '95||MSIS: Enterprise Resource Management';

	Masters[25] = '96||MSIS: Network Management';

	Masters[26] = '97||MSIS: Software Engineering Management';

	Masters[27] = '98||MSIS: Systems Development Management';
	
Masters[28] = '134||MSHRM: Human Resource Generalist';
Masters[29] = '135||MSHRM: Human Resource and Organizational Development Concentration';
Masters[30] = '133||Master of Education: Adult Education and Development';


	

	ExecCert[0] = '||Select a program';

	ExecCert[1] = '61||Business Administration: Acquisition';

	ExecCert[2] = '62||Business Administration: Human Resource Management';

	ExecCert[3] = '63||Business Administration: Management';

	ExecCert[4] = '64||Business Administration: Marketing';

	ExecCert[5] = '69||Accounting: Accounting';

	ExecCert[6] = '70||Accounting: Accounting Information Systems';

	ExecCert[7] = '71||Accounting: Controllership';

	ExecCert[8] = '72||Accounting: Taxation';

	ExecCert[9] = '89||Information Systems: Networking';

	ExecCert[10] = '90||Information Systems: Software Engineering';

	

	BBA[0] = '||Select a program';

	BBA[1] = '1||Acquisition and Contract Management';

	BBA[2] = '2||Banking';

	BBA[3] = '3||E-Business';

	BBA[4] = '4||Finance';

	BBA[5] = '78||Hospitality and Tourism Management';

	BBA[6] = '5||Human Resource Mgmt';

	BBA[7] = '6||Legal Studies';

	BBA[8] = '7||Management';

	BBA[9] = '8||Marketing';

	BBA[10] = '79||Retail Management';
	
	BBA[11] = '132||Health Services Administration';

	

	BS[0] = '||Select a program';

	BS[1] = '9||Accounting';

	BS[2] = '126||CJ: Criminal Justice Administration';

	BS[3] = '127||CJ: Computer Security and Forensics';

	BS[4] = '128||CJ: Homeland Security and Emergency Management';

	BS[5] = '129||CJ: Homeland Security Technology';

	BS[6] = '14||Economics';

	BS[7] = '15||International Business';

	BS[8] = '80||IS: Computer Security';

	BS[9] = '81||IS: Database Developer';

	BS[10] = '82||IS: Database Management';

	BS[11] = '83||IS: Homeland Security and Information Systems';

	BS[12] = '84||IS: Internetworking Technology';

	BS[13] = '85||IS: Networking';

	BS[14] = '86||IS: Programming';

	BS[15] = '87||IS: Security Administration';

	BS[16] = '88||IS: Web Development';

	

	AssocArts[0] = '||Select a program';

	AssocArts[1] = '17||Accounting';

	AssocArts[2] = '18||Acquisition & Contract Management';

	AssocArts[3] = '19||Business Administration';

	AssocArts[4] = '130||Criminal Justice';

	AssocArts[5] = '23||Economics';

	AssocArts[6] = '24||General Studies';

	AssocArts[7] = '77||Information Systems';

	AssocArts[8] = '26||Marketing';

	

	Diploma[0] = '||Select a program';

	Diploma[1] = '27||Accounting';

	Diploma[2] = '28||Acquisition and Contract Management';

	Diploma[3] = '99||IS: Computer Security';

	Diploma[4] = '100||IS: Database Developer';

	Diploma[5] = '101||IS: Database Management';

	Diploma[6] = '102||IS: Homeland Security and Information Systems';

	Diploma[7] = '103||IS: Internetworking Technology';

	Diploma[8] = '104||IS: Networking';

	Diploma[9] = '105||IS: Programming';

	Diploma[10] = '106||IS: Security Administration';

	Diploma[11] = '107||IS: Web Development';

	

	UndergradCert[0] = '||Select a program';

	UndergradCert[1] = '40||Accounting: Advanced Accounting';

	UndergradCert[2] = '39||Accounting: Introductory Accounting';

	UndergradCert[3] = '43||Business Administration: Management';

	UndergradCert[4] = '44||Business Admin: Small Business Mgmt. & Entrepreneurship';

	UndergradCert[5] = '41||Business Administration: Acquisition and Contract Mgmt.';

	UndergradCert[6] = '42||Business Administration: E-Business';

	UndergradCert[7] = '108||IS: Computer Security';

	UndergradCert[8] = '109||IS: Database Developer';

	UndergradCert[9] = '110||IS: Database Management';

	UndergradCert[10] = '111||IS: Homeland Security and Information Systems';

	UndergradCert[11] = '112||IS: Internetworking Technology';

	UndergradCert[12] = '113||IS: Networking';

	UndergradCert[13] = '114||IS: Programming';

	UndergradCert[14] = '115||IS: Security Administration';

	UndergradCert[15] = '116||IS: Web Development';

	

	PhD[0] = ':Select a program';

}



// No Degree is selected by default.

var aryPrograms = NoDegree;



function SetDegreesByState(selectedState) {

	RefreshArrays();

	switch (selectedState.options[selectedState.selectedIndex].value) {

		case 'DE':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			BBA.splice(5,1);

			Masters.splice(9,1);

		break;

		case 'GA':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			UndergradCert.splice(3,1);

		break;

		case 'KY':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			Masters.splice(1,2);

		break;

		case 'MD':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			AssocArts.splice(3,1);

			//BS.splice(2,4);

		break;

		case 'NJ':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '1||Bachelor of Business Administration';

			DegreePgm[2] = '2||Bachelor of Science';

			DegreePgm[3] = '6||Master\'s';

			BS.splice(4,6);

			Masters.splice(18,10);

			Masters.splice(1,4);

		break;

		case 'NC':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '3||Associate in Arts';

			DegreePgm[2] = '1||Bachelor of Business Administration';

			DegreePgm[3] = '2||Bachelor of Science';

			DegreePgm[4] = '7||Executive Graduate Certificate';

			DegreePgm[5] = '6||Master\'s';

			Masters.splice(15,1)

		break;

		case 'OH':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate of Applied Business';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			Masters.splice(1,2);

			BS.splice(2,4);

			ExecCert.splice(1,4);

			UndergradCert.splice(3,1);

		break;

		case 'PA':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			AssocArts.splice(3,1);

			//BS.splice(2,4);

			UndergradCert.splice(3,1);
			Masters.splice(30,1);
			Masters.splice(29,1);
			Masters.splice(28,1);

		break;

		case 'SC':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';
			
			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			//ExecCert.splice(1,1);

			Masters.splice(20,1);

			Masters.splice(1,2);

			UndergradCert.splice(3,1);

		break;
		case 'AR':
			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';
			DegreePgm[1] = '1||Bachelor of Business Administration';
			DegreePgm[2] = '2||Bachelor of Science';
			DegreePgm[3] = '6||Master\'s';
			BBA.splice(11,1);
			BBA.splice(10,1);
			BBA.splice(7,1);
			BBA.splice(5,1);

			BBA.splice(3,1);
			
			Diploma.splice(4,1);
			Diploma.splice(5,1);
			BS.splice(16,1);
			BS.splice(14,1);
			BS.splice(10,1);
			BS.splice(9,1);
			BS.splice(7,1);
			BS.splice(6,1);
			Masters.splice(30,1);
			Masters.splice(2,1);
			Masters.splice(1,1);
			
		break;

		case 'TN':

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

			ExecCert.splice(1,1);

			Masters.splice(6,1);

			UndergradCert.splice(3,1);

		break;

		default:

			var DegreePgm = new Array();

			DegreePgm[0] = '||Select Type of Degree';

			DegreePgm[1] = '5||Undergraduate Certificate';

			DegreePgm[2] = '4||Diploma';

			DegreePgm[3] = '3||Associate in Arts';

			DegreePgm[4] = '1||Bachelor of Business Administration';

			DegreePgm[5] = '2||Bachelor of Science';

			DegreePgm[6] = '7||Executive Graduate Certificate';

			DegreePgm[7] = '6||Master\'s';

	}

	var oDegrees = selectedState.form.Degree;

	var iPos;

	var KeyValPair;

	for (iPos=oDegrees.length;iPos>-1;iPos--) {

		oDegrees.options[iPos] = null;

	}

	for(iPos=0;iPos<DegreePgm.length;iPos++){

  		KeyValPair = DegreePgm[iPos].split('||');

		oDegrees.options[oDegrees.options.length] = new Option(KeyValPair[1],KeyValPair[0]);

	}



/*  for(iPos=0; iPos < oPrograms.length; iPos++) {

	KeyValPair = aryPrograms[iPos].split('||');

	oPrograms.options[iPos].value = KeyValPair[0];

	oPrograms.options[iPos].text = KeyValPair[1];

  } */

}





function SetPrograms(ObjDegree) {

	switch (ObjDegree.options[ObjDegree.selectedIndex].value) {

		case '1':

			aryPrograms = BBA;

		break;

		case '2':

			aryPrograms = BS;

		break;

		case '3':

			aryPrograms = AssocArts;

		break;

		case '4':

			aryPrograms = Diploma;

		break;

		case '5':

			aryPrograms = UndergradCert;

		break;

		case '6':

			aryPrograms = Masters;

		break;

		case '7':

			aryPrograms = ExecCert;

		break;

		case '8':

			aryPrograms = NoDegree;

		break;

		default:

			aryPrograms = NoDegree;

	}

	var oPrograms = ObjDegree.form.Program;

	var iPos;

	var KeyValPair;

	for (iPos=oPrograms.length;iPos>-1;iPos--) {

		oPrograms.options[iPos] = null;

	}

	for(iPos=0;iPos<aryPrograms.length;iPos++){

  		KeyValPair = aryPrograms[iPos].split('||');

		oPrograms.options[oPrograms.options.length] = new Option(KeyValPair[1],KeyValPair[0]);

	}



/*  for(iPos=0; iPos < oPrograms.length; iPos++) {

	KeyValPair = aryPrograms[iPos].split('||');

	oPrograms.options[iPos].value = KeyValPair[0];

	oPrograms.options[iPos].text = KeyValPair[1];

  } */

}



function form_validator(theForm)

{



	if(theForm.State.selectedIndex == 0) {

		 alert("Please select your state.");

		 theForm.State.focus();

		 return false;

	}



	if(theForm.EducationLevel[0].selected) {

		 alert("Please select your education level.");

		 theForm.EducationLevel.focus();

		 return false;

	} else if(theForm.EducationLevel[1].selected) {

		 alert("Sorry, you need to be a High School graduate to apply.");

		 return false;

	} 

	if(theForm.Degree[0].selected) {

		 alert("Please select the Degree program in which you are interested.");

		 theForm.Degree.focus();

		 return false;

	}

	if((theForm.EducationLevel.selectedIndex <= 3) && (theForm.Degree.options[document.contactform.Degree.selectedIndex].value >= 6)) {

		 alert("Sorry, a Bachelor's Degree is required for Master's and Executive Graduate Certificate Programs.");

		 return false;

	}





	if(theForm.FirstName.value == "") {

		 alert("Please enter your first name.");

		 theForm.FirstName.focus();

		 return false;

	}

	

	if(theForm.LastName.value == "") {

		 alert("Please enter your last name.");

		 theForm.LastName.focus();

		 return false;

	}

	

    if(theForm.Address.value == "") {

		 alert("Please enter your street address.");

		 theForm.Address.focus();

		 return false;

	}

	

	if(theForm.City.value == "") {

		 alert("Please enter your city.");

		 theForm.City.focus();

		 return false;

	}

	

	if(theForm.Zipcode.value == "") {

		 alert("Please enter your zipcode.");

		 theForm.Zipcode.focus();

		 return false;

	} else if(!zipvalid(theForm.Zipcode.value)) {

		 alert("Please make sure your ZIP/Postal Code is correct.\nFor example, 12345 or 12345-6789 for US ZIP codes, \nor A1B 2C3 for Canadian Postal Codes.");

		 theForm.Zipcode.focus();

		 return false;

	}

	if(theForm.Phone.value == "") {

		 alert("Please enter your daytime phone number.");

		 theForm.Phone.focus();

		 return false;

	}

	if(theForm.Phone2.value == "") {

		 alert("Please enter your evening phone number.");

		 theForm.Phone2.focus();

		 return false;

	}

	if(theForm.Email.value == "") {

		 alert("Please enter your email address.");

		 theForm.Email.focus();

		 return false;

	} else if(!emailvalid(theForm.Email.value)) {

		 alert("Please make sure your email address is correct.");

		 theForm.Email.focus();

		 return false;

	}

	

return true;

    

}



function emailvalid(email) {

	emailreg=/[\w\.\-]{2,}\@[\w\-]{2,}\.[a-z]{2,3}/i;

	return(emailreg.exec(email));

}



function zipvalid(zip) {

	zipreg=/^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z][ ]\d[A-Z]\d$/;

	return(zipreg.exec(zip));

}





