//JavaScript to display email for IT Personnel

//variable to store the domain of the email address
var domain = "@nic.edu";


//Use three parallel arrays to store the information for 
//one person.  The array index corresponds to the same
//IT person in each array; for example, array index 0 
//corresponds to Steve Ruppel


//array to hold name of IT Personnel
var itPerson = new Array(32);
itPerson[0] = "sar";
itPerson[1] = "slb";
itPerson[2] = "ccc";
itPerson[3] = "lkc";
itPerson[4] = "wec";
itPerson[5] = "sjc";
itPerson[6] = "jld";
itPerson[7] = "mkj";
itPerson[8] = "mmj";
itPerson[9] = "kal";
itPerson[10] = "aam";
itPerson[11] = "cjb";
itPerson[12] = "dam";
itPerson[13] = "rwo";
itPerson[14] = "jls";
itPerson[15] = "mas";
itPerson[16] = "sds";
itPerson[17] = "pms";
itPerson[18] = "sbt";
itPerson[19] = "rcg";
itPerson[20] = "djp";
itPerson[21] = "hdm";
itPerson[22] = "rsm";
itPerson[23] = "ghb";
itPerson[24] = "aaf";
itPerson[25] = "nbj";
itPerson[26] = "dln";
itPerson[27] = "pjf";
itPerson[28] = "clm";
itPerson[29] = "ab";
itPerson[30] = "jep";
itPerson[31] = "als";


//array to hold coded name of IT Personnel
//displays the coded email of the IT person
//@nic.edu is &#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;
var itCoded = new Array(32);
itCoded[0] = "&#83;&#116;&#101;&#118;&#101;&#95;&#82;&#117;&#112;&#112;&#101;&#108;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[1] = "&#83;&#116;&#101;&#118;&#101;&#95;&#66;&#97;&#117;&#109;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[2] = "&#67;&#104;&#97;&#114;&#108;&#101;&#121;&#95;&#67;&#97;&#104;&#105;&#108;&#108;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[3] = "&#76;&#105;&#115;&#97;&#95;&#67;&#108;&#97;&#114;&#107;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[4] = "&#66;&#105;&#108;&#108;&#95;&#67;&#108;&#101;&#97;&#118;&#105;&#110;&#103;&#101;&#114;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[5] = "&#83;&#104;&#101;&#108;&#108;&#101;&#121;&#95;&#67;&#111;&#98;&#101;&#116;&#116;&#111;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[6] = "&#74;&#101;&#115;&#115;&#101;&#95;&#68;&#97;&#118;&#105;&#115;&#111;&#110;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[7] = "&#75;&#97;&#109;&#105;&#95;&#74;&#101;&#110;&#107;&#115;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[8] = "&#77;&#101;&#108;&#105;&#115;&#115;&#97;&#95;&#74;&#101;&#115;&#115;&#101;&#110;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[9] = "&#75;&#114;&#97;&#105;&#103;&#95;&#76;&#121;&#116;&#108;&#101;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[10] = "&#65;&#109;&#121;&#95;&#77;&#97;&#121;&#101;&#114;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[11] = "&#67;&#74;&#95;&#66;&#97;&#110;&#107;&#115;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[12] = "&#68;&#111;&#110;&#95;&#77;&#117;&#114;&#112;&#104;&#121;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[13] = "&#82;&#97;&#110;&#110;&#100;&#97;&#108;&#108;&#95;&#79;&#101;&#110;&#115;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[14] = "&#106;&#108;&#115;&#104;&#101;&#102;&#102;&#105;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[15] = "&#77;&#105;&#99;&#104;&#97;&#101;&#108;&#95;&#83;&#108;&#117;&#112;&#99;&#122;&#121;&#110;&#115;&#107;&#105;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[16] = "&#83;&#116;&#101;&#118;&#101;&#95;&#83;&#109;&#105;&#116;&#104;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[17] = "&#80;&#97;&#117;&#108;&#95;&#83;&#119;&#97;&#105;&#109;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[18] = "&#83;&#116;&#101;&#118;&#101;&#95;&#84;&#97;&#121;&#108;&#111;&#114;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[19] = "&#82;&#111;&#98;&#101;&#114;&#116;&#95;&#71;&#105;&#98;&#115;&#111;&#110;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[20] = "&#68;&#111;&#110;&#110;&#97;&#95;&#80;&#97;&#116;&#116;&#101;&#114;&#115;&#111;&#110;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[21] = "&#72;&#111;&#108;&#108;&#121;&#95;&#77;&#111;&#111;&#114;&#101;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[22] = "&#82;&#105;&#99;&#104;&#97;&#114;&#100;&#95;&#77;&#97;&#116;&#104;&#101;&#119;&#115;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[23] = "&#71;&#114;&#97;&#110;&#116;&#95;&#66;&#114;&#111;&#119;&#110;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[24] = "&#65;&#108;&#108;&#105;&#115;&#111;&#110;&#95;&#70;&#111;&#114;&#100;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[25] = "&#78;&#117;&#114;&#98;&#101;&#107;&#95;&#74;&#117;&#109;&#97;&#121;&#101;&#118;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[26] = "&#68;&#101;&#110;&#110;&#105;&#115;&#95;&#78;&#111;&#111;&#114;&#100;&#97;&#109;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;";
itCoded[27] = "&#80;&#97;&#116;&#114;&#105;&#99;&#107;&#95;&#70;&#111;&#114;&#100;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;"
itCoded[28] = "&#67;&#104;&#114;&#105;&#115;&#116;&#111;&#112;&#104;&#101;&#114;&#95;&#77;&#97;&#116;&#116;&#101;&#115;&#111;&#110;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;"
itCoded[29] = "&#65;&#110;&#100;&#114;&#101;&#97;&#115;&#95;&#66;&#117;&#114;&#103;&#101;&#114;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;"
itCoded[30] = "&#74;&#97;&#110;&#101;&#116;&#95;&#80;&#97;&#114;&#107;&#115;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117;"
itCoded[31] = "&#65;&#108;&#101;&#120;&#95;&#83;&#109;&#105;&#116;&#104;&#64;&#110;&#105;&#99;&#46;&#101;&#100;&#117"; 


//array to hold email of IT Personnel
var itAddr = new Array(32);
itAddr[0] = "Steve_Ruppel";
itAddr[1] = "Steve_Baum";
itAddr[2] = "Charley_Cahill";
itAddr[3] = "Lisa_Clark";
itAddr[4] = "Bill_Cleavinger";
itAddr[5] = "Shelley_Cobetto";
itAddr[6] = "Jesse_Davison";
itAddr[7] = "Kami_Jenks";
itAddr[8] = "Melissa_Jessen";
itAddr[9] = "Kraig_Lytle";
itAddr[10] = "Amy_Mayer";
itAddr[11] = "CJ_Banks";
itAddr[12] = "Don_Murphy";
itAddr[13] = "Randall_Oens";
itAddr[14] = "jlsheffi";
itAddr[15] = "Michael_Slupczynski";
itAddr[16] = "Steve_Smith";
itAddr[17] = "Paul_Swaim";
itAddr[18] = "Steve_Taylor";
itAddr[19] = "Robert_Gibson";
itAddr[20] = "Donna_Patterson";
itAddr[21] = "Holly_Moore";
itAddr[22] = "Richard_Mathews";
itAddr[23] = "Grant_Brown";
itAddr[24] = "Allison_Ford";
itAddr[25] = "Nurbek_Jumayev";
itAddr[26] = "Dennis_Noordam";
itAddr[27] = "Patrick_Ford";
itAddr[28] = "Christopher_Matteson";
itAddr[29] = "Andreas_Burger";
itAddr[30] = "Janet_Parks";
itAddr[31] = "Alex_Smith";


function getAddr(thePerson)
{
	//first search for the IT person in the
	//itPerson array
	for(loopIndex = 0;loopIndex < itPerson.length; loopIndex++)
	{
		if(itPerson[loopIndex] == thePerson)
		{
			//if a match is found, display the name with a mailto link
			var addr = itAddr[loopIndex] + domain;
			document.write("<" + "a" + " " + "href=" + "mail" + "to:" + addr + ">" + itCoded[loopIndex] + "</a>");
		}
	}//end for loop to search array for the IT person

}

