////////////////////////////////////////////////////////////////////////jsFormValidatorCA.js
function ValidateFieldsExtended(theForm)
{

	var temp = new Array();	
	var allValid = true;  
	var checkStr = "";
	var checkOK ;
	var len;
	//check the zip code first.  This is used to find a location.
	//zip code
  	  if (theForm.zip.value == "")
	  {
	    alert("Please enter a value for the zip code.");
	    theForm.zip.focus();
	    return (false);
	  }
	  checkStr = theForm.zip.value;
		//replace all characters that aren't numeric.
		for (i = 0;  i < checkStr.length;  i++)
		  {
				//the individual character to be checked.
				ch = checkStr.charAt(i);
				if(!isNaN(ch)) //strip out all non numeric characters.
					checkStr.substring(i,1).replace(ch,'');						
		  }
	if (theForm.campus.value == "")
	{
		alert("Please select a preferred location.");//\"enroll\" options.");
		theForm.campus.focus();
		return (false);
	}
	
  temp[0] = theForm.firstname.value; 
  temp[1] = theForm.lastname.value;
  for( b = 0; b < 2; b++)
  {  
	 //go through each character to determine if this is an alpha or a hypen.  Numbers are not allowed.		
			  checkStr = temp[b];	
			  //first and last names are required.
			  if(checkStr.length == 0)
			  {
				alert("The First and Last Name fields are required.");
				b == 0 ? theForm.firstname.focus():theForm.lastname.focus();
				return(false);			
			  }
			  for (i = 0;  i < checkStr.length;  i++)
			  {
					//the individual character to be checked.
					ch = checkStr.charAt(i);
					if(!isNaN(ch) || ch == "-") //if this is numeric and not a hyphen - invalid
					{
						alert("Numbers and spaces not allowed in the name fields.");
						b == 0 ? theForm.firstname.focus():theForm.lastname.focus();
						return (false);
					}
			  }
   }
  
	checkStr = theForm.phone.value;
		//replace all characters that aren't numeric.
		for (i = 0;  i < checkStr.length;  i++)
		  {
				//the individual character to be checked.
				ch = checkStr.charAt(i);
				if(isNaN(ch) ) //strip out all non numeric characters.
				{
					//replace any non numeric value with an X.  then they are all replaced before being sent through.
					checkStr = checkStr.replace( ch, "X" );
				}
					
		  }
		 
		 checkStr = checkStr.replace( /X/g, '' );//replace the X with nothing.
		 theForm.phone.value = checkStr.substring(0,10);
		  //after stripping out all of the characters, the phone number has to be at least 10 numbers.
		  if(checkStr.length < 10)
		  {
			alert("The phone number and area code must contain at least 10 numbers.");
				theForm.phone.focus();
			//don't go any further.
			return (false);			  
		  }	
					
	if(theForm.address.value == "")
	{
		alert("Please enter the address");
	    theForm.address.focus();
	    return (false);
	}	
	
	if(theForm.txtCity.value == "")
	{
		alert("Please enter the city");
	    theForm.txtCity.focus();
	    return (false);
	}											
	if(theForm.ddState.value == "")
	{
		alert("Please enter the state");
	    theForm.ddState.focus();
	    return (false);
	}
	//email field is required
	if (theForm.txtEmailAddress.value == "")
	 {
	    alert("Please enter a valid email address");
	    theForm.txtEmailAddress.focus();
	    return (false);
	  }
  
	  var value = theForm.txtEmailAddress.value;
	  apos=value.indexOf("@");
	  dotpos=value.lastIndexOf(".");

	  if (apos<1||dotpos-apos<2)
	  {
	    alert("Please enter valid email addreess");
	    return (false);
	  }
  
  if (theForm.program.value == "")
  {
    alert("Please select a program of interest.");
    theForm.program.focus();
    return (false);
  }
	
	  
  if (theForm.hs_graduation.value == "")
  {
		alert("Please enter your graduation year.");
		theForm.ddHSGradYear.focus();
		//don't go any further.
		return (false);	
  }
	//if the code reached this point, then all of the fields passed validation.
	return (true);

}
//SIMPLE FORM VALIDATION
function ValidateFields(theForm)
{

	var temp = new Array();	
	var allValid = true;  
	var checkStr = "";
	var checkOK ;
	var len;
		
	if (theForm.campus.value == "")
	{
		alert("Please select a preferred location.");//\"enroll\" options.");
		theForm.campus.focus();
		return (false);
	}
	
  temp[0] = theForm.firstname.value;
  temp[1] = theForm.lastname.value;
  for( b = 0; b < 2; b++)
  {  
	 //go through each character to determine if this is an alpha or a hypen.  Numbers are not allowed.		
			  checkStr = temp[b];	
			  //first and last names are required.
			  if(checkStr.length == 0)
			  {
				alert("The First and Last Name fields are required.");
				b == 0 ? theForm.firstname.focus():theForm.lastname.focus();
				return(false);			
			  }
			  for (i = 0;  i < checkStr.length;  i++)
			  {
					//the individual character to be checked.
					ch = checkStr.charAt(i);
					if(!isNaN(ch) || ch == "-") //if this is numeric and not a hyphen - invalid
					{
						alert("Numbers are not allowed in the name fields.");
						b == 0 ? theForm.firstname.focus():theForm.lastname.focus();
						return (false);
					}
			  }
   }
  
   checkStr = theForm.phone.value;
		//replace all characters that aren't numeric.
		for (i = 0;  i < checkStr.length;  i++)
		  {
				//the individual character to be checked.
				ch = checkStr.charAt(i);
				if(isNaN(ch) || ch == ' ') //strip out all non numeric characters.
				{
					//replace any non numeric value with an X.  then they are all replaced before being sent through.
					checkStr = checkStr.replace( ch, "X" );
				}
					
		  }
		 
		 checkStr = checkStr.replace( /X/g, '' );//replace the X with nothing.
		 theForm.phone.value = checkStr.substring(0,10);
		  //after stripping out all of the characters, the phone number has to be at least 10 numbers.
		  if(checkStr.length < 10)
		  {
			alert("The phone number and area code must contain at least 10 numbers.");
				theForm.phone.focus();
			//don't go any further.
			return (false);			  
		  }	
				
	//email field is required
	if (theForm.email.value == "")
	 {
	    alert("Please enter a valid email address");
	    theForm.email.focus();
	    return (false);
	  }
  
	  var value = theForm.email.value;
	  apos=value.indexOf("@");
	  dotpos=value.lastIndexOf(".");

	  if (apos<1||dotpos-apos<2)
	  {
	    alert("Please enter valid email addreess");
	    return (false);
	  }
  
  if (theForm.program.value == "")
  {
    alert("Please select a program of interest.");
    theForm.program.focus();
    return (false);
  }
      
  //zip code
  	  if (theForm.zip.value == "")
	  {
	    alert("Please enter a value for the zip code.");
	    theForm.zip.focus();
	    return (false);
	  }
	  checkStr = theForm.zip.value;
		//replace all characters that aren't numeric.
		for (i = 0;  i < checkStr.length;  i++)
		  {
				//the individual character to be checked.
				ch = checkStr.charAt(i);
				if(!isNaN(ch)) //strip out all non numeric characters.
					checkStr.substring(i,1).replace(ch,'');						
		  }
	  //after stripping out all of the characters, the phone number has to be at least 10 numbers.
	  if(checkStr.length < 5)
	  {
		alert("The zip code must be at least 5 numbers in length.");
		theForm.zip.focus();
		//don't go any further.
		return (false);			  
	  }	
	//if the code reached this point, then all of the fields passed validation.
	return (true);
}
function setIndex()
{
	if(document.getElementById("campus").value == "campus" || document.getElementById("campus").value == "cec")
	{
		document.getElementById("campus").selectedIndex = 0;		
	}
}
function setProgramName(theObject) { 
	document.getElementById("programfullname").value = theObject.getElementsByTagName("option")[theObject.selectedIndex].innerHTML;
}  
////////////////////////////////////////////////////////////////////////populatefields.js
  //these are a list of all the ZIP codes valid for each school.  the index is campus ID as well.

var zipCodes = new Array();         
         //Denver
         zipCodes["2"] = "[80102] [80105] [80135] [80421] [80136] [80433] [80026] [80027] [80233] [80005] [80107] [80235] [80018] [80514] [80401] [80260] [80109] [80234] [80128] [80603] [80129] [80016] [80302] [80516] [80602] [80124] [80031] [80439] [80002] [80003] [80004] [80010] [80011] [80012] [80013] [80014] [80015] [80017] [80019] [80020] [80021] [80022] [80030] [80033] [80040] [80042] [80044] [80045] [80046] [80047] [80104] [80110] [80111] [80112] [80113] [80120] [80121] [80122] [80123] [80126] [80130] [80134] [80150] [80151] [80155] [80160] [80161] [80165] [80166] [80202] [80203] [80204] [80205] [80206] [80207] [80208] [80209] [80210] [80211] [80212] [80214] [80215] [80216] [80217] [80218] [80219] [80220] [80221] [80222] [80223] [80224] [80226] [80227] [80228] [80229] [80230] [80231] [80232] [80236] [80237] [80239] [80241] [80243] [80244] [80246] [80247] [80248] [80249] [80250] [80251] [80256] [80257] [80259] [80261] [80262] [80265] [80266] [80271] [80273] [80274] [80279] [80280] [80281] [80290] [80291] [80293] [80294] [80295] [80299] [80465] [80621] [80640]"
		//Colorado Springs
		zipCodes["3"] =  "[80106] [80117] [80118] [80132] [80133] [80449] [80737] [80808] [80809] [80813] [80814] [80816] [80817] [80819] [80827] [80829] [80831] [80832] [80833] [80835] [80840] [80841] [80860] [80863] [80864] [80866] [80901] [80902] [80903] [80904] [80905] [80906] [80907] [80908] [80909] [80910] [80911] [80912] [80913] [80914] [80915] [80916] [80917] [80918] [80919] [80920] [80921] [80922] [80923] [80924] [80925] [80926] [80927] [80928] [80929] [80930] [80931] [80932] [80933] [80934] [80935] [80936] [80937] [80938] [80939] [80940] [80941] [80942] [80943] [80944] [80945] [80946] [80947] [80949] [80950] [80951] [80960] [80962] [80970] [80977] [80995] [80997] [81001] [81003] [81004] [81005] [81006] [81007] [81008] [81022] [81023] [81132] [81152] [81212] [81215] [81221] [81223] [81226] [81240] [81244]";
		//Fort Collins
		zipCodes["4"] = "[80106] [80501] [80502] [80503] [80504] [80510] [80511] [80512] [80513] [80515] [80517] [80520] [80521] [80522] [80523] [80524] [80525] [80526] [80527] [80528] [80530] [80532] [80533] [80534] [80535] [80536] [80537] [80538] [80539] [80540] [80541] [80542] [80543] [80546] [80547] [80549] [80550] [80551] [80553] [80610] [80612] [80615] [80620] [80622] [80623] [80631] [80632] [80633] [80634] [80638] [80639] [80644] [80645] [80646] [80648] [80650] [80651] [80653] [80654] [80701] [80723] [80733] [80751] [80835]";
		//Cheyenne
		zipCodes["5"] = "[69128] [80427] [80446] [80512] [80521] [80522] [80523] [80524] [80525] [80526] [80527] [80528] [80535] [80536] [80545] [80546] [80547] [80549] [80550] [80553] [80610] [80611] [80612] [80615] [80622] [80624] [80631] [80632] [80646] [80648] [80650] [80729] [80732] [81151] [81624] [82001] [82002] [82003] [82005] [82006] [82007] [82008] [82009] [82010] [82050] [82052] [82053] [82054] [82059] [82060] [82061] [82063] [82070] [82071] [82072] [82073] [82081] [82082] [82084] [82201] [82210] [82217] [82221] [82223] [82225] [82240] [82325] [82902] [82937] [83118] [83124]";
		//Phoenix
		zipCodes["6"] = "[85345] [85339] [85379] [85212] [85210] [85281] [85353] [85326] [85323] [85308] [85027] [85001] [85002] [85003] [85004] [85005] [85006] [85007] [85008] [85009] [85011] [85012] [85013] [85014] [85015] [85016] [85017] [85018] [85019] [85020] [85021] [85023] [85025] [85026] [85029] [85030] [85031] [85032] [85033] [85034] [85035] [85037] [85040] [85041] [85042] [85043] [85051] [85053] [85055] [85060] [85061] [85063] [85064] [85065] [85067] [85069] [85071] [85072] [85073] [85074] [85075] [85079] [85082] [85098] [85099] [85201] [85301] [85302] [85303] [85304] [85307] [85311] [85313] [85335]";
		//Flagstaff
		zipCodes["7"] = "[85902] [85931] [85933] [85939] [86001] [86002] [86003] [86004] [86011] [86015] [86016] [86017] [86018] [86023] [86024] [86025] [86032] [86035] [86038] [86040] [86044] [86045] [86046] [86047] [86301] [86303] [86304] [86312] [86313] [86314] [86320] [86321] [86322] [86323] [86324] [86325] [86326] [86327] [86329] [86331] [86333] [86334] [86335] [86336] [86337] [86339] [86340] [86341] [86342] [86351] [86434] [86502] [86504] [86505] [86511] [86512]";

		//degrees offered only at certain campuses
		var degreesByCampus = new Array(39);//TO DO:  change the array length when completed to actual length.
		for (i = 0; i < degreesByCampus.length; ++ i)
			degreesByCampus [i] = new Array(4);
			
			//   DENVER 2, Col Springs32, Ft. Collins 4, Cheyenne 5, Flagstaff 6 Phoenix 7,
			//populate campus,program, programid
			degreesByCampus [0] [0] = "Denver";//campus name
			degreesByCampus [0] [1] = "19";//program id
			degreesByCampus [0] [2] = "AS in Business Management and Accounting";//program name
			degreesByCampus [0] [3] = "2";//campu id
					
			degreesByCampus [1] [0] = "Denver";
			degreesByCampus [1] [1] = "20";
			degreesByCampus [1] [2] = "AS in Business Mgmt & Acctg -> Property Mgmt";
			degreesByCampus [1] [3] = "2";
			
			degreesByCampus [2] [0] = "Denver";
			degreesByCampus [2] [1] = "22";
			degreesByCampus [2] [2] = "AS in Computer Programming";
			degreesByCampus [2] [3] = "2";
			
			degreesByCampus [3] [0] = "Denver";
			degreesByCampus [3] [1] = "21";
			degreesByCampus [3] [2] = "AS in Graphic Arts";
			degreesByCampus [3] [3] = "2";
			
			degreesByCampus [4] [0] = "Denver";
			degreesByCampus [4] [1] = "16";
			degreesByCampus [4] [2] = "BS in Accounting";
			degreesByCampus [4] [3] = "2";
			
			degreesByCampus [5] [0] = "Denver";
			degreesByCampus [5] [1] = "15";
			degreesByCampus [5] [2] = "BS in Business Admin -> Property Mgmt";
			degreesByCampus [5] [3] = "2";
			
			degreesByCampus [6] [0] = "Denver";
			degreesByCampus [6] [1] = "14";
			degreesByCampus [6] [2] = "BS in Business Administration";
			degreesByCampus [6] [3] = "2";
			
			degreesByCampus [7] [0] = "Denver";
			degreesByCampus [7] [1] = "18";
			degreesByCampus [7] [2] = "BS in Computer Science";
			degreesByCampus [7] [3] = "2";
			
			degreesByCampus [8] [0] = "Denver";
			degreesByCampus [8] [1] = "17";
			degreesByCampus [8] [2] = "BS in Healthcare Administration";
			degreesByCampus [8] [3] = "2";
			
			degreesByCampus [9] [0] = "Colorado Springs";
			degreesByCampus [9] [1] = "19";
			degreesByCampus [9] [2] = "AS in Business Management and Accounting";
			degreesByCampus [9] [3] = "3";
			
			degreesByCampus [10] [0] = "Colorado Springs";
			degreesByCampus [10] [1] = "20";
			degreesByCampus [10] [2] = "AS in Business Mgmt & Acctg -> Property Mgmt";
			degreesByCampus [10] [3] = "3";
			
			degreesByCampus [11] [0] = "Colorado Springs";
			degreesByCampus [11] [1] = "22";
			degreesByCampus [11] [2] = "AS in Computer Programming";
			degreesByCampus [11] [3] = "3";
			
			degreesByCampus [12] [0] = "Colorado Springs";
			degreesByCampus [12] [1] = "21";
			degreesByCampus [12] [2] = "AS in Graphic Arts";
			degreesByCampus [12] [3] = "3";
			
			degreesByCampus [13] [0] = "Colorado Springs";
			degreesByCampus [13] [1] = "16";
			degreesByCampus [13] [2] = "BS in Accounting";
			degreesByCampus [13] [3] = "3";
			
			degreesByCampus [14] [0] = "Colorado Springs";
			degreesByCampus [14] [1] = "15";
			degreesByCampus [14] [2] = "BS in Business Admin -> Property Mgmt";
			degreesByCampus [14] [3] = "3";
			
			degreesByCampus [15] [0] = "Colorado Springs";
			degreesByCampus [15] [1] = "14";
			degreesByCampus [15] [2] = "BS in Business Administration";
			degreesByCampus [15] [3] = "3";
			
			degreesByCampus [16] [0] = "Colorado Springs";
			degreesByCampus [16] [1] = "18";
			degreesByCampus [16] [2] = "BS in Computer Science";
			degreesByCampus [16] [3] = "3";
			
			degreesByCampus [17] [0] = "Colorado Springs";
			degreesByCampus [17] [1] = "17";
			degreesByCampus [17] [2] = "BS in Healthcare Administration";
			degreesByCampus [17] [3] = "3";
			
			degreesByCampus [18] [0] = "Ft. Collins";
			degreesByCampus [18] [1] = "19";
			degreesByCampus [18] [2] = "AS in Business Management and Accounting";
			degreesByCampus [18] [3] = "4";
			
			degreesByCampus [19] [0] = "Ft. Collins";
			degreesByCampus [19] [1] = "20";
			degreesByCampus [19] [2] = "AS in Business Mgmt & Acctg -> Property Mgmt";
			degreesByCampus [19] [3] = "4";
			
			degreesByCampus [20] [0] = "Ft. Collins";
			degreesByCampus [20] [1] = "22";
			degreesByCampus [20] [2] = "AS in Computer Programming";
			degreesByCampus [20] [3] = "4";
			
			degreesByCampus [21] [0] = "Ft. Collins";
			degreesByCampus [21] [1] = "21";
			degreesByCampus [21] [2] = "AS in Graphic Arts";
			degreesByCampus [21] [3] = "4";
			
			degreesByCampus [22] [0] = "Ft. Collins";
			degreesByCampus [22] [1] = "16";
			degreesByCampus [22] [2] = "BS in Accounting";
			degreesByCampus [22] [3] = "4";
			
			degreesByCampus [23] [0] = "Ft. Collins";
			degreesByCampus [23] [1] = "15";
			degreesByCampus [23] [2] = "BS in Business Admin -> Property Mgmt";
			degreesByCampus [23] [3] = "4";
			
			degreesByCampus [24] [0] = "Ft. Collins";
			degreesByCampus [24] [1] = "14";
			degreesByCampus [24] [2] = "BS in Business Administration";
			degreesByCampus [24] [3] = "4";
			
			degreesByCampus [25] [0] = "Ft. Collins";
			degreesByCampus [25] [1] = "18";
			degreesByCampus [25] [2] = "BS in Computer Science";
			degreesByCampus [25] [3] = "4";
			
			degreesByCampus [26] [0] = "Ft. Collins";
			degreesByCampus [26] [1] = "17";
			degreesByCampus [26] [2] = "BS in Healthcare Administration";
			degreesByCampus [26] [3] = "4";
			
			degreesByCampus [27] [0] = "Cheyenne";
			degreesByCampus [27] [1] = "19";
			degreesByCampus [27] [2] = "AS in Business Management and Accounting";
			degreesByCampus [27] [3] = "5";
			
			degreesByCampus [28] [0] = "Cheyenne";
			degreesByCampus [28] [1] = "20";
			degreesByCampus [28] [2] = "AS in Business Mgmt & Acctg -> Property Mgmt";
			degreesByCampus [28] [3] = "5";
			
			degreesByCampus [29] [0] = "Cheyenne";
			degreesByCampus [29] [1] = "21";
			degreesByCampus [29] [2] = "AS in Graphic Arts";
			degreesByCampus [29] [3] = "5";
			
			degreesByCampus [30] [0] = "Cheyenne";
			degreesByCampus [30] [1] = "16";
			degreesByCampus [30] [2] = "BS in Accounting";
			degreesByCampus [30] [3] = "5";
			
			degreesByCampus [31] [0] = "Cheyenne";
			degreesByCampus [31] [1] = "15";
			degreesByCampus [31] [2] = "BS in Business Admin -> Property Mgmt";
			degreesByCampus [31] [3] = "5";
			
			degreesByCampus [32] [0] = "Cheyenne";
			degreesByCampus [32] [1] = "14";
			degreesByCampus [32] [2] = "BS in Business Administration";
			degreesByCampus [32] [3] = "5";
			
			degreesByCampus [33] [0] = "Cheyenne";
			degreesByCampus [33] [1] = "18";
			degreesByCampus [33] [2] = "BS in Computer Science";
			degreesByCampus [33] [3] = "5";
			
			degreesByCampus [34] [0] = "Cheyenne";
			degreesByCampus [34] [1] = "17";
			degreesByCampus [34] [2] = "BS in Healthcare Administration";
			degreesByCampus [34] [3] = "5";
			
			degreesByCampus [35] [0] = "Flagstaff";
			degreesByCampus [35] [1] = "17";
			degreesByCampus [35] [2] = "BS in Healthcare Administration";			
			degreesByCampus [35] [3] = "6";
			
			degreesByCampus [36] [0] = "Denver";//campus name
			degreesByCampus [36] [1] = "176";//program id
			degreesByCampus [36] [2] = "AS in Nursing";//program name
			degreesByCampus [36] [3] = "2";//campus id
			
			degreesByCampus [37] [0] = "Phoenix";
			degreesByCampus [37] [1] = "17";
			degreesByCampus [37] [2] = "BS in Healthcare Administration";			
			degreesByCampus [37] [3] = "7";
			
			degreesByCampus [38] [0] = "Phoenix";
			degreesByCampus [38] [1] = "18";
			degreesByCampus [38] [2] = "BS in Computer Science";			
			degreesByCampus [38] [3] = "7";

						
         //non-education center schools show these  ALL CAMPUSES
         var standardDegrees = new Array(2);
		 for (i = 0; i < standardDegrees.length; ++ i)
			standardDegrees [i] = new Array(2);
		//populate standard degree array with codes.
			standardDegrees [0] [0] = "AOS in Medical Specialties";
			standardDegrees [0] [1] = "24";
			
			standardDegrees [1] [0] = "AS in Computer Technology & Networking";
			standardDegrees [1] [1] = "23";
			
						
         
         //custom school-specific degrees are inserted in the $("#campus").change event         
         //all schools show these		 
		var onlineDegrees = new Array(15);//TO DO:  change the array length when completed to actual length.
		for (i = 0; i < onlineDegrees.length; ++ i)
			onlineDegrees [i] = new Array(2);
			//populate online degree array with codes.
			onlineDegrees [0] [0] = "AS in Business Mgmt & Acctg (Online)";
			onlineDegrees [0] [1] = "64";
			
			onlineDegrees [1] [0] = "AS in Business Mgmt & Acctg -> Property Mgmt (Online)";
			onlineDegrees [1] [1] = "65";
			
			onlineDegrees [2] [0] = "AS in Graphic Arts (Online)";
			onlineDegrees [2] [1] = "66";
			
			onlineDegrees [3] [0] = "BS in Accounting (Online)";
			onlineDegrees [3] [1] = "60";
			
			onlineDegrees [4] [0] = "BS in Business Admin (Online)";
			onlineDegrees [4] [1] = "58";
			
			onlineDegrees [5] [0] = "BS in Business Admin-> Property Mgmt (Online)";
			onlineDegrees [5] [1] = "59";
			
			onlineDegrees [6] [0] = "BS in Computer Science (Online)";
			onlineDegrees [6] [1] = "252";
			
			onlineDegrees [7] [0] = "BS in Graphic Arts (Online)";
			onlineDegrees [7] [1] = "61";
			
			onlineDegrees [8] [0] = "BS in Health Science (Online)";
			onlineDegrees [8] [1] = "137";
			
			onlineDegrees [9] [0] = "BS in Nursing - RN Required (Online)";
			onlineDegrees [9] [1] = "136";
			
			onlineDegrees [10] [0] = "BS in Nursing Administration  - RN Required (Online)";
			onlineDegrees [10] [1] = "62";
			
			onlineDegrees [11] [0] = "MS in Business Administration (MBA) (Online)";
			onlineDegrees [11] [1] = "52";
			
			onlineDegrees [12] [0] = "MS in Healthcare Administration (Online)";
			onlineDegrees [12] [1] = "54";
			
			onlineDegrees [13] [0] = "MS in Nursing Administration (Online)";
			onlineDegrees [13] [1] = "53";
			
			onlineDegrees [14] [0] = "MS in Nursing Education - RN Required (Online)";
			onlineDegrees [14] [1] = "141";

			
			// DENVER 1, Col Springs 2, Ft. Collins 3, Cheyenne 4, Flagstaff 6, Phoenix 7
	var campuses = new Array(6);
		for (i = 0; i < campuses.length; ++ i)
			campuses [i] = new Array(2);
			//populate campus / education center list
			campuses [0] [0] = "Denver";
			campuses [0] [1] = "2";
			
			campuses [1] [0] = "Colorado Springs";
			campuses [1] [1] = "3";
			
			campuses [2] [0] = "Ft. Collins";
			campuses [2] [1] = "4";
			
			campuses [3] [0] = "Cheyenne";
			campuses [3] [1] = "5";
			
			campuses [4] [0] = "Flagstaff";
			campuses [4] [1] = "6";

			campuses [5] [0] = "Phoenix";
			campuses [5] [1] = "7";
			

			
			
		

//used to populate the available campuses and education centers based upon zip code.
function getCampusList()
{
	var bFound = false;
	//first, remove the current campus list options.
	RemoveCurrentList('campus');	
	//first, remove the current list options - in case they had selected a previous campus.
	RemoveCurrentList('program');	
	//add "select a program to all program lists as first option.
	var campusList = document.getElementById("campus");
	campusList.options[0] = new Option("Select a Location:","");
	//search the zip code lists.
	var zipCodeVal = document.getElementById('zip').value;
		for (var i in zipCodes) 

                {

                        zips=zipCodes[i];

							if(zips.indexOf(zipCodeVal) > 0)
							{
								addCampus(i);
								bFound = true;
							}												                    
                }
	//if zip code doesn't match any in the list, tell them no campuses found.
if(!bFound)
		alert("We're sorry.  No campuses match the zip code entered.");

}
//once the use has entered a zip code and the zip code was found in the array,
//it's passed to this function to add the campus and value to the campus option list.
function addCampus(intCampusNum)
{	
	//get the campus info
	for(i = 0; i < campuses.length; i++)
	{
		if(campuses[i][1] == intCampusNum)
		{
			campusname = campuses[i][0];
			campusvalue = campuses[i][1];
			break;
		}
	}
	var campusList = document.getElementById('campus');
	var optNum = campusList.length;
	campusList.options[optNum] = new Option(campusname,campusvalue);

}
//used to populate the program list based upon location selection.
function getProgramList()	
{

	var placeholder = 1;
	//get the program select object.
	var programList = document.getElementById('program');	
	//first, remove the current list options.
	RemoveCurrentList('program');	
	//did the user select a valid campus or education center option?
	var campus = document.getElementById("campus").value;//id number
	
	if(campus == 'campus' || campus == 'cec'  || campus == '' )
	{
		document.getElementById("campus").selectedIndex = 0;
		return; //stop function		
	}		
	//add on standard programs
	
		for( i = 0; i < standardDegrees.length; i++)
			{		
					programList.options[placeholder] = new Option(standardDegrees[i][0],standardDegrees[i][1]);
					placeholder++;
			}
	//add "select a program to all program lists as first option.
	programList.options[0] = new Option("Select a Program","");
	for( i = 0; i < degreesByCampus.length; i++)
	{
		if(degreesByCampus[i][3] == campus)
		{
			programList.options[placeholder] = new Option(degreesByCampus[i][2],degreesByCampus[i][1]);
			placeholder++;
		}
	}	

		
	//add on online programs
	for( i = 0; i < onlineDegrees.length; i++)
	{		
			programList.options[placeholder] = new Option(onlineDegrees[i][0],onlineDegrees[i][1]);
			placeholder++;
	}	
}
//remove the selection items from the list to be repopulated based on user selection.
function RemoveCurrentList(list)
{
 
  var selectlist = document.getElementById(list);
  var i;
	  for (i = selectlist.length; i > 0; i--) 
	  {	   
	      selectlist.remove(i);
	  }
}
////////////////////////////////////////////////////////////////////////lib.js
var dtCh= "/";
var minYear=1900;
var maxYear=2100;
function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))){return false;}
    }
    // All characters are numbers.
    return true;
}
function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1){returnString += c;}
    }
    return returnString;
}
function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 === 0) && ( (!(year % 100 === 0)) || (year % 400 === 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31;
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30;}
		if (i==2) {this[i] = 29;}
   }
   return this;
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12);
	var pos1=dtStr.indexOf(dtCh);
	var pos2=dtStr.indexOf(dtCh,pos1+1);
	var strMonth=dtStr.substring(0,pos1);
	var strDay=dtStr.substring(pos1+1,pos2);
	var strYear=dtStr.substring(pos2+1);
	strYr=strYear;
	if (strDay.charAt(0)=="0" && strDay.length>1){strDay=strDay.substring(1);}
	if (strMonth.charAt(0)=="0" && strMonth.length>1){strMonth=strMonth.substring(1);}
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1){strYr=strYr.substring(1);}           
	}
	var month=parseInt(strMonth);
	var day=parseInt(strDay);
	var year=parseInt(strYr);

	if (pos1==-1 || pos2==-1){
		alert("The date format should be : mm/dd/yyyy");
		return false;
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month");
		return false;
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day");
		return false;
	}
	if (strYear.length != 4 || year===0 || year<minYear || year>maxYear){
		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear);
		return false;
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))===false){
		alert("Please enter a valid date");
		return false;
	}
return true;
}

function validate_phone(strValue)
{
	var objRegExp  = /(^\d{3}-\d{3}-\d{4}$)/;
	return objRegExp.test(strValue);

}
