var MastersPrograms = new Array("Business Administration (MBA)",
								"Computer Science (MS)",
								"Counseling (MS)",
								"Criminal Justice (MS)",
								"Education - MSEd (Current Teachers)",
								"Education/Teaching - MST (Career Changers)",
								"English (MA)",
								"Foreign Languages (MA)",
								"History (MA)",
								"Psychology (MA)",
								"Public Relations (MA)");
								
var CertificatePrograms = new Array("Non-Profit Public Relations");
									
var AdvancedCertificatePrograms = new Array("Alcohol & Substance Abuse Counseling",
											"Marriage and Family Therapy", 
											"Business Continuity and Risk Management", 
											"E-Commerce", 
											"General Accounting", 
											"International Business", 
											"Public Accounting", 
											"Sports and Entertainment Business",
											"Forensic Criminology and Criminal Justice",
											"Campaigns and Elections",
											"Health Care Management",
											"Long Term Care Administration Management",
											"Infrastructure Management");

var BusinessAdministrationConcentrations = new Array("Financial Management", 
													 "Information Systems", 
													 "Management", 
													 "Human Resource Management", 
													 "Marketing",
													 "General Accounting",
													 "Public Accounting",
													 "Health Care Management");
													 
var CounselingConcentrations = new Array("Marriage and Family Therapy", 
										 "Mental Health Counseling");
										 
var EducationCurrentTeachersConcentrations = new Array("Literacy Education", 
													   "Educational Leadership", 
													   "Adolescence Education (Grades 7-12)",
													   "Literacy/Special Education");
													   
var EducationTeachingCareerChangersConcentrations = new Array("Childhood Education (Grades 1-6)", 
															  "Adolescence Education (Grades 7-12)",
															  "Childhood/Special Education",
															  "Dual: Early Childhood/Childhood (Birth to Grade 6)");

var ForeignLanguageConcentrations = new Array("Italian",
											  "Spanish");
											  
var PsychologyConcentrations = new Array("Experimental", 
										 "Industrial Organization", 
										 "School", 
										 "Mental Health Counseling");

var AdolescenceEducationSpecializations = new Array("English",
													"Mathematics", 
													"Social Studies", 
													"Italian",
													"Biology", 
													"Spanish");

var Campuses = new Array("New Rochelle",
						 "Rockland");

function addOption(selectbox, text, value) {
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;
	selectbox.options.add(optn);
}

function removeAllOptions(selectbox) {
	var i;
	for(i = selectbox.options.length-1; i >= 0; i--) {
		selectbox.remove(i);
	}
}

function ValidateRequiredFields() {
	var RequiredFields ="fname,lname,phone,email,address1,city,state,zip,Gender,AttendedIona,month,day,year,gradprogram,program,concentration,specialization,campus";

	var FieldList = RequiredFields.split(",");
	var BadList = new Array();

	for(var i = 0; i < FieldList.length; i++) {
		if(FieldList[i] == "Gender") {
			if(!document.getElementById("GenderMale").checked && !document.getElementById("GenderFemale").checked) {
				BadList.push(FieldList[i]);
			}
		}
		else if(FieldList[i] == "AttendedIona") {
			if(!document.getElementById("AttendedIonaYes").checked && !document.getElementById("AttendedIonaNo").checked) {
				BadList.push(FieldList[i]);
			}
		}
		else {
			var s = document.getElementById(FieldList[i]).value;
			s = StripSpacesFromEnds(s);
			
			if(FieldList[i] == "email") {
				var emailReg = /.+@.+\..+/;
				if(s.length < 1) {
					BadList.push("email");
				}
				else if(emailReg.test(s) == false) {
					BadList.push("emailinvalid");
				}
			}
			else if(FieldList[i] == "phone") {
				if(s.length > 1) {
					if(CheckValidPhone() == false) {
						BadList.push("phoneinvalid");
					}
				}
			}
			else if(FieldList[i] == "month") {
				if(s.length < 1) {
					BadList.push(FieldList[i]);
				}
				else if(document.getElementById(FieldList[i]).value < 1 || document.getElementById(FieldList[i]).value > 12) {
					BadList.push("monthinvalid");
				}
			}
			else if(FieldList[i] == "day") {
				if(s.length < 1) {
					BadList.push(FieldList[i]);
				}
				else if(document.getElementById(FieldList[i]).value < 1 || document.getElementById(FieldList[i]).value > 31) {
					BadList.push("dayinvalid");
				}
			}
			else if(FieldList[i] == "year") {
				if(s.length < 1) {
					BadList.push(FieldList[i]);
				}
				else if(document.getElementById(FieldList[i]).value < 1900 || document.getElementById(FieldList[i]).value > 2008) {
					BadList.push("yearinvalid");
				}
			}
			else if(s.length < 1 || s == "Select Choice" || s == "Select Graduate Program" || s == "Select Program" || s == "Select Concentration" || s == "Select Specialization" || s == "Select Campus") {
				BadList.push(FieldList[i]);
			}
		}
	}

	if(BadList.length < 1) {
		fillHidden();
		return true;
	}

	var ess = new String();

	if(BadList.length > 1) {
		ess = 's';
	}

	var message = new String('The following field' + ess + ' are required:\n');
	for(var i = 0; i < BadList.length; i++) {
		if(BadList[i] == "fname") { message += '\n' + "Please Enter Your First Name"; }
		if(BadList[i] == "lname") { message += '\n' + "Please Enter Your Last Name"; }
		if(BadList[i] == "phoneinvalid") { message += '\n' + "Phone Number is not Valid, Please enter a phone number in the form: (123)-456-7890"; }
		if(BadList[i] == "email") { message += '\n' + "Please Enter an Email Address"; }
		if(BadList[i] == "emailinvalid") { message += '\n' + "Email Address is not Valid, Please enter an email in the form: EmailName@Provider.com"; }
		if(BadList[i] == "address") { message += '\n' + "Please Enter a Street Address"; }
		if(BadList[i] == "address2") { message += '\n' + "Please Enter a Street Address 2"; }
		if(BadList[i] == "city") { message += '\n' + "Please Enter a City"; }
		if(BadList[i] == "state") { message += '\n' + "Please Enter a State"; }
		if(BadList[i] == "zip") { message += '\n' + "Please Enter a Zip Code"; }
		if(BadList[i] == "month") { message += '\n' + "Please Enter a Month of Birth"; }
		if(BadList[i] == "monthinvalid") { message += '\n' + "Month of Birth is not Valid, Please enter a month between: 1 and 12"; }
		if(BadList[i] == "day") { message += '\n' + "Please Enter a Day of Birth"; }
		if(BadList[i] == "dayinvalid") { message += '\n' + "Day of Birth is not Valid, Please enter a day between: 1 and 31"; }
		if(BadList[i] == "year") { message += '\n' + "Please Enter a Year of Birth"; }
		if(BadList[i] == "yearinvalid") { message += '\n' + "Year of Birth is not Valid, Please enter a year between: 1900 and 2008"; }
		if(BadList[i] == "Gender") { message += '\n' + "Please Select a Gender"; }
		if(BadList[i] == "AttendedIona") { message += '\n' + "Please Make a Selection for having Attended Iona"; }
		if(BadList[i] == "gradprogram") { message += '\n' + "Please Make a Graduate Program Selection"; }
		if(BadList[i] == "program") { message += '\n' + "Please Make a Selection for Area of Study"; }
		if(BadList[i] == "concentration") { message += '\n' + "Please Make a Selection for Concentration"; }
		if(BadList[i] == "specialization") { message += '\n' + "Please Make a Selection for Specialization"; }
		if(BadList[i] == "campus") { message += '\n' + "Please Make a Selection for which Campus you would like to Attend"; }
	}

	alert(message);
	return false;
}

function StripSpacesFromEnds(s) {
	while((s.indexOf(' ',0) == 0) && (s.length> 1)) {
		s = s.substring(1,s.length);
	}
	while((s.lastIndexOf(' ') == (s.length - 1)) && (s.length> 1)) {
		s = s.substring(0,(s.length - 1));
	}
	if((s.indexOf(' ',0) == 0) && (s.length == 1)) {
		s = '';
	}
	return s;
}

function getKeyCode(e) {
	if (window.event) {
		return window.event.keyCode;
	}
	else if (e) {
		return e.which;
	}
	else {
		return null;
	}
}

function keyRestrict(e, validchars) {
	var key='', keychar='';
	key = getKeyCode(e);
	
	if (key == null) {
		return true;
	}
	keychar = String.fromCharCode(key);
	keychar = keychar.toLowerCase();
	validchars = validchars.toLowerCase();
	
	if (validchars.indexOf(keychar) != -1) {
		return true;
	}
	
	if (key==null || key==0 || key==8 || key==9 || key==13 || key==27) {
		return true;
	}
	return false;
}

function CheckValidPhone() {
	var stripped = document.getElementById("phone").value.replace(/[\(\)\.\-\ ]/g, '');

	if (isNaN(parseInt(stripped))) {
		return false;
	}
	else if (!(stripped.length == 10)) {
		return false;
	}
	else {
		document.getElementById("phone").value = stripped;
		return true;
	}
}

function HideUndergradQuestion() {
	document.getElementById('selectundergradcollege1').style.visibility="hidden";
	document.getElementById('selectundergradcollege2').style.visibility="hidden";
}

function ShowUndergradQuestion() {
	document.getElementById('selectundergradcollege1').style.visibility="visible";
	document.getElementById('selectundergradcollege2').style.visibility="visible";
}

function fillNext(id) {
	if (id == "gradprogram") {
		removeAllOptions(document.getElementById("program"));
		addOption(document.getElementById("program"), "--- SELECT PROGRAM ---", "Select Program");

		removeAllOptions(document.getElementById("concentration"));
		addOption(document.getElementById("concentration"), "--- SELECT CONCENTRATION ---", "Select Concentration");

		removeAllOptions(document.getElementById("specialization"));
		addOption(document.getElementById("specialization"), "--- SELECT SPECIALIZATION ---", "Select Specialization");

		removeAllOptions(document.getElementById("campus"));
		addOption(document.getElementById("campus"), "--- SELECT CAMPUS ---", "Select Campus");

		var selectedGradProgram = document.getElementById("gradprogram").value;

		if (selectedGradProgram == "Masters") {
			var a;
			for(a in MastersPrograms) {
				addOption(document.getElementById("program"), MastersPrograms[a], MastersPrograms[a]);
			}
		}
		else if (selectedGradProgram == "Certificate") {
			var b;
			for(b in CertificatePrograms) {
				addOption(document.getElementById("program"), CertificatePrograms[b], CertificatePrograms[b]);
			}
		}
		else if (selectedGradProgram == "Advanced Certificate") {
			var c;
			for(c in AdvancedCertificatePrograms) {
				addOption(document.getElementById("program"), AdvancedCertificatePrograms[c], AdvancedCertificatePrograms[c]);
			}
		}
	}
	else if (id == "program") {
		removeAllOptions(document.getElementById("concentration"));
		addOption(document.getElementById("concentration"), "--- SELECT CONCENTRATION ---", "Select Concentration");

		removeAllOptions(document.getElementById("specialization"));
		addOption(document.getElementById("specialization"), "--- SELECT SPECIALIZATION ---", "Select Specialization");

		removeAllOptions(document.getElementById("campus"));
		addOption(document.getElementById("campus"), "--- SELECT CAMPUS ---", "Select Campus");

		var selectedProgram = document.getElementById("program").value;

		if (selectedProgram == "Business Administration (MBA)") {
			var d;
			for(d in BusinessAdministrationConcentrations) {
				addOption(document.getElementById("concentration"), BusinessAdministrationConcentrations[d], BusinessAdministrationConcentrations[d]);
			}
		}
		else if (selectedProgram == "Counseling (MS)") {
			var e;
			for(e in CounselingConcentrations) {
				addOption(document.getElementById("concentration"), CounselingConcentrations[e], CounselingConcentrations[e]);
			}
		}
		else if (selectedProgram == "Education - MSEd (Current Teachers)") {
			var f;
			for(f in EducationCurrentTeachersConcentrations) {
				addOption(document.getElementById("concentration"), EducationCurrentTeachersConcentrations[f], EducationCurrentTeachersConcentrations[f]);
			}
		}
		else if (selectedProgram == "Education/Teaching - MST (Career Changers)") {
			var g;
			for(g in EducationTeachingCareerChangersConcentrations) {
				addOption(document.getElementById("concentration"), EducationTeachingCareerChangersConcentrations[g], 
							EducationTeachingCareerChangersConcentrations[g]);
			}
		}
		else if (selectedProgram == "Foreign Languages (MA)") {
			var i;
			for(i in ForeignLanguageConcentrations) {
				addOption(document.getElementById("concentration"), ForeignLanguageConcentrations[i], ForeignLanguageConcentrations[i]);
			}
		}
		else if (selectedProgram == "Psychology (MA)") {
			var j;
			for(j in PsychologyConcentrations) {
				addOption(document.getElementById("concentration"), PsychologyConcentrations[j], PsychologyConcentrations[j]);
			}
		}
		else {
			removeAllOptions(document.getElementById("concentration"));
			addOption(document.getElementById("concentration"), "No Concentration Applicable", "No Concentration Applicable");
			fillNext("concentration");
		}
	}
	else if(id == "concentration") {
		removeAllOptions(document.getElementById("specialization"));
		addOption(document.getElementById("specialization"), "--- SELECT SPECIALIZATION ---", "Select Specialization");

		removeAllOptions(document.getElementById("campus"));
		addOption(document.getElementById("campus"), "--- SELECT CAMPUS ---", "Select Campus");

		var selectedConcentration = document.getElementById("concentration").value;
		if (selectedConcentration == "Adolescence Education (Grades 7-12)") {
			var a;
			for (a in AdolescenceEducationSpecializations) {
				addOption(document.getElementById("specialization"), AdolescenceEducationSpecializations[a], AdolescenceEducationSpecializations[a]);
			}
		}
		else {
			removeAllOptions(document.getElementById("specialization"));
			addOption(document.getElementById("specialization"), "No Specialization Applicable", "No Specialization Applicable");
			fillNext("specialization");
		}
	}
	else if (id == "specialization") {
		removeAllOptions(document.getElementById("campus"));
		addOption(document.getElementById("campus"), "--- SELECT CAMPUS ---", "Select Campus");

		var selectedProgram2 = document.getElementById("program").value;
		var selectedConcentration2 = document.getElementById("concentration").value;
		var selectedSpecialization2 = document.getElementById("specialization").value;

		if (selectedProgram2 == "Business Continuity and Risk Management" || selectedProgram2 == "Criminal Justice (MS)" 
				|| selectedProgram2 == "Psychology (MA)" || selectedProgram2 == "Alcohol & Substance Abuse Counseling" 
				|| selectedProgram2 == "Marriage and Family Therapy" || selectedProgram2 == "Public Accounting") {
				
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedProgram2 == "Counseling (MS)") {
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedProgram2 == "Infrastructure Management") {
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedProgram2 == "Health Care Management") {
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedProgram2 == "General Accounting") {
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedConcentration2 == "Health Care Management"){
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedConcentration2 == "Public Accounting"){
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedProgram2 == "Education - MSEd (Current Teachers)" || selectedProgram2 == "Education/Teaching - MST (Career Changers)") {
					
			if (selectedConcentration2 == "Adolescence Education (Grades 7-12)") {
				if (selectedSpecialization2 == "Biology" || selectedSpecialization2 == "Spanish") {
					addOption(document.getElementById("campus"), "New Rochelle", "NR");
				}
				else {
					addOption(document.getElementById("campus"), "Rockland", "ROCK");
					addOption(document.getElementById("campus"), "New Rochelle", "NR");
				}
			}
			else {
				addOption(document.getElementById("campus"), "Rockland", "ROCK");
				addOption(document.getElementById("campus"), "New Rochelle", "NR");
			}
		}
		else if (selectedProgram2 == "Long Term Care Administration Management"){
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedProgram2 == "Forensic Criminology and Criminal Justice"){
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}else if (selectedProgram2 == "Public Relations (MA)"){
			addOption(document.getElementById("campus"), "Rockland", "ROCK");
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
		else if (selectedProgram2 == "Foreign Languages (MA)") {
			if (selectedConcentration2 == "Adolescence Education (Grades 7-12)") {
				if (selectedSpecialization2 == "Spanish") {
					addOption(document.getElementById("campus"), "New Rochelle", "NR");
				}
				else {
					addOption(document.getElementById("campus"), "Rockland", "ROCK");
					addOption(document.getElementById("campus"), "New Rochelle", "NR");
				}
			}
			else {
				addOption(document.getElementById("campus"), "Rockland", "ROCK");
				addOption(document.getElementById("campus"), "New Rochelle", "NR");
			}
		}
		else {
			addOption(document.getElementById("campus"), "Rockland", "ROCK");
			addOption(document.getElementById("campus"), "New Rochelle", "NR");
		}
	}
}

function fillHidden() {
	var gradprogram = document.getElementById("gradprogram").value;
	var program = document.getElementById("program").value;
	var concentration = document.getElementById("concentration").value;
	var specialization = document.getElementById("specialization").value;

	var Ext_Subject_Area = document.getElementById("Ext_Subject_Area");
	var Acad_Prog = document.getElementById("Acad_Prog");
	var I_Adm_Plan = document.getElementById("I_Adm_Plan");
	var I_Adm_Sub_Pl = document.getElementById("I_Adm_Sub_Pl");

		// new stuff 2011-06-09
	switch(program){
		case "Health Care Management":
			Ext_Subject_Area.value="HCM";
			Acad_Prog.value="GAS";
			I_Adm_Plan.value="CERT";
			break;
		case "Infrastructure Management":
			Acad_Prog.value="GAS";
			I_Adm_Plan.value="CERT";
			break;
		case "Long Term Care Administration Management":
			Ext_Subject_Area.value="HCM";
			Acad_Prog.value="GAS";
			I_Adm_Plan.value="CERT";
			break;
		case "Campaigns and Elections":
			Acad_Prog.value="GAS";
			I_Adm_Plan.value="CERT";
			break;
		case "Forensic Criminology and Criminal Justice":
			Ext_Subject_Area.value="CRJ";
			Acad_Prog.value="GAS";
			I_Adm_Plan.value="CERT";
			break;
		case "Business Administration (MBA)":
			switch(concentraion){
				case "General Accounting":
					Ext_Subject_Area.value="ACCG";
					break;
				case "Public Accounting":
					Ext_Subject_Area.value="ACCP";
					break;
				case "Health Care Management":
					Ext_Subject_Area.value="HCM";
					break;
				default:
					break;
			}
			Acad_Prog.value="GHSB";
			break;
		default:
			break;
	}
	
	if (gradprogram == "Masters") {
		if (program == "Business Administration (MBA)") {
			if (concentration == "Financial Management")
				Ext_Subject_Area.value="FIN";
			else if (concentration == "Information Systems")
				Ext_Subject_Area.value="IDT";
			else if (concentration == "Management")
				Ext_Subject_Area.value="MNG";
			else if (concentration == "Human Resource Management")
				Ext_Subject_Area.value="HRM";
			else if (concentration == "Marketing")
				Ext_Subject_Area.value="MKT";
			else 
				Ext_Subject_Area.value="ERROR BUSINESS";
				
			Acad_Prog.value="GHSB";
		}
		else if (program ==  "Computer Science (MS)") {
			Ext_Subject_Area.value="CS";
			Acad_Prog.value="GAS";
		}
		else if (program == "Counseling (MS)") {
			if (concentration == "Marriage and Family Therapy")
				Ext_Subject_Area.value="CNSF";
			else if (concentration == "Mental Health Counseling")
				Ext_Subject_Area.value="MHLC";
			else
				Ext_Subject_Area.value="ERROR COUNSELING";
				
			Acad_Prog.value="GAS";
		}
		else if (program ==  "Criminal Justice (MS)") {
			Ext_Subject_Area.value="CRJ"
			Acad_Prog.value="GAS";
		}
		else if (program == "Education/Teaching - MST (Career Changers)" ||  program == "Education - MSEd (Current Teachers)"
					|| program == "Education Technology (MS)") {
					
			if (program == "Education - MSEd (Current Teachers)") {
				if (concentration == "Literacy Education")
					I_Adm_Plan.value="EDLT";
				else if (concentration == "Educational Leadership")
					I_Adm_Plan.value="EDUL";
				else if (concentration == "Adolescence Education (Grades 7-12)") {
					if (specialization == "English")
						I_Adm_Sub_Pl.value="ENG";
					else if (specialization == "Mathematics")
						I_Adm_Sub_Pl.value="MTH";
					else if (specialization == "Social Studies")
						I_Adm_Sub_Pl.value="SOST";
					else if (specialization == "Italian")
						I_Adm_Sub_Pl.value="ITA";
					else if (specialization == "Biology")
						I_Adm_Sub_Pl.value="BIO";
					else if (specialization == "Spanish")
						I_Adm_Sub_Pl.value="SPA";
						
					I_Adm_Plan.value="ADOE";
				}
			}
			else if (program == "Education/Teaching - MST (Career Changers)") {
				if (concentration == "Childhood Education (Grades 1-6)")
					I_Adm_Plan.value="ECE";
				else if (concentration == "Adolescence Education (Grades 7-12)") {
					if (specialization == "English")
						I_Adm_Sub_Pl.value="ENG";
					else if (specialization == "Mathematics")
						I_Adm_Sub_Pl.value="MTH";
					else if (specialization == "Social Studies")
						I_Adm_Sub_Pl.value="SOST";
					else if (specialization == "Italian")
						I_Adm_Sub_Pl.value="ITA";
					else if (specialization == "Biology")
						I_Adm_Sub_Pl.value="BIO";
					else if (specialization == "Spanish")
						I_Adm_Sub_Pl.value="SPA";
						
					I_Adm_Plan.value="ADOT";
				}
			}
			
			
			Acad_Prog.value="GAS";
			Ext_Subject_Area.value="EDU";
		}
		else if (program == "English (MA)") {
			Ext_Subject_Area.value="ENG";
			Acad_Prog.value="GAS";
		}
		else if (program == "Foreign Languages (MA)") {
			if (concentration == "Italian")
				Ext_Subject_Area.value="ITA";
			else if (concentration == "Spanish")
				Ext_Subject_Area.value="SPA";
			else
				Ext_Subject_Area.value="ERROR FOREIGN LANGUAGES";
				
			Acad_Prog.value="GAS";
		}
		else if (program == "History (MA)") {
			Ext_Subject_Area.value="HST";
			Acad_Prog.value="GAS";
		}
		else if (program == "Psychology (MA)") {
			if (concentration == "Experimental" || concentration == "Industrial Organization" || concentration == "School") {	
				if (concentration == "Experimental")
					I_Adm_Plan.value = "PSYE";
				else if (concentration == "Industrial Organization")
					I_Adm_Plan.value = "PSYO";
				else if (concentration == "School")
					I_Adm_Plan.value = "PSYS";
				
				Ext_Subject_Area.value="PSY";
			}
			else if (concentration == "Mental Health Counseling")
					Ext_Subject_Area.value="MHLC";
			else
				Ext_Subject_Area.value="ERROR PSYCHOLOGY";
			
			Acad_Prog.value="GAS";
		}
		else if (program == "Public Relations (MA)") {
			Ext_Subject_Area.value="PUBL";
			Acad_Prog.value="GAS";
		}
		else
			Ext_Subject_Area.value="ERROR MASTERS";
	
	}
	if (gradprogram == "Certificate") {
		if (program == "Education Technology")
			Ext_Subject_Area.value="EDT";
		else if (program == "Telecommunications/Web System Development")
			Ext_Subject_Area.value="TEL";
		else if (program == "Non-Profit Public Relations")
			Ext_Subject_Area.value="NPPR";
		else{
			Ext_Subject_Area.value="ERROR CERTIFICATE";
		}
		Acad_Prog.value="GAS";
		I_Adm_Plan.value="CERT";
	}
	if (gradprogram == "Advanced Certificate") {
		if (program == "Alcohol & Substance Abuse Counseling" || program == "Communication" || program == "Marriage and Family Therapy") {
			if (program == "Alcohol & Substance Abuse Counseling")
				Ext_Subject_Area.value="DAA";
			else if (program == "Communication")
				Ext_Subject_Area.value="COMM";
			else if (program == "Marriage and Family Therapy")
				Ext_Subject_Area.value="CNSF";
			
			Acad_Prog.value="GAS";
		}
		else if (program == "Business Continuity and Risk Management" || program == "E-Commerce" || program == "General Accounting" 
				|| program == "International Business" || program == "Public Accounting" || program == "Sports and Entertainment Business") {
				
			if (program == "Business Continuity and Risk Management")
				Ext_Subject_Area.value="BCRM";
			else if (program == "E-Commerce")
				Ext_Subject_Area.value="ELC";
			else if (program == "General Accounting")
				Ext_Subject_Area.value="ACCG";
			else if (program == "International Business")
				Ext_Subject_Area.value="INB";
			else if (program == "Public Accounting")
				Ext_Subject_Area.value="ACCP";
			else if (program == "Sports and Entertainment Business")
				Ext_Subject_Area.value="SPT";
			else
				Ext_Subject_Area.value="ERROR ADVANCED CERTIFICATE";
			
			Acad_Prog.value="GHSB";
		}
		I_Adm_Plan.value="CERT";
	}

	
	
	else
		Ext_Subject_Area.value="ERROR";
		
	fillAdmissionsRep();
}

function fillAdmissionsRep() {
	var campus = document.getElementById("campus").value;
	var gradprogram = document.getElementById("gradprogram").value;
	var program = document.getElementById("program").value;
	var concentration = document.getElementById("concentration").value;
	var specialization = document.getElementById("specialization").value;
	
	var AdmissionsRep = document.getElementById("AdmissionsRep");
	
	switch(gradprogram){
		case "Certificate":
			if(program == "Non-Profit Public Relations"){
				AdmissionsRep.value = "Josh Gombo";
			}
			break;
		case "Advanced Certificate":
			switch(program){
				case "E-commerce":
				case "International Business":
					AdmissionsRep.value = "Alana Matuszewski";
					break;
				case "Health Care Management":
				case "Long Term Care Administration Management":
				case "Infrastructure Management":
				case "Business Continuity and Risk Management":
				case "General Accounting":
				case "Public Accounting":
				case "Sports Entertainment and Business":
					AdmissionsRep.value = "Ben Fan";
					break;
				case "Communication":
					AdmissionsRep.value = "Elizabeth Kucharek";
					break;
				case "Alcohol & Substance Abuse Counseling":
					AdmissionsRep.value = "Eunice Gomez";
					break;
				case "Forensic Criminology and Criminal Justice":
				case "Campaigns and Elections":
				case "Marriage and Family Therapy":
					AdmissionsRep.value = "Josh Gombo";
					break;
				default:
					AdmissionsRep.value = "Josh Gombo";
			}
			break;
		case "Masters":
			switch(program){
				case "Business Administration (MBA)":
					switch(concentration){
						case "General Accounting":
						case "Public Accounting":
						case "Health Care Management":
							AdmissionsRep.value = "Ben Fan";
							break;
						case "Human Resource Management":
							AdmissionsRep.value = "Alana Matuszewski";
							break;
						case "Financial Management":
						case "Information Systems":
						case "Marketing":
						case "Management":
							campus=="Rockland" ? AdmissionsRep.value = "Alana Matuszewski" : AdmissionsRep.value = "Ben Fan";
							break;
						default:
							AdmissionsRep.value = "Alana Matuszewski";
					}
					break;
				case "Computer Science (MS)":
				case "English (MA)":
				case "History (MA)":
				case "Public Relations (MA)":
					AdmissionsRep.value = "Elizabeth Kucharek";
					break;
				case "Education/Teaching - MST (Career Changers)":
					switch(concentration){
						case "Dual: Early Childhood/Childhood (Birth to Grade 6)":
						case "Childhood Education (Grades 1-6)":
							AdmissionsRep.value = "Elizabeth Kucharek";
							break;
						case "Adolescence Education (Grades 7-12)":
							switch(specialization){
								case "Mathemetics":
								case "Italian":
									AdmissionsRep.value = "Elizabeth Kucharek";
									break;
								case "English":
								case "Social Studies":
								case "Biology":
								case "Spanish":
									AdmissionsRep.value = "Eunice Gomez";
								default:
									AdmissionsRep.value = "Elizabeth Kucharek";
							}
							break;
						case "Childhood/Special Education":
							campus=="Rockland" ? AdmissionsRep.value = "Elizabeth Kucharek" : AdmissionsRep.value = "New Rochelle";
							break;
						default:
							AdmissionsRep.value = "Elizabeth Kucharek";
					}
				case "Education - MSEd (Current Teachers)":
					switch(concentration){
						case "Literacy Education":
						case "Educational Leadership":
							AdmissionsRep.value = "Elizabeth Kucharek";
							break;
						case "Adolescence Education (Grades 7-12)":
							specialization == "Italian" ? AdmissionsRep.value = "Eunice Gomez" : AdmissionsRep.value = "Elizabeth Kucharek";
							break;
						case "Literacy/Special Education":
							campus=="Rockland" ? AdmissionsRep.value = "Elizabeth Kucharek" : AdmissionsRep.value = "New Rochelle";
							break;
						default:
							AdmissionsRep.value = "Elizabeth Kucharek";
					}
				case "Foreign Languages (MA)":
					AdmissionsRep.value = "Eunice Gomez"
					break;
				case "Counseling (MS)":
				case "Criminal Justice (MS)":
				case "Psychology (MA)":
					AdmissionsRep.value = "Josh Gombo";
					break;
				default:
					AdmissionsRep.value = "Josh Gombo";
			}
			break;
		default:
			AdmissionsRep.value = "Josh Gombo";
	}
	
}
