var school0 = new Array();
var school1 = new Array();
var school3 = new Array();
var school4 = new Array();
var school5 = new Array();
var school6 = new Array();
var school7 = new Array();
var school8 = new Array();
var school9 = new Array();
var school10 = new Array();
var school11 = new Array();
var school12 = new Array();
var school13 = new Array();
var school14 = new Array();
var school15 = new Array();

/*
Tom,

Please add SS. Simon & Jude School to the RO Preliminary Registration under Non-Public Schools.

Also, move St Agnes from Other to Non-Public.

Thanks,
*/


school1[1]=""
school1[2]="Avon Grove Sr. High School"
school1[3]="Fred S. Engle Middle School"
school1[4]="Penn London Elementary School"
school1[5]="Avon Grove Intermediate School"
school1[6]="Avon Grove Charter School"

school3[1]=""
school3[2]="Coatesville Senior High School"
school3[3]="Coatesville 9th & 10th Grade Center"
school3[4]="North Brandywine Middle School"
school3[5]="Friendship Elementary School"
school3[6]="Kings Highway Elementary School"
school3[7]="Rainbow Elementary School"
school3[8]="Reeceville Elementary School"
school3[9]="Scott Middle School"
school3[10]="Alternative Education Program - Coatesville"
school3[11]="South Brandywine Middle School"
school3[12]="East Fallowfield Elementary School"
school3[13]="Caln Elementary School"

school4[1]=""
school4[2]="Pickering Valley Elementary School"
school4[3]="Downingtown High School (West Campus)"
school4[4]="Beaver Creek Elementary School"
school4[5]="Brandywine-Wallace Elementary School"
school4[6]="East Ward Elementary School"
school4[7]="Lionville Elementary School"
school4[8]="Lionville Middle School"
school4[9]="Uwchlan Hills Elementary School"
school4[10]="West Bradford Elementary School"
school4[11]="Shamona Creek Elementary School"
school4[12]="Downingtown Middle School"
school4[13]="Bradford Heights Elementary School"
school4[14]="Downingtown High School (East Campus)"
school4[15]="Springton Manor Elementary School"

school5[1]=""
school5[2]="Great Valley High School"
school5[3]="Great Valley Middle School"
school5[4]="Charlestown Elementary School"
school5[5]="Kathryn D. Markley Elementary School"
school5[6]="Sugartown Elementary"
school5[7]="General Wayne Elementary School"

school6[1]=""
school6[2]="Kennett High School"
school6[3]="Greenwood Elementary School"
school6[4]="Mary D. Lang Elementary School"
school6[5]="Kennett Middle School"
school6[6]="New Garden Elementary School"

school7[1]=""
school7[2]="West Fallowfield Christian School"
school7[3]="MontgomerySchool"
school7[4]="Devereux Kanner Center"
school7[5]="St. Joseph School"
school7[6]="CFS: Church Farm School"
school7[7]="Upland Country Day School"
school7[8]="Villa Maria Academy - Upper School"
school7[9]="St. Patrick School"
school7[10]="Vanguard School"
school7[11]="The Crossroads School"
school7[12]="West-Mont Christian Academy"
school7[13]="Woodlyne School"
school7[14]="West Chester Friends School"
school7[15]="West Chester University"
school7[16]="SS. Peter & Paul School"
school7[17]="Assumption BVM"
school7[18]="Malvern Preparatory School"
school7[19]="St. Norberts"
school7[20]="St. Elizabeth"
school7[21]="Pope John Paul II Elementary School"
school7[22]="St. Monica"
school7[23]="SS. Simon & Jude School"
school7[24]="St. Agnes"

school8[1]=""
school8[2]="Octorara Area High School"
school8[3]="Octorara Area Middle School"
school8[4]="Octorara Elementary School"
school8[5]="Octorara Primary Learning Center"
school8[6]="Octorara Intermediate School"

school9[1]=""
school9[2]="Owen J. Roberts High School"
school9[3]="Owen J. Roberts Middle School"
school9[4]="East Coventry Elementary School"
school9[5]="French Creek Elementary School"
school9[6]="North Coventry Elementary School"
school9[7]="East Vincent Elementary School"
school9[8]="West Vincent Elementary School"

school10[1]=""
school10[2]="Oxford Area High School"
school10[3]="Penn's Grove Middle School"
school10[4]="Hopewell Elementary School"
school10[5]="Jordan Bank School"
school10[6]="Nottingham School"

school11[1]=""
school11[2]="Phoenixville Area High School"
school11[3]="Phoenixville Area Middle School"
school11[4]="Barkley Elementary School"
school11[5]="East Pikeland Elementary School"
school11[6]="Schuylkill Elementary School"
school11[7]="Kindergarten Center"
school11[8]="French Creek Learning Center"
school11[9]="Renaissance Academy"

school12[1]=""
school12[2]="Conestoga High School"
school12[3]="Tredyffrin/Easttown Middle School"
school12[4]="Beaumont Elementary School"
school12[5]="Hillside Elementary School"
school12[6]="Devon Elementary School"
school12[7]="Valley Forge Middle School"
school12[8]="New Eagle Elementary School"
school12[9]="Valley Forge Elementary School"

school13[1]=""
school13[2]="Chadds-Ford Elementary School"
school13[3]="Hillendale Elementary School"
school13[4]="Unionville High School"
school13[5]="Unionville Elementary School"
school13[6]="Charles F. Patton Middle School"
school13[7]="Pocopson Elementary School"

school14[1]=""
school14[2]="Exton Elementary School"
school14[3]="B. Reed Henderson High School"
school14[4]="Rustin (Bayard)"
school14[5]="J. R. Fugett Middle School"
school14[6]="E. N. Peirce Middle School"
school14[7]="G.A. Stetson Middle School"
school14[8]="East Bradford Elementary School"
school14[9]="Fern Hill Elementary School"
school14[10]="Glen Acres Elementary School"
school14[11]="East Goshen Elementary"
school14[12]="Penn Wood Elementary School"
school14[13]="Westtown-Thornbury Elementary School"
school14[14]="Sara W. Starkweather Elementary School"
school14[15]="Hillsdale"
school14[16]="Mary C. Howse"
school14[17]="East High School"

school15[1]=""
school15[2]="Collegium Charter School"
school15[3]="Windsor Christian Academy"
school15[4]="Graystone Academy"


function printSchools(schoolArray) {
	var buildingBox = document.getElementById("BuildingName");
	buildingBox.length = 0;
	var x;
	for (x=1;x<schoolArray.length;x++) {
		buildingBox[x-1] = new Option(schoolArray[x],schoolArray[x]);
	}
}

function getSchools(schoolDistrict) {
	var schoolArray;
	switch (schoolDistrict) {
		
		case ("") : {
			schoolArray = school0;
			break;
		}
		
		case ("Avon Grove SD") : {
			schoolArray = school1;
			break;
		}
		
		case ("Coatesville SD") : {
			schoolArray = school3;
			break;
		}
		case ("Downingtown Area SD") : {
			schoolArray = school4;
			break;
		}
		case ("Great Valley SD") : {
			schoolArray = school5;
			break;
		}
		case ("Kennett Consolidated SD") : {
			schoolArray = school6;
			break;
		}
		case ("Non-Public Schools") : {
			schoolArray = school7;
			break;
		}
		case ("Octorara SD") : {
			schoolArray = school8;
			break;
		}
		case ("Owen J. Roberts SD") : {
			schoolArray = school9;
			break;
		}
		case ("Oxford Area SD") : {
			schoolArray = school10;
			break;
		}
		case ("Phoenixville Area SD") : {
			schoolArray = school11;
			break;
		}
		case ("Tredyffrin/Easttown SD") : {
			schoolArray = school12;
			break;
		}
		case ("Unionville-Chadds Ford SD") : {
			schoolArray = school13;
			break;
		}
		case ("West Chester Area SD") : {
			schoolArray = school14;
			break;
		}
		case ("Other") : {
			schoolArray = school15;
			break;
		}
	}
	printSchools(schoolArray);
}

function main() {
	getSchools(document.getElementById("DistrictName").options[document.getElementById("DistrictName").selectedIndex].value);
}