function addMarkers()
{
mySelect = document.getElementById('selection');
Whiteriver = [];Winslow = [];Pinon = [];Lakeside = [];Pinetop_lakeside = [];Heber = [];Kayenata = [];Cibecue = [];Show_Low = [];Ganado = [];Snowflake = [];Holbrook = [];Kykotsmovi = [];Kearns_Canyon = [];Keams_Canyon = [];Hotevilla = [];White_River = [];Joseph_City = [];Kayenta = [];Heber_overgaard = [];Overgaard = [];Taylor = [];Polacca = [];Pinetop = [];Second_Mesa = [];Shonto = [];Fort_Apache = [];mySelect.options[mySelect.options.length] = new Option("Cibecue schools",'all=Cibecue');
mySelect.options[mySelect.options.length] = new Option("Fort Apache schools",'all=Fort_Apache');
mySelect.options[mySelect.options.length] = new Option("Ganado schools",'all=Ganado');
mySelect.options[mySelect.options.length] = new Option("Heber schools",'all=Heber');
mySelect.options[mySelect.options.length] = new Option("Heber overgaard schools",'all=Heber_overgaard');
mySelect.options[mySelect.options.length] = new Option("Holbrook schools",'all=Holbrook');
mySelect.options[mySelect.options.length] = new Option("Hotevilla schools",'all=Hotevilla');
mySelect.options[mySelect.options.length] = new Option("Joseph City schools",'all=Joseph_City');
mySelect.options[mySelect.options.length] = new Option("Kayenata schools",'all=Kayenata');
mySelect.options[mySelect.options.length] = new Option("Kayenta schools",'all=Kayenta');
mySelect.options[mySelect.options.length] = new Option("Keams Canyon schools",'all=Keams_Canyon');
mySelect.options[mySelect.options.length] = new Option("Kearns Canyon schools",'all=Kearns_Canyon');
mySelect.options[mySelect.options.length] = new Option("Kykotsmovi schools",'all=Kykotsmovi');
mySelect.options[mySelect.options.length] = new Option("Lakeside schools",'all=Lakeside');
mySelect.options[mySelect.options.length] = new Option("Overgaard schools",'all=Overgaard');
mySelect.options[mySelect.options.length] = new Option("Pinetop schools",'all=Pinetop');
mySelect.options[mySelect.options.length] = new Option("Pinetop lakeside schools",'all=Pinetop_lakeside');
mySelect.options[mySelect.options.length] = new Option("Pinon schools",'all=Pinon');
mySelect.options[mySelect.options.length] = new Option("Polacca schools",'all=Polacca');
mySelect.options[mySelect.options.length] = new Option("Second Mesa schools",'all=Second_Mesa');
mySelect.options[mySelect.options.length] = new Option("Shonto schools",'all=Shonto');
mySelect.options[mySelect.options.length] = new Option("Show Low schools",'all=Show_Low');
mySelect.options[mySelect.options.length] = new Option("Snowflake schools",'all=Snowflake');
mySelect.options[mySelect.options.length] = new Option("Taylor schools",'all=Taylor');
mySelect.options[mySelect.options.length] = new Option("White River schools",'all=White_River');
mySelect.options[mySelect.options.length] = new Option("Whiteriver schools",'all=Whiteriver');
mySelect.options[mySelect.options.length] = new Option("Winslow schools",'all=Winslow');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Whiteriver[Whiteriver.length] = createMarker(new GPoint(-109.96839905,33.83919907),"
",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alchesay High School",'Whiteriver=' + Whiteriver.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.31314900,34.95132500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Aspc-winslow",'Winslow=' + Winslow.length);
Pinon[Pinon.length] = createMarker(new GPoint(-110.28549957,36.17269897),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Black Mesa Community School",'Pinon=' + Pinon.length);
Lakeside[Lakeside.length] = createMarker(new GPoint(-109.96894073,34.14766312),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blue Ridge Elementary School",'Lakeside=' + Lakeside.length);
Lakeside[Lakeside.length] = createMarker(new GPoint(-109.95087900,34.13622500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Blue Ridge High School",'Lakeside=' + Lakeside.length);
Pinetop_lakeside[Pinetop_lakeside.length] = createMarker(new GPoint(-109.96894073,34.14766312),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Blue Ridge High School",'Pinetop_lakeside=' + Pinetop_lakeside.length);
Lakeside[Lakeside.length] = createMarker(new GPoint(-109.96894073,34.14766312),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Blue Ridge Junior High School",'Lakeside=' + Lakeside.length);
Lakeside[Lakeside.length] = createMarker(new GPoint(-109.96894073,34.14766312),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Blue Ridge Middle School",'Lakeside=' + Lakeside.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bonnie Brennan School",'Winslow=' + Winslow.length);
Whiteriver[Whiteriver.length] = createMarker(new GPoint(-109.96839905,33.83919907),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Canyon Day Junior High School",'Whiteriver=' + Whiteriver.length);
Heber[Heber.length] = createMarker(new GPoint(-110.57389832,34.42029953),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Capps Elementary School",'Heber=' + Heber.length);
Kayenata[Kayenata.length] = createMarker(new GPoint(-112.55400085,34.59519958),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chilchinbeto Day School",'Kayenata=' + Kayenata.length);
Cibecue[Cibecue.length] = createMarker(new GPoint(-110.48940277,34.04159927),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cibecue Community School",'Cibecue=' + Cibecue.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04766846,34.25703812),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Clay Springs School",'Show_Low=' + Show_Low.length);
Whiteriver[Whiteriver.length] = createMarker(new GPoint(-109.96839905,33.83919907),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cradleboard School",'Whiteriver=' + Whiteriver.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.68879700,35.07339859),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dilcon Boarding School",'Winslow=' + Winslow.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.68879700,35.07339859),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dine Southwest High School",'Winslow=' + Winslow.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.33799744,35.25849915),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dine Southwest High School (charter)",'Winslow=' + Winslow.length);
Ganado[Ganado.length] = createMarker(new GPoint(-109.29799652,35.65549850),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ganado High School",'Ganado=' + Ganado.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.08080292,34.50450134),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Highland Primary School",'Snowflake=' + Snowflake.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.11679840,34.91400146),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Holbrook High School",'Holbrook=' + Holbrook.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.07897400,34.51264000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Holbrook High School (satellite Campus)",'Snowflake=' + Snowflake.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.11679840,34.91400146),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Holbrook Junior High School",'Holbrook=' + Holbrook.length);
Kykotsmovi[Kykotsmovi.length] = createMarker(new GPoint(-110.61952209,35.87541962),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hopi Day School",'Kykotsmovi=' + Kykotsmovi.length);
Kearns_Canyon[Kearns_Canyon.length] = createMarker(new GPoint(-112.55400085,34.59519958),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hopi High School",'Kearns_Canyon=' + Kearns_Canyon.length);
Keams_Canyon[Keams_Canyon.length] = createMarker(new GPoint(-110.22750092,35.77239990),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hopi Jr/sr High School",'Keams_Canyon=' + Keams_Canyon.length);
Keams_Canyon[Keams_Canyon.length] = createMarker(new GPoint(-110.22750092,35.77239990),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hopi Jr/sr High School (charter)",'Keams_Canyon=' + Keams_Canyon.length);
Hotevilla[Hotevilla.length] = createMarker(new GPoint(-110.67272949,35.92720795),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hotevilla Bacavi Community School",'Hotevilla=' + Hotevilla.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.11679840,34.91400146),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hulet Elementary School",'Holbrook=' + Holbrook.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.11679840,34.91400146),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Indian Wells Elementary School",'Holbrook=' + Holbrook.length);
Keams_Canyon[Keams_Canyon.length] = createMarker(new GPoint(-110.22750092,35.77239990),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jeddito School",'Keams_Canyon=' + Keams_Canyon.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.03602600,34.25418472),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Jefferson Academy Of Advanced Learning",'Show_Low=' + Show_Low.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Winslow=' + Winslow.length);
White_River[White_River.length] = createMarker(new GPoint(-109.96839905,33.83919907),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John F. Kennedy Day School",'White_River=' + White_River.length);
Joseph_City[Joseph_City.length] = createMarker(new GPoint(-110.33180237,34.95759964),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Joseph City Elementary School",'Joseph_City=' + Joseph_City.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.08029800,34.52434700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Joseph City High School (satellite Campus)",'Snowflake=' + Snowflake.length);
Joseph_City[Joseph_City.length] = createMarker(new GPoint(-110.33180237,34.95759964),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Joseph City Jr/sr High School",'Joseph_City=' + Joseph_City.length);
Joseph_City[Joseph_City.length] = createMarker(new GPoint(-110.33214900,34.95597600),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Joseph City Junior High School",'Joseph_City=' + Joseph_City.length);
Kayenata[Kayenata.length] = createMarker(new GPoint(-112.55400085,34.59519958),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kayenta Boarding School",'Kayenata=' + Kayenata.length);
Kayenta[Kayenta.length] = createMarker(new GPoint(-110.24259949,36.70140076),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kayenta Intermediate School",'Kayenta=' + Kayenta.length);
Kayenta[Kayenta.length] = createMarker(new GPoint(-110.24259949,36.70140076),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Kayenta Middle School",'Kayenta=' + Kayenta.length);
Kayenta[Kayenta.length] = createMarker(new GPoint(-110.24259949,36.70140076),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kayenta Primary School",'Kayenta=' + Kayenta.length);
Kearns_Canyon[Kearns_Canyon.length] = createMarker(new GPoint(-112.55400085,34.59519958),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Keams Canyon Boarding School",'Kearns_Canyon=' + Kearns_Canyon.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.69689941,35.02399826),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Leupp Boarding School",'Winslow=' + Winslow.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04792000,34.25697500),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Linden Elementary School",'Show_Low=' + Show_Low.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Little Singer Community Junior High School",'Winslow=' + Winslow.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.33799744,35.25849915),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Little Singer Community Junior High School (charte",'Winslow=' + Winslow.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.69625400,35.02427300),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Little Singer Community School",'Winslow=' + Winslow.length);
Heber[Heber.length] = createMarker(new GPoint(-110.57389832,34.42029953),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mogollon High School",'Heber=' + Heber.length);
Heber_overgaard[Heber_overgaard.length] = createMarker(new GPoint(-10.00000000,10.00000000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mogollon High School (heber-overgaard) - Satellite",'Heber_overgaard=' + Heber_overgaard.length);
Heber[Heber.length] = createMarker(new GPoint(-110.57389832,34.42029953),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mogollon Junior High School",'Heber=' + Heber.length);
Kayenta[Kayenta.length] = createMarker(new GPoint(-110.24259949,36.70140076),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Monument Valley High School",'Kayenta=' + Kayenta.length);
Overgaard[Overgaard.length] = createMarker(new GPoint(-110.55069733,34.38990021),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mountain Meadows Primary",'Overgaard=' + Overgaard.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-109.91105652,34.50139999),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Navit Courses High School",'Snowflake=' + Snowflake.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.15808868,34.90299225),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Holbrook",'Holbrook=' + Holbrook.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.15817261,34.90303421),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Holbrook (ch",'Holbrook=' + Holbrook.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.02860260,34.25299072),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Show Low (ch",'Show_Low=' + Show_Low.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.02976227,34.21326447),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Springervill",'Show_Low=' + Show_Low.length);
Taylor[Taylor.length] = createMarker(new GPoint(-110.09049988,34.46500015),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Taylor",'Taylor=' + Taylor.length);
Taylor[Taylor.length] = createMarker(new GPoint(-110.09593964,34.46951675),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Taylor (char",'Taylor=' + Taylor.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Winslow",'Winslow=' + Winslow.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northern Az Academy For Career Dev. - Winslow (cha",'Winslow=' + Winslow.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.11679840,34.91400146),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Park Elementary School",'Holbrook=' + Holbrook.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04766846,34.25703812),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pinedale Elementary School",'Show_Low=' + Show_Low.length);
Pinon[Pinon.length] = createMarker(new GPoint(-110.28549957,36.17269897),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pinon Dormatory",'Pinon=' + Pinon.length);
Pinon[Pinon.length] = createMarker(new GPoint(-110.28549957,36.17269897),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pinon Elementary School",'Pinon=' + Pinon.length);
Pinon[Pinon.length] = createMarker(new GPoint(-110.22562200,36.10137500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pinon High School",'Pinon=' + Pinon.length);
Pinon[Pinon.length] = createMarker(new GPoint(-110.28549957,36.17269897),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pinon Middle School",'Pinon=' + Pinon.length);
Polacca[Polacca.length] = createMarker(new GPoint(-110.48130035,35.88550186),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Polacca Day School",'Polacca=' + Polacca.length);
Holbrook[Holbrook.length] = createMarker(new GPoint(-110.11679840,34.91400146),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rainbow Accommodation School",'Holbrook=' + Holbrook.length);
Pinetop[Pinetop.length] = createMarker(new GPoint(-109.90989685,34.11299896),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Renaissance Academy - Anasazi Campus",'Pinetop=' + Pinetop.length);
Pinetop[Pinetop.length] = createMarker(new GPoint(-109.72499847,34.42689896),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Renaissance Academy - Heber/overgaard Campus",'Pinetop=' + Pinetop.length);
Pinetop_lakeside[Pinetop_lakeside.length] = createMarker(new GPoint(-109.90989685,34.11299896),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Renaissance Academy - John Reeder Campus",'Pinetop_lakeside=' + Pinetop_lakeside.length);
Kykotsmovi[Kykotsmovi.length] = createMarker(new GPoint(-110.47689819,35.63890076),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rocky Ridge Boarding School",'Kykotsmovi=' + Kykotsmovi.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.68879700,35.07339859),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Seba Dalkai Boarding School",'Winslow=' + Winslow.length);
Second_Mesa[Second_Mesa.length] = createMarker(new GPoint(-110.50421906,35.79314041),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Second Mesa Day School",'Second_Mesa=' + Second_Mesa.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.12063599,34.28433990),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sequoia Village School",'Show_Low=' + Show_Low.length);
Whiteriver[Whiteriver.length] = createMarker(new GPoint(-109.96839905,33.83919907),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Seven Mile School",'Whiteriver=' + Whiteriver.length);
Shonto[Shonto.length] = createMarker(new GPoint(-110.61150360,36.68479919),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shonto Preparatory School",'Shonto=' + Shonto.length);
Shonto[Shonto.length] = createMarker(new GPoint(-110.61150360,36.68479919),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shonto Preparatory School (charter)",'Shonto=' + Shonto.length);
Shonto[Shonto.length] = createMarker(new GPoint(-110.63249969,36.63479996),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Shonto Preparatory Technology High School",'Shonto=' + Shonto.length);
Shonto[Shonto.length] = createMarker(new GPoint(-110.63249969,36.63479996),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Shonto Preparatory Technology High School (charter",'Shonto=' + Shonto.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04766846,34.25703812),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Show Low High School",'Show_Low=' + Show_Low.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.05277252,34.24477768),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Show Low High School - Satellite Campus",'Show_Low=' + Show_Low.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04766846,34.25703812),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Show Low Intermediate School",'Show_Low=' + Show_Low.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04766846,34.25703812),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Show Low Junior High School",'Show_Low=' + Show_Low.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04766846,34.25703812),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Show Low Preschool",'Show_Low=' + Show_Low.length);
Show_Low[Show_Low.length] = createMarker(new GPoint(-110.04766846,34.25703812),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Show Low Primary School",'Show_Low=' + Show_Low.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.08080292,34.50450134),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Snowflake High School",'Snowflake=' + Snowflake.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.05277252,34.24477768),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Snowflake High School - Satellite Campus",'Snowflake=' + Snowflake.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.08080292,34.50450134),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Snowflake Intermediate School",'Snowflake=' + Snowflake.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.08080292,34.50450134),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Snowflake Junior High School",'Snowflake=' + Snowflake.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.07897400,34.51264000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Snowflake Preschool",'Snowflake=' + Snowflake.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.00830078,34.54610062),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Special Services Elementary School",'Snowflake=' + Snowflake.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.08080292,34.50450134),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Taylor Elementary School",'Snowflake=' + Snowflake.length);
Snowflake[Snowflake.length] = createMarker(new GPoint(-110.08080292,34.50450134),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Taylor Intermediate School",'Snowflake=' + Snowflake.length);
Fort_Apache[Fort_Apache.length] = createMarker(new GPoint(-109.98940277,33.79010010),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Theodore Roosevelt School",'Fort_Apache=' + Fort_Apache.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tolani Lake Elementary School Academy",'Winslow=' + Winslow.length);
Pinon[Pinon.length] = createMarker(new GPoint(-110.28549957,36.17269897),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Warrior Academy",'Pinon=' + Pinon.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washington School",'Winslow=' + Winslow.length);
Keams_Canyon[Keams_Canyon.length] = createMarker(new GPoint(-110.17769623,35.77859879),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("White Cone Elementary School",'Keams_Canyon=' + Keams_Canyon.length);
Keams_Canyon[Keams_Canyon.length] = createMarker(new GPoint(-10.00000000,10.00000000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("White Cone High School",'Keams_Canyon=' + Keams_Canyon.length);
Whiteriver[Whiteriver.length] = createMarker(new GPoint(-109.96839905,33.83919907),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Whiteriver Elementary School",'Whiteriver=' + Whiteriver.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Winslow High School",'Winslow=' + Winslow.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.45880127,35.12009811),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Winslow Junior High School",'Winslow=' + Winslow.length);
Winslow[Winslow.length] = createMarker(new GPoint(-110.70558300,35.03028600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Winslow Residential Hall",'Winslow=' + Winslow.length);
} // End addStateMarkers JavaScript Function
// Takes an array of markers and centers/zooms map based on marker range
function centerByArray(myArray, recenter, newMaxMin)
{
if (newMaxMin == true)
reMaxMin(myArray);
for (var i = 0; i < myArray.length; i++)
{
var markLng = myArray[i].getPoint().x;
var markLat = myArray[i].getPoint().y;
if (markLat > maxLat) maxLat = markLat;
if (markLng > maxLng) maxLng = markLng;
if (markLat < minLat) minLat = markLat;
if (markLng < minLng) minLng = markLng;
}
if (recenter)
reCenterMap();
}
// Reinit max/mins
function reMaxMin(myArray)
{
maxLng = myArray[0].getPoint().x;
maxLat = myArray[0].getPoint().y;
minLng = myArray[0].getPoint().x;
minLat = myArray[0].getPoint().y;
}
// Recenter map based on global max/mins
function reCenterMap()
{
var bounds = new GLatLngBounds();
bounds.extend(new GLatLng(minLat, minLng));
bounds.extend(new GLatLng(maxLat, maxLng));
var center_lat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) / 2.0;
var center_lng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) / 2.0;
var center = new GLatLng(center_lat, center_lng);
var zoom = map.getBoundsZoomLevel(bounds);
map.setCenter(center,zoom);
//map.setCenter(center,10);
/*
var center = new GPoint( (maxLng + minLng)/2, (maxLat+minLat)/2 );
var delta = new GSize(maxLng - minLng, maxLat - minLat);
var minZoom = map.spec.getLowestZoomLevel(center, delta, map.viewSize);
if (minZoom < 4) minZoom = 4; // Lowest possible zoom is 4
map.centerAndZoom(center, minZoom);
*/
}
// Fires when drop down list of schools changes
function selectChange(selection)
{
var myVal = selection.options[selection.selectedIndex].value;
map.closeInfoWindow();
// Add entire array based on variable type
if (myVal.indexOf('all') != -1 && myVal != 'all')
{
var temp = myVal.split('=');
var showArray = temp[1];
// If Array is > X amount of markers, then open in a new page
if (eval(showArray).length > 20)
// New window depends on whether or not we're on the search page
if (location.href.indexOf('nearby_schools.php') == -1)
window.open(location.href + '/map/' + showArray);
else
window.open('/search////' + showArray);
map.removeOverlays(Cibecue);
map.removeOverlays(Fort_Apache);
map.removeOverlays(Ganado);
map.removeOverlays(Heber);
map.removeOverlays(Heber_overgaard);
map.removeOverlays(Holbrook);
map.removeOverlays(Hotevilla);
map.removeOverlays(Joseph_City);
map.removeOverlays(Kayenata);
map.removeOverlays(Kayenta);
map.removeOverlays(Keams_Canyon);
map.removeOverlays(Kearns_Canyon);
map.removeOverlays(Kykotsmovi);
map.removeOverlays(Lakeside);
map.removeOverlays(Overgaard);
map.removeOverlays(Pinetop);
map.removeOverlays(Pinetop_lakeside);
map.removeOverlays(Pinon);
map.removeOverlays(Polacca);
map.removeOverlays(Second_Mesa);
map.removeOverlays(Shonto);
map.removeOverlays(Show_Low);
map.removeOverlays(Snowflake);
map.removeOverlays(Taylor);
map.removeOverlays(White_River);
map.removeOverlays(Whiteriver);
map.removeOverlays(Winslow);
map.addOverlays(eval(showArray));
centerByArray(eval(showArray), true, true); // Center and zoom on set of markers
}
// Add individual markers
if (myVal.indexOf('all') == -1 && myVal != 'all' && myVal.length)
{
var temp = myVal.split('=');
var myArray = temp[0];
var myIndex = parseInt(temp[1]) - 1;
document.getElementById('map').width = "750";
map.removeOverlay(eval(myArray)[myIndex]);
map.addOverlay(eval(myArray)[myIndex]);
GEvent.trigger(eval(myArray)[myIndex],'click');
}
// Show all markers
if (myVal == 'all')
{
cntMarker = 0;
reMaxMin(Whiteriver);map.removeOverlays(Cibecue);
map.removeOverlays(Fort_Apache);
map.removeOverlays(Ganado);
map.removeOverlays(Heber);
map.removeOverlays(Heber_overgaard);
map.removeOverlays(Holbrook);
map.removeOverlays(Hotevilla);
map.removeOverlays(Joseph_City);
map.removeOverlays(Kayenata);
map.removeOverlays(Kayenta);
map.removeOverlays(Keams_Canyon);
map.removeOverlays(Kearns_Canyon);
map.removeOverlays(Kykotsmovi);
map.removeOverlays(Lakeside);
map.removeOverlays(Overgaard);
map.removeOverlays(Pinetop);
map.removeOverlays(Pinetop_lakeside);
map.removeOverlays(Pinon);
map.removeOverlays(Polacca);
map.removeOverlays(Second_Mesa);
map.removeOverlays(Shonto);
map.removeOverlays(Show_Low);
map.removeOverlays(Snowflake);
map.removeOverlays(Taylor);
map.removeOverlays(White_River);
map.removeOverlays(Whiteriver);
map.removeOverlays(Winslow);
map.addOverlays(Cibecue);
centerByArray(Cibecue, false, false);
cntMarker += Cibecue.length;
map.addOverlays(Fort_Apache);
centerByArray(Fort_Apache, false, false);
cntMarker += Fort_Apache.length;
map.addOverlays(Ganado);
centerByArray(Ganado, false, false);
cntMarker += Ganado.length;
map.addOverlays(Heber);
centerByArray(Heber, false, false);
cntMarker += Heber.length;
map.addOverlays(Heber_overgaard);
centerByArray(Heber_overgaard, false, false);
cntMarker += Heber_overgaard.length;
map.addOverlays(Holbrook);
centerByArray(Holbrook, false, false);
cntMarker += Holbrook.length;
map.addOverlays(Hotevilla);
centerByArray(Hotevilla, false, false);
cntMarker += Hotevilla.length;
map.addOverlays(Joseph_City);
centerByArray(Joseph_City, false, false);
cntMarker += Joseph_City.length;
map.addOverlays(Kayenata);
centerByArray(Kayenata, false, false);
cntMarker += Kayenata.length;
map.addOverlays(Kayenta);
centerByArray(Kayenta, false, false);
cntMarker += Kayenta.length;
map.addOverlays(Keams_Canyon);
centerByArray(Keams_Canyon, false, false);
cntMarker += Keams_Canyon.length;
map.addOverlays(Kearns_Canyon);
centerByArray(Kearns_Canyon, false, false);
cntMarker += Kearns_Canyon.length;
map.addOverlays(Kykotsmovi);
centerByArray(Kykotsmovi, false, false);
cntMarker += Kykotsmovi.length;
map.addOverlays(Lakeside);
centerByArray(Lakeside, false, false);
cntMarker += Lakeside.length;
map.addOverlays(Overgaard);
centerByArray(Overgaard, false, false);
cntMarker += Overgaard.length;
map.addOverlays(Pinetop);
centerByArray(Pinetop, false, false);
cntMarker += Pinetop.length;
map.addOverlays(Pinetop_lakeside);
centerByArray(Pinetop_lakeside, false, false);
cntMarker += Pinetop_lakeside.length;
map.addOverlays(Pinon);
centerByArray(Pinon, false, false);
cntMarker += Pinon.length;
map.addOverlays(Polacca);
centerByArray(Polacca, false, false);
cntMarker += Polacca.length;
map.addOverlays(Second_Mesa);
centerByArray(Second_Mesa, false, false);
cntMarker += Second_Mesa.length;
map.addOverlays(Shonto);
centerByArray(Shonto, false, false);
cntMarker += Shonto.length;
map.addOverlays(Show_Low);
centerByArray(Show_Low, false, false);
cntMarker += Show_Low.length;
map.addOverlays(Snowflake);
centerByArray(Snowflake, false, false);
cntMarker += Snowflake.length;
map.addOverlays(Taylor);
centerByArray(Taylor, false, false);
cntMarker += Taylor.length;
map.addOverlays(White_River);
centerByArray(White_River, false, false);
cntMarker += White_River.length;
map.addOverlays(Whiteriver);
centerByArray(Whiteriver, false, false);
cntMarker += Whiteriver.length;
map.addOverlays(Winslow);
centerByArray(Winslow, false, false);
cntMarker += Winslow.length;
centerByArray(Whiteriver,true, false);
if (cntMarker > 20)
// New window depends on whether or not we're on the search page
if (location.href.indexOf('schools-by-distance') == -1)
window.open(location.href + '/map/all');
else
window.open('/search////all');
}
}