function addMarkers() { mySelect = document.getElementById('selection'); Douglas = [];Portal = [];Sierra_Vista = [];Pearce = [];Phoenix = [];Benson = [];Bisbee = [];Willcox = [];Elfrida = [];Bowie = [];El_Frida = [];Cochise = [];Ft_Huachuca = [];Hereford = [];Mcneal = [];Tombstone = [];Naco = [];Pomerene = [];Tucson = [];St_David = [];San_Simon = [];mySelect.options[mySelect.options.length] = new Option("Benson schools",'all=Benson'); mySelect.options[mySelect.options.length] = new Option("Bisbee schools",'all=Bisbee'); mySelect.options[mySelect.options.length] = new Option("Bowie schools",'all=Bowie'); mySelect.options[mySelect.options.length] = new Option("Cochise schools",'all=Cochise'); mySelect.options[mySelect.options.length] = new Option("Douglas schools",'all=Douglas'); mySelect.options[mySelect.options.length] = new Option("El Frida schools",'all=El_Frida'); mySelect.options[mySelect.options.length] = new Option("Elfrida schools",'all=Elfrida'); mySelect.options[mySelect.options.length] = new Option("Ft Huachuca schools",'all=Ft_Huachuca'); mySelect.options[mySelect.options.length] = new Option("Hereford schools",'all=Hereford'); mySelect.options[mySelect.options.length] = new Option("Mcneal schools",'all=Mcneal'); mySelect.options[mySelect.options.length] = new Option("Naco schools",'all=Naco'); mySelect.options[mySelect.options.length] = new Option("Pearce schools",'all=Pearce'); mySelect.options[mySelect.options.length] = new Option("Phoenix schools",'all=Phoenix'); mySelect.options[mySelect.options.length] = new Option("Pomerene schools",'all=Pomerene'); mySelect.options[mySelect.options.length] = new Option("Portal schools",'all=Portal'); mySelect.options[mySelect.options.length] = new Option("San Simon schools",'all=San_Simon'); mySelect.options[mySelect.options.length] = new Option("Sierra Vista schools",'all=Sierra_Vista'); mySelect.options[mySelect.options.length] = new Option("St David schools",'all=St_David'); mySelect.options[mySelect.options.length] = new Option("Tombstone schools",'all=Tombstone'); mySelect.options[mySelect.options.length] = new Option("Tucson schools",'all=Tucson'); mySelect.options[mySelect.options.length] = new Option("Willcox schools",'all=Willcox'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
A Avenue Elementary School
110015th Street
Douglas, AZ 85607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("A Avenue Elementary School",'Douglas=' + Douglas.length); Portal[Portal.length] = createMarker(new GPoint(-109.34040070,32.20050049),"
Apache Elementary School
Po Box 16435
Portal, AZ 85632

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Apache Elementary School",'Portal=' + Portal.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26235962,31.55473709),"
Apache Middle School
3335 E Fry
Sierra Vista, AZ 85635

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Apache Middle School",'Sierra_Vista=' + Sierra_Vista.length); Pearce[Pearce.length] = createMarker(new GPoint(-109.63798523,31.87639999),"
Ash Creek Elementary School
6460 E. Hwy 181
Pearce, AZ 85625

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ash Creek Elementary School",'Pearce=' + Pearce.length); Phoenix[Phoenix.length] = createMarker(new GPoint(-112.13844200,33.47670000),"
Aspc - Douglas/a.c.i.
3701 West Cambridge
Phoenix, AZ 85009

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Aspc - Douglas/a.c.i.",'Phoenix=' + Phoenix.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26059723,31.56049919),"
Bella Vista Elementary School
3555 Fry Blvd
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bella Vista Elementary School",'Sierra_Vista=' + Sierra_Vista.length); Benson[Benson.length] = createMarker(new GPoint(-110.29822540,31.96608162),"
Benson High School
360 S. Patagonia
Benson, AZ 85602

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Benson High School",'Benson=' + Benson.length); Benson[Benson.length] = createMarker(new GPoint(-110.29822540,31.96608162),"
Benson Middle School
360 S Patagonia Street
Benson, AZ 85602

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Benson Middle School",'Benson=' + Benson.length); Benson[Benson.length] = createMarker(new GPoint(-110.29822540,31.96608162),"
Benson Primary School
360 S Patagonia Street
Benson, AZ 85602

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Benson Primary School",'Benson=' + Benson.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.27467900,31.56945000),"
Berean Schools
4699 E. Hwy. 90
Sierra Vista, AZ 85635

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Berean Schools",'Sierra_Vista=' + Sierra_Vista.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26059723,31.56049919),"
Berean Schools Elementary School
4699-4701 E. Highway 90
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Berean Schools Elementary School",'Sierra_Vista=' + Sierra_Vista.length); Bisbee[Bisbee.length] = createMarker(new GPoint(-109.88417816,31.42804909),"
Bisbee High School
100 Old Douglas Road
Bisbee, AZ 85603

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bisbee High School",'Bisbee=' + Bisbee.length); Bisbee[Bisbee.length] = createMarker(new GPoint(-109.88417816,31.42804909),"
Bisbee Middle School
100 Old Douglas Road
Bisbee, AZ 85603

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Bisbee Middle School",'Bisbee=' + Bisbee.length); Willcox[Willcox.length] = createMarker(new GPoint(-109.96909332,32.58990097),"
Bonita Elementary School
18008 S Ft Grant Rd
Willcox, AZ 85643

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bonita Elementary School",'Willcox=' + Willcox.length); Elfrida[Elfrida.length] = createMarker(new GPoint(-109.48650360,32.32540131),"
Bowie Elementary School
P.o. Box 87
Elfrida, AZ 85605

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bowie Elementary School",'Elfrida=' + Elfrida.length); Bowie[Bowie.length] = createMarker(new GPoint(-109.48690900,32.32669500),"
Bowie Elementary School
P.o. Box 157
Bowie, AZ 85605

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bowie Elementary School",'Bowie=' + Bowie.length); El_Frida[El_Frida.length] = createMarker(new GPoint(-109.52940369,31.74160004),"
Bowie High School
P.o. Box 87
El Frida, AZ 85610

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bowie High School",'El_Frida=' + El_Frida.length); Bowie[Bowie.length] = createMarker(new GPoint(-109.48650360,32.32540131),"
Bowie High School
P O Box 157
Bowie, AZ 85605

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bowie High School",'Bowie=' + Bowie.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26235962,31.55473709),"
Buena High School
3555 Fry Blvd
Sierra Vista, AZ 85635

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Buena High School",'Sierra_Vista=' + Sierra_Vista.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26235962,31.55473709),"
Carmichael Elementary School
701 Ne Carmichael Avenue
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carmichael Elementary School",'Sierra_Vista=' + Sierra_Vista.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.55213400,31.34444400),"
Center For Academic Success #4
1415 F Avenue
Douglas, AZ 85607

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Center For Academic Success #4",'Douglas=' + Douglas.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.27467900,31.56945000),"
Center For Academic Success #5
650 E. Wilcox
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center For Academic Success #5",'Sierra_Vista=' + Sierra_Vista.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.29238892,31.55216217),"
Center For Academic Success, #1
650 E. Wilcox
Sierra Vista, AZ 85635

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Center For Academic Success, #1",'Sierra_Vista=' + Sierra_Vista.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.55467987,31.33950043),"
Center For Academic Success, #2
510 G Avenue
Douglas, AZ 85607

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Center For Academic Success, #2",'Douglas=' + Douglas.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.55446625,31.33927727),"
Center For Academic Success, #2 (charter)
510 G. Ave.
Douglas, AZ 85607

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Center For Academic Success, #2 (charter)",'Douglas=' + Douglas.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.54553986,31.34445953),"
Center For Academic Success, #3
1415 F Avenue
Douglas, AZ 85607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center For Academic Success, #3",'Douglas=' + Douglas.length); Phoenix[Phoenix.length] = createMarker(new GPoint(-110.25505829,31.53574181),"
Chancellor Charter School At Sierra Vista
18052 N. Black Canyon Highway
Phoenix, AZ 85053

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chancellor Charter School At Sierra Vista",'Phoenix=' + Phoenix.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Clawson School
1235 7th Street
Douglas, AZ 85607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clawson School",'Douglas=' + Douglas.length); Cochise[Cochise.length] = createMarker(new GPoint(-109.92500305,32.08800125),"
Cochise Elementary School
P.o. Box 1088
Cochise, AZ 85606

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cochise Elementary School",'Cochise=' + Cochise.length); Ft_Huachuca[Ft_Huachuca.length] = createMarker(new GPoint(-110.22989655,31.55050087),"
Colonel Johnston Elementary School
Rucker Street Building 47120
Ft Huachuca, AZ 85613

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Colonel Johnston Elementary School",'Ft_Huachuca=' + Ft_Huachuca.length); Ft_Huachuca[Ft_Huachuca.length] = createMarker(new GPoint(-110.22989655,31.55050087),"
Colonel Smith Middle School
P O Box 12954
Ft Huachuca, AZ 85670

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Colonel Smith Middle School",'Ft_Huachuca=' + Ft_Huachuca.length); Hereford[Hereford.length] = createMarker(new GPoint(-110.20320129,31.42239952),"
Coronado Elementary School
Po Box 38
Hereford, AZ 85615

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Coronado Elementary School",'Hereford=' + Hereford.length); Mcneal[Mcneal.length] = createMarker(new GPoint(-109.69812012,31.46337509),"
Double Adobe Elementary School
7081 N Central Hwy
Mcneal, AZ 85617

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Double Adobe Elementary School",'Mcneal=' + Mcneal.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Douglas East Campus High School
1600 Louis Avenue
Douglas, AZ 85607

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Douglas East Campus High School",'Douglas=' + Douglas.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Douglas High School
1500 15th Street
Douglas, AZ 85607

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Douglas High School",'Douglas=' + Douglas.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Early Learning Center
P O Box 1237
Douglas, AZ 85607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Early Learning Center",'Douglas=' + Douglas.length); Elfrida[Elfrida.length] = createMarker(new GPoint(-109.52940369,31.74160004),"
Elfrida Elementary School
P.o. Box 328
Elfrida, AZ 85610

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elfrida Elementary School",'Elfrida=' + Elfrida.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Faras Elementary School
Po Box 1237
Douglas, AZ 85608

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Faras Elementary School",'Douglas=' + Douglas.length); Ft_Huachuca[Ft_Huachuca.length] = createMarker(new GPoint(-110.22989655,31.55050087),"
General Myer Elementary School
Po Box 12954
Ft Huachuca, AZ 85670

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("General Myer Elementary School",'Ft_Huachuca=' + Ft_Huachuca.length); Bisbee[Bisbee.length] = createMarker(new GPoint(-109.88417816,31.42804909),"
Greenway Primary School
100 Old Douglas Road
Bisbee, AZ 85603

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Greenway Primary School",'Bisbee=' + Bisbee.length); Tombstone[Tombstone.length] = createMarker(new GPoint(-110.33370209,31.68709946),"
Huachuca City School
P.o. Box 1000
Tombstone, AZ 85638

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Huachuca City School",'Tombstone=' + Tombstone.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26235962,31.55473709),"
Huachuca Mountain Elementary School
3555 Fry Blvd
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Huachuca Mountain Elementary School",'Sierra_Vista=' + Sierra_Vista.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Joe Carlson Elementary School
1700 Louis Ave
Douglas, AZ 85607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Joe Carlson Elementary School",'Douglas=' + Douglas.length); Bisbee[Bisbee.length] = createMarker(new GPoint(-109.88417816,31.42804909),"
Lowell School
100 Old Douglas Road
Bisbee, AZ 85603

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lowell School",'Bisbee=' + Bisbee.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Maryvale School
1104 N. Madison Avenue
Douglas, AZ 85607

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maryvale School",'Douglas=' + Douglas.length); Mcneal[Mcneal.length] = createMarker(new GPoint(-109.70050049,31.52939987),"
Mcneal Elementary School
P O Box 8
Mcneal, AZ 85617

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcneal Elementary School",'Mcneal=' + Mcneal.length); Naco[Naco.length] = createMarker(new GPoint(-109.94789886,31.33760071),"
Naco Elementary School
P. O. Box 397
Naco, AZ 85620

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Naco Elementary School",'Naco=' + Naco.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.29929352,31.55233765),"
Omega Alpha Academy School
35 E. Wilcox Drive
Sierra Vista, AZ 85365

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Omega Alpha Academy School",'Sierra_Vista=' + Sierra_Vista.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.54660034,31.38389969),"
Omega Alpha Academy School
1402 San Antonio
Douglas, AZ 85607

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Omega Alpha Academy School",'Douglas=' + Douglas.length); Hereford[Hereford.length] = createMarker(new GPoint(-110.20320129,31.42239952),"
Palominas Elementary School
P.o. Box 38
Hereford, AZ 85615

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Palominas Elementary School",'Hereford=' + Hereford.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Paul H Huber Junior High School
1650 Washington Ave.
Douglas, AZ 85607

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Paul H Huber Junior High School",'Douglas=' + Douglas.length); Pearce[Pearce.length] = createMarker(new GPoint(-109.81888580,31.89559555),"
Pearce Elementary School
1487 E. School Road
Pearce, AZ 85625

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pearce Elementary School",'Pearce=' + Pearce.length); Pomerene[Pomerene.length] = createMarker(new GPoint(-110.27469635,32.07799911),"
Pomerene Elementary School
P.o. Box 7
Pomerene, AZ 85627

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pomerene Elementary School",'Pomerene=' + Pomerene.length); Tucson[Tucson.length] = createMarker(new GPoint(-110.25900269,31.56250000),"
Ppep Tec - Colin L. Powell Learning Center
1840 E. Benson Hwy.
Tucson, AZ 85714

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ppep Tec - Colin L. Powell Learning Center",'Tucson=' + Tucson.length); Tucson[Tucson.length] = createMarker(new GPoint(-109.84156036,32.26123428),"
Ppep Tec - Eugene Lopez Learning Center
1840 E. Benson Hwy.
Tucson, AZ 85714

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ppep Tec - Eugene Lopez Learning Center",'Tucson=' + Tucson.length); Tucson[Tucson.length] = createMarker(new GPoint(-109.88756561,31.42278671),"
Ppep Tec - Manuel Borjorquez Learning Center
1840 E. Benson Hwy.
Tucson, AZ 85714

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ppep Tec - Manuel Borjorquez Learning Center",'Tucson=' + Tucson.length); Tucson[Tucson.length] = createMarker(new GPoint(-109.55389404,31.34657478),"
Ppep Tec - Raul H. Castro Learning Center
1840 E. Benson Hwy.
Tucson, AZ 85714

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ppep Tec - Raul H. Castro Learning Center",'Tucson=' + Tucson.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26235962,31.55473709),"
Pueblo Del Sol Elementary School
5130 Paseo Las Palmas
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pueblo Del Sol Elementary School",'Sierra_Vista=' + Sierra_Vista.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Ray Borane Middle School
840 12th Street
Douglas, AZ 85607

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ray Borane Middle School",'Douglas=' + Douglas.length); St_David[St_David.length] = createMarker(new GPoint(-109.52940369,31.74160004),"
Saint David High School
P.o. Box 87
St. David, AZ 85630

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint David High School",'St_David=' + St_David.length); Benson[Benson.length] = createMarker(new GPoint(-110.29783100,31.96697400),"
San Pedro Valley High School
260 S. Patagonia St
Benson, AZ 85602

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Pedro Valley High School",'Benson=' + Benson.length); San_Simon[San_Simon.length] = createMarker(new GPoint(-109.52940369,31.74160004),"
San Simon High School
P.o. Box 87
San Simon, AZ 85632

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Simon High School",'San_Simon=' + San_Simon.length); San_Simon[San_Simon.length] = createMarker(new GPoint(-109.22734500,32.26609000),"
San Simon School
P.o. Box 38
San Simon, AZ 85632

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Simon School",'San_Simon=' + San_Simon.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Sarah Marley School
735 7th Street
Douglas, AZ 85607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sarah Marley School",'Douglas=' + Douglas.length); Hereford[Hereford.length] = createMarker(new GPoint(-110.20320129,31.42239952),"
Sierra Summit Academy
4200 E. Ramsey Road
Hereford, AZ 85615

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sierra Summit Academy",'Hereford=' + Hereford.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.28251648,31.54349136),"
Sierra Vista Middle School
1045 S. Lenzner Ave
Sierra Vista, AZ 85635

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sierra Vista Middle School",'Sierra_Vista=' + Sierra_Vista.length); St_David[St_David.length] = createMarker(new GPoint(-110.21929932,31.89089966),"
St David Elementary School
Po Box 70
St David, AZ 85630

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("St David Elementary School",'St_David=' + St_David.length); St_David[St_David.length] = createMarker(new GPoint(-110.21929932,31.89089966),"
St David High School
Po Box 70
St. David, AZ 85630

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St David High School",'St_David=' + St_David.length); Douglas[Douglas.length] = createMarker(new GPoint(-109.43530273,31.45800018),"
Stevenson Elementary School
2200 11th Street
Douglas, AZ 85607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stevenson Elementary School",'Douglas=' + Douglas.length); Elfrida[Elfrida.length] = createMarker(new GPoint(-109.52940369,31.74160004),"
Tombstone High School
Po Box 87
Elfrida, AZ 85610

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tombstone High School",'Elfrida=' + Elfrida.length); Tombstone[Tombstone.length] = createMarker(new GPoint(-110.06120300,31.72229958),"
Tombstone High School
P.o. Box 1000
Tombstone, AZ 85638

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tombstone High School",'Tombstone=' + Tombstone.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26235962,31.55473709),"
Town & Country Elementary School
1313 S. Lenzner Ave
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Town & Country Elementary School",'Sierra_Vista=' + Sierra_Vista.length); Elfrida[Elfrida.length] = createMarker(new GPoint(-109.52940369,31.74160004),"
Valley Union High School
P.o. Box 87
Elfrida, AZ 85610

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Valley Union High School",'Elfrida=' + Elfrida.length); Hereford[Hereford.length] = createMarker(new GPoint(-110.20320129,31.42239952),"
Valley View Elementary School
P.o. Box 38
Hereford, AZ 85615

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Valley View Elementary School",'Hereford=' + Hereford.length); Sierra_Vista[Sierra_Vista.length] = createMarker(new GPoint(-110.26235962,31.55473709),"
Village Meadows Elementary School
905 El Camino Real
Sierra Vista, AZ 85635

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Village Meadows Elementary School",'Sierra_Vista=' + Sierra_Vista.length); Benson[Benson.length] = createMarker(new GPoint(-110.26915741,31.97069931),"
Visions Unlimited Academy
1275 East Barney Lane
Benson, AZ 85602

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Visions Unlimited Academy",'Benson=' + Benson.length); Tombstone[Tombstone.length] = createMarker(new GPoint(-110.06120300,31.72229958),"
Walter J Meyer School
P.o. Box 1000
Tombstone, AZ 85638

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walter J Meyer School",'Tombstone=' + Tombstone.length); Willcox[Willcox.length] = createMarker(new GPoint(-109.83517456,32.25709152),"
Willcox Elementary School
501 W Delos Street
Willcox, AZ 85643

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Willcox Elementary School",'Willcox=' + Willcox.length); Willcox[Willcox.length] = createMarker(new GPoint(-109.84149933,32.25618362),"
Willcox High School
240 N Bisbee Ave
Willcox, AZ 85643

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Willcox High School",'Willcox=' + Willcox.length); Willcox[Willcox.length] = createMarker(new GPoint(-109.84156036,32.25776291),"
Willcox Middle School
360 N Bisbee Ave
Willcox, AZ 85643

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Willcox Middle School",'Willcox=' + Willcox.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(Benson); map.removeOverlays(Bisbee); map.removeOverlays(Bowie); map.removeOverlays(Cochise); map.removeOverlays(Douglas); map.removeOverlays(El_Frida); map.removeOverlays(Elfrida); map.removeOverlays(Ft_Huachuca); map.removeOverlays(Hereford); map.removeOverlays(Mcneal); map.removeOverlays(Naco); map.removeOverlays(Pearce); map.removeOverlays(Phoenix); map.removeOverlays(Pomerene); map.removeOverlays(Portal); map.removeOverlays(San_Simon); map.removeOverlays(Sierra_Vista); map.removeOverlays(St_David); map.removeOverlays(Tombstone); map.removeOverlays(Tucson); map.removeOverlays(Willcox); 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(Douglas);map.removeOverlays(Benson); map.removeOverlays(Bisbee); map.removeOverlays(Bowie); map.removeOverlays(Cochise); map.removeOverlays(Douglas); map.removeOverlays(El_Frida); map.removeOverlays(Elfrida); map.removeOverlays(Ft_Huachuca); map.removeOverlays(Hereford); map.removeOverlays(Mcneal); map.removeOverlays(Naco); map.removeOverlays(Pearce); map.removeOverlays(Phoenix); map.removeOverlays(Pomerene); map.removeOverlays(Portal); map.removeOverlays(San_Simon); map.removeOverlays(Sierra_Vista); map.removeOverlays(St_David); map.removeOverlays(Tombstone); map.removeOverlays(Tucson); map.removeOverlays(Willcox); map.addOverlays(Benson); centerByArray(Benson, false, false); cntMarker += Benson.length; map.addOverlays(Bisbee); centerByArray(Bisbee, false, false); cntMarker += Bisbee.length; map.addOverlays(Bowie); centerByArray(Bowie, false, false); cntMarker += Bowie.length; map.addOverlays(Cochise); centerByArray(Cochise, false, false); cntMarker += Cochise.length; map.addOverlays(Douglas); centerByArray(Douglas, false, false); cntMarker += Douglas.length; map.addOverlays(El_Frida); centerByArray(El_Frida, false, false); cntMarker += El_Frida.length; map.addOverlays(Elfrida); centerByArray(Elfrida, false, false); cntMarker += Elfrida.length; map.addOverlays(Ft_Huachuca); centerByArray(Ft_Huachuca, false, false); cntMarker += Ft_Huachuca.length; map.addOverlays(Hereford); centerByArray(Hereford, false, false); cntMarker += Hereford.length; map.addOverlays(Mcneal); centerByArray(Mcneal, false, false); cntMarker += Mcneal.length; map.addOverlays(Naco); centerByArray(Naco, false, false); cntMarker += Naco.length; map.addOverlays(Pearce); centerByArray(Pearce, false, false); cntMarker += Pearce.length; map.addOverlays(Phoenix); centerByArray(Phoenix, false, false); cntMarker += Phoenix.length; map.addOverlays(Pomerene); centerByArray(Pomerene, false, false); cntMarker += Pomerene.length; map.addOverlays(Portal); centerByArray(Portal, false, false); cntMarker += Portal.length; map.addOverlays(San_Simon); centerByArray(San_Simon, false, false); cntMarker += San_Simon.length; map.addOverlays(Sierra_Vista); centerByArray(Sierra_Vista, false, false); cntMarker += Sierra_Vista.length; map.addOverlays(St_David); centerByArray(St_David, false, false); cntMarker += St_David.length; map.addOverlays(Tombstone); centerByArray(Tombstone, false, false); cntMarker += Tombstone.length; map.addOverlays(Tucson); centerByArray(Tucson, false, false); cntMarker += Tucson.length; map.addOverlays(Willcox); centerByArray(Willcox, false, false); cntMarker += Willcox.length; centerByArray(Douglas,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'); } }