function addMarkers()
{
mySelect = document.getElementById('selection');
Prescott = [];Ash_Fork = [];Cottonwood = [];Clarkdale = [];Prescott_Valley = [];Bagdad = [];Rimrock = [];Lake_Montezuma = [];Sedona = [];Dewey = [];Camp_Verde = [];Black_Canyon_City = [];Campe_Verde = [];Chino_Valley = [];Congress = [];Crown_King = [];Flagstaff = [];Fort_Mojave = [];Peridot = [];Mesa = [];Mayer = [];Humboldt = [];Kirkland = [];Sun_City = [];Cornville = [];Paulden = [];Seligman = [];Skull_Valley = [];Yarnell = [];mySelect.options[mySelect.options.length] = new Option("Ash Fork schools",'all=Ash_Fork');
mySelect.options[mySelect.options.length] = new Option("Bagdad schools",'all=Bagdad');
mySelect.options[mySelect.options.length] = new Option("Black Canyon City schools",'all=Black_Canyon_City');
mySelect.options[mySelect.options.length] = new Option("Camp Verde schools",'all=Camp_Verde');
mySelect.options[mySelect.options.length] = new Option("Campe Verde schools",'all=Campe_Verde');
mySelect.options[mySelect.options.length] = new Option("Chino Valley schools",'all=Chino_Valley');
mySelect.options[mySelect.options.length] = new Option("Clarkdale schools",'all=Clarkdale');
mySelect.options[mySelect.options.length] = new Option("Congress schools",'all=Congress');
mySelect.options[mySelect.options.length] = new Option("Cornville schools",'all=Cornville');
mySelect.options[mySelect.options.length] = new Option("Cottonwood schools",'all=Cottonwood');
mySelect.options[mySelect.options.length] = new Option("Crown King schools",'all=Crown_King');
mySelect.options[mySelect.options.length] = new Option("Dewey schools",'all=Dewey');
mySelect.options[mySelect.options.length] = new Option("Flagstaff schools",'all=Flagstaff');
mySelect.options[mySelect.options.length] = new Option("Fort Mojave schools",'all=Fort_Mojave');
mySelect.options[mySelect.options.length] = new Option("Humboldt schools",'all=Humboldt');
mySelect.options[mySelect.options.length] = new Option("Kirkland schools",'all=Kirkland');
mySelect.options[mySelect.options.length] = new Option("Lake Montezuma schools",'all=Lake_Montezuma');
mySelect.options[mySelect.options.length] = new Option("Mayer schools",'all=Mayer');
mySelect.options[mySelect.options.length] = new Option("Mesa schools",'all=Mesa');
mySelect.options[mySelect.options.length] = new Option("Paulden schools",'all=Paulden');
mySelect.options[mySelect.options.length] = new Option("Peridot schools",'all=Peridot');
mySelect.options[mySelect.options.length] = new Option("Prescott schools",'all=Prescott');
mySelect.options[mySelect.options.length] = new Option("Prescott Valley schools",'all=Prescott_Valley');
mySelect.options[mySelect.options.length] = new Option("Rimrock schools",'all=Rimrock');
mySelect.options[mySelect.options.length] = new Option("Sedona schools",'all=Sedona');
mySelect.options[mySelect.options.length] = new Option("Seligman schools",'all=Seligman');
mySelect.options[mySelect.options.length] = new Option("Skull Valley schools",'all=Skull_Valley');
mySelect.options[mySelect.options.length] = new Option("Sun City schools",'all=Sun_City');
mySelect.options[mySelect.options.length] = new Option("Yarnell schools",'all=Yarnell');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Prescott[Prescott.length] = createMarker(new GPoint(-112.49943542,34.57126617),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Abia Judd Elementary School",'Prescott=' + Prescott.length);
Ash_Fork[Ash_Fork.length] = createMarker(new GPoint(-112.55339813,35.20650101),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Academy Of Hope",'Ash_Fork=' + Ash_Fork.length);
Ash_Fork[Ash_Fork.length] = createMarker(new GPoint(-112.63732147,35.20240021),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Academy Of Hope, The",'Ash_Fork=' + Ash_Fork.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.02079773,34.69200134),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Accelerated Learning Charter School",'Cottonwood=' + Cottonwood.length);
Clarkdale[Clarkdale.length] = createMarker(new GPoint(-112.09860229,34.77759933),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Accelerated Learning Charter School",'Clarkdale=' + Clarkdale.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31607056,34.60440063),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Acorn Montessori Charter School",'Prescott_Valley=' + Prescott_Valley.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.00598145,34.73229980),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("American Heritage Academy",'Cottonwood=' + Cottonwood.length);
Clarkdale[Clarkdale.length] = createMarker(new GPoint(-112.09860229,34.77759933),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("American Heritage Academy (charter)",'Clarkdale=' + Clarkdale.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.49026489,34.53000641),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Ann Clare Learning Academy",'Prescott=' + Prescott.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.33267212,34.60062408),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Arizona Montessori Charter School - Prescott Valle",'Prescott_Valley=' + Prescott_Valley.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.01104000,34.73501000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Arizona Upgrade Academy",'Cottonwood=' + Cottonwood.length);
Ash_Fork[Ash_Fork.length] = createMarker(new GPoint(-112.55339813,35.20650101),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ash Fork Elementary School",'Ash_Fork=' + Ash_Fork.length);
Ash_Fork[Ash_Fork.length] = createMarker(new GPoint(-112.55339813,35.20650101),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ash Fork High School",'Ash_Fork=' + Ash_Fork.length);
Ash_Fork[Ash_Fork.length] = createMarker(new GPoint(-112.55339813,35.20650101),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Ash Fork Middle School",'Ash_Fork=' + Ash_Fork.length);
Bagdad[Bagdad.length] = createMarker(new GPoint(-113.17530060,34.58580017),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bagdad High School",'Bagdad=' + Bagdad.length);
Rimrock[Rimrock.length] = createMarker(new GPoint(-111.77989960,34.64089966),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Beaver Creek School",'Rimrock=' + Rimrock.length);
Lake_Montezuma[Lake_Montezuma.length] = createMarker(new GPoint(-111.77719879,34.63219833),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Belle Affeld Beloved Humanitites Academy: Whole St",'Lake_Montezuma=' + Lake_Montezuma.length);
Sedona[Sedona.length] = createMarker(new GPoint(-111.77829742,34.77668381),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Big Park Community School",'Sedona=' + Sedona.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.34193420,34.60063553),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bradshaw Mountain High School",'Prescott_Valley=' + Prescott_Valley.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31876500,34.62986100),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bradshaw Mountain High School East",'Prescott_Valley=' + Prescott_Valley.length);
Dewey[Dewey.length] = createMarker(new GPoint(-112.25324249,34.54877090),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bradshaw Mountain Middle School",'Dewey=' + Dewey.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.86356354,34.56201935),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Camp Verde Alternative School",'Camp_Verde=' + Camp_Verde.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.84960175,34.56240082),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Camp Verde Elementary School",'Camp_Verde=' + Camp_Verde.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.84960175,34.56240082),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Camp Verde High School",'Camp_Verde=' + Camp_Verde.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.84960175,34.56240082),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Camp Verde Middle School",'Camp_Verde=' + Camp_Verde.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.00974400,34.73996000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Camp Verde Unified School District",'Cottonwood=' + Cottonwood.length);
Black_Canyon_City[Black_Canyon_City.length] = createMarker(new GPoint(-112.12339783,34.08929825),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Canon School",'Black_Canyon_City=' + Black_Canyon_City.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.83139801,34.75400162),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Capitol High School",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.44200134,34.58010101),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Capitol High School (charter)",'Prescott=' + Prescott.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.01660156,34.71770096),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Center For Creative Education Charter School",'Cottonwood=' + Cottonwood.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.85320282,34.56840134),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chester Newton Charter And Montessori School",'Camp_Verde=' + Camp_Verde.length);
Campe_Verde[Campe_Verde.length] = createMarker(new GPoint(-111.85320282,34.56840134),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chester Newton Charter And Montessori School-neuha",'Campe_Verde=' + Campe_Verde.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.85320282,34.56840134),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chester Newton Charter And Montessori School-sunny",'Camp_Verde=' + Camp_Verde.length);
Chino_Valley[Chino_Valley.length] = createMarker(new GPoint(-112.51254272,34.78031921),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Chino Valley High School",'Chino_Valley=' + Chino_Valley.length);
Clarkdale[Clarkdale.length] = createMarker(new GPoint(-112.07450104,34.76359940),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Clarkdale-jerome Elementary School",'Clarkdale=' + Clarkdale.length);
Congress[Congress.length] = createMarker(new GPoint(-112.78900146,34.15710068),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Congress Elementary School",'Congress=' + Congress.length);
Congress[Congress.length] = createMarker(new GPoint(-112.78900146,34.15700150),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Congress Elementary Transporting",'Congress=' + Congress.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.02713013,34.73963547),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cottonwood Elementary School",'Cottonwood=' + Cottonwood.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.02713013,34.73963547),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Cottonwood Middle School",'Cottonwood=' + Cottonwood.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31516266,34.60966873),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Coyote Springs Elementary School",'Prescott_Valley=' + Prescott_Valley.length);
Crown_King[Crown_King.length] = createMarker(new GPoint(-112.31839752,34.15959930),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crown King Elementary School",'Crown_King=' + Crown_King.length);
Bagdad[Bagdad.length] = createMarker(new GPoint(-113.17530060,34.58580017),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("David C Lincoln School",'Bagdad=' + Bagdad.length);
Chino_Valley[Chino_Valley.length] = createMarker(new GPoint(-112.44860077,34.78039932),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Del Rio Elementary School",'Chino_Valley=' + Chino_Valley.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47166443,34.54100800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dexter Family Resource Center",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47166443,34.54100800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("District Office",'Prescott=' + Prescott.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.02713013,34.73963547),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dr Daniel Bright Elementary School",'Cottonwood=' + Cottonwood.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.00996399,34.73235321),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Edwards Hall Charter School",'Cottonwood=' + Cottonwood.length);
Chino_Valley[Chino_Valley.length] = createMarker(new GPoint(-112.51265717,34.78007889),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers Chino Valley, Llc",'Chino_Valley=' + Chino_Valley.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.02079773,34.69200134),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers Cottonwood, Llc",'Cottonwood=' + Cottonwood.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.33319092,34.60046387),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers Prescott Valley, Llc",'Prescott_Valley=' + Prescott_Valley.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.65119934,34.64350128),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers Prescott, Llc",'Prescott=' + Prescott.length);
Chino_Valley[Chino_Valley.length] = createMarker(new GPoint(-112.45397900,34.75534100),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers, Inc. - Chino Valley (char",'Chino_Valley=' + Chino_Valley.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.01515961,34.73134995),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers, Inc. - Cottonwood (charte",'Cottonwood=' + Cottonwood.length);
Flagstaff[Flagstaff.length] = createMarker(new GPoint(-111.61657715,35.20430756),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers, Inc. - Flagstaff (charter",'Flagstaff=' + Flagstaff.length);
Fort_Mojave[Fort_Mojave.length] = createMarker(new GPoint(-114.60058594,35.02163696),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers, Inc. - Fort Mojave High School",'Fort_Mojave=' + Fort_Mojave.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.65119934,34.64350128),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers, Inc. - Prescott (charter)",'Prescott=' + Prescott.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.33319092,34.60046387),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers, Inc. - Prescott Valley (c",'Prescott_Valley=' + Prescott_Valley.length);
Peridot[Peridot.length] = createMarker(new GPoint(-110.34870148,33.62179947),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excel Education Centers, Inc. - San Carlos (charte",'Peridot=' + Peridot.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31516266,34.60966873),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franklin Phonetic Primary School",'Prescott_Valley=' + Prescott_Valley.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31516266,34.60966873),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franklin Phonetic Primary School (charter)",'Prescott_Valley=' + Prescott_Valley.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.34235382,34.59860229),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Glassford Hill Middle School",'Prescott_Valley=' + Prescott_Valley.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.49944305,34.57211304),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Granite Mountain Middle School",'Prescott=' + Prescott.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.34652000,34.61922800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Granville Elementary School",'Prescott_Valley=' + Prescott_Valley.length);
Mesa[Mesa.length] = createMarker(new GPoint(-111.66636658,33.46206284),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Great American Academy I (charter)",'Mesa=' + Mesa.length);
Mayer[Mayer.length] = createMarker(new GPoint(-112.13169861,34.35150146),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Great American Academy Ii (charter)",'Mayer=' + Mayer.length);
Chino_Valley[Chino_Valley.length] = createMarker(new GPoint(-112.44860077,34.78039932),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Heritage Middle School",'Chino_Valley=' + Chino_Valley.length);
Bagdad[Bagdad.length] = createMarker(new GPoint(-113.20375061,34.57936096),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hillside Elementary School",'Bagdad=' + Bagdad.length);
Humboldt[Humboldt.length] = createMarker(new GPoint(-112.31516266,34.60966873),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Humboldt Elementary School",'Humboldt=' + Humboldt.length);
Sedona[Sedona.length] = createMarker(new GPoint(-111.76106262,34.86977005),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Juniper Canyon Alternative High School",'Sedona=' + Sedona.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.95760345,34.73630142),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kestrel High School",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.95760345,34.73630142),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kestrel High School (charter)",'Prescott=' + Prescott.length);
Kirkland[Kirkland.length] = createMarker(new GPoint(-112.91030121,34.45529938),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kirkland Elementary School",'Kirkland=' + Kirkland.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.35099030,34.59606171),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lake Valley Elementary School",'Prescott_Valley=' + Prescott_Valley.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31516266,34.60966873),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Liberty Traditional School",'Prescott_Valley=' + Prescott_Valley.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47734833,34.54022980),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Prescott=' + Prescott.length);
Mayer[Mayer.length] = createMarker(new GPoint(-112.16027069,34.34925461),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mayer Elementary School",'Mayer=' + Mayer.length);
Mayer[Mayer.length] = createMarker(new GPoint(-112.16027069,34.34925461),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mayer Junior/senior High School",'Mayer=' + Mayer.length);
Prescott[Prescott.length] = createMarker(new GPoint(-116.12999725,45.91896057),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Miller Valley School",'Prescott=' + Prescott.length);
Sun_City[Sun_City.length] = createMarker(new GPoint(-112.27326202,33.59040070),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mingus Mountain Academy",'Sun_City=' + Sun_City.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.32180023,34.58779907),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mingus Mountain Academy (charter)",'Prescott_Valley=' + Prescott_Valley.length);
Chino_Valley[Chino_Valley.length] = createMarker(new GPoint(-112.46980286,34.77180099),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mingus Springs Charter School",'Chino_Valley=' + Chino_Valley.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.00634100,34.71757100),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mingus Union High School",'Cottonwood=' + Cottonwood.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.89215000,34.62683700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Montessori Childrens House",'Camp_Verde=' + Camp_Verde.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47801971,34.54100037),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mountain Oak Charter School",'Prescott=' + Prescott.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31490326,34.60416412),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'Prescott_Valley=' + Prescott_Valley.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.01660156,34.71770096),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New Visions Academy",'Cottonwood=' + Cottonwood.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.01760101,34.69369888),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New Visions Academy (charter)",'Cottonwood=' + Cottonwood.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.01760101,34.69369888),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New Visions Academy-springerville Campus (charter) High School",'Cottonwood=' + Cottonwood.length);
Cornville[Cornville.length] = createMarker(new GPoint(-111.91449738,34.72589874),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Creek School",'Cornville=' + Cornville.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.85533100,34.56484700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pace Preparatory Academy",'Camp_Verde=' + Camp_Verde.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.85533100,34.56484700),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pace Preparatory Academy",'Camp_Verde=' + Camp_Verde.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.85320282,34.56840134),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pace Preparatory Academy (charter)",'Camp_Verde=' + Camp_Verde.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.48238373,34.57812500),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Painted Pony Ranch Charter School",'Prescott=' + Prescott.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.47801971,34.54100037),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Park View Middle School",'Prescott_Valley=' + Prescott_Valley.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31980133,34.61970139),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Park View Middle School (charter)",'Prescott_Valley=' + Prescott_Valley.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47166443,34.54100800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pathways",'Prescott=' + Prescott.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.84960175,34.56240082),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pathways Charter High School",'Camp_Verde=' + Camp_Verde.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.85355400,34.56204500),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pathways Preparatory Academy",'Camp_Verde=' + Camp_Verde.length);
Paulden[Paulden.length] = createMarker(new GPoint(-112.47869873,34.91360092),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Paulden Elementary School",'Paulden=' + Paulden.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.49051666,34.52295685),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Paulden Elementary School (charter)",'Prescott=' + Prescott.length);
Dewey[Dewey.length] = createMarker(new GPoint(-112.25435638,34.54981995),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Peak School At Yavapai College",'Dewey=' + Dewey.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47166443,34.54100800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Prelude Preschool Handicapped",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47692108,34.56017303),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Prescott High School",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47146606,34.53700638),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Prescott Mile High Middle School",'Prescott=' + Prescott.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.30059052,34.58198929),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Prescott Valley School",'Prescott_Valley=' + Prescott_Valley.length);
Sedona[Sedona.length] = createMarker(new GPoint(-111.81941986,34.86291122),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sedona Charter School",'Sedona=' + Sedona.length);
Sedona[Sedona.length] = createMarker(new GPoint(-111.76106262,34.86977005),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sedona Red Rock High School",'Sedona=' + Sedona.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.01660156,34.71770096),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sedona-oak Creek Joint Unified School District",'Cottonwood=' + Cottonwood.length);
Seligman[Seligman.length] = createMarker(new GPoint(-113.06400299,35.33259964),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Seligman Elementary School",'Seligman=' + Seligman.length);
Seligman[Seligman.length] = createMarker(new GPoint(-112.87484400,35.32663500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Seligman High School",'Seligman=' + Seligman.length);
Mayer[Mayer.length] = createMarker(new GPoint(-112.10179901,34.30131912),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sequoia Ranch",'Mayer=' + Mayer.length);
Skull_Valley[Skull_Valley.length] = createMarker(new GPoint(-112.69010162,34.50809860),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Skull Valley Elementary School",'Skull_Valley=' + Skull_Valley.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.45673370,34.54168701),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Skyview School",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.45673370,34.54168701),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Skyview School (charter)",'Prescott=' + Prescott.length);
Camp_Verde[Camp_Verde.length] = createMarker(new GPoint(-111.84960175,34.56240082),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sunnyside Charter And Montessori School",'Camp_Verde=' + Camp_Verde.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.02622800,34.74540700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tavasci Elementary School",'Cottonwood=' + Cottonwood.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47338104,34.57210922),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Taylor Hicks School",'Prescott=' + Prescott.length);
Sedona[Sedona.length] = createMarker(new GPoint(-116.77079773,47.72910690),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Terra Rosa Charter School",'Sedona=' + Sedona.length);
Chino_Valley[Chino_Valley.length] = createMarker(new GPoint(-112.46980286,34.77180099),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Territorial Elementary School",'Chino_Valley=' + Chino_Valley.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.47801971,34.54100037),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tri-city Prep High School",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.44200134,34.58010101),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tri-city Prep High School (charter)",'Prescott=' + Prescott.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.46746826,34.53985977),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tri-city Vo/tech High School",'Prescott=' + Prescott.length);
Cottonwood[Cottonwood.length] = createMarker(new GPoint(-112.00974400,34.73996000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Vacte",'Cottonwood=' + Cottonwood.length);
Prescott[Prescott.length] = createMarker(new GPoint(-112.46571350,34.54202271),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washington Traditional School",'Prescott=' + Prescott.length);
Sedona[Sedona.length] = createMarker(new GPoint(-111.78564453,34.87129211),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Sedona Elementary School",'Sedona=' + Sedona.length);
Sedona[Sedona.length] = createMarker(new GPoint(-111.78564453,34.87129211),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Sedona Montessori Class Charter",'Sedona=' + Sedona.length);
Yarnell[Yarnell.length] = createMarker(new GPoint(-112.60810089,34.42240143),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Yarnell Elementary School",'Yarnell=' + Yarnell.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.32180023,34.58779907),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Yavapai County High School",'Prescott_Valley=' + Prescott_Valley.length);
Prescott_Valley[Prescott_Valley.length] = createMarker(new GPoint(-112.31516266,34.60966873),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ycfa Achieve Academy",'Prescott_Valley=' + Prescott_Valley.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(Ash_Fork);
map.removeOverlays(Bagdad);
map.removeOverlays(Black_Canyon_City);
map.removeOverlays(Camp_Verde);
map.removeOverlays(Campe_Verde);
map.removeOverlays(Chino_Valley);
map.removeOverlays(Clarkdale);
map.removeOverlays(Congress);
map.removeOverlays(Cornville);
map.removeOverlays(Cottonwood);
map.removeOverlays(Crown_King);
map.removeOverlays(Dewey);
map.removeOverlays(Flagstaff);
map.removeOverlays(Fort_Mojave);
map.removeOverlays(Humboldt);
map.removeOverlays(Kirkland);
map.removeOverlays(Lake_Montezuma);
map.removeOverlays(Mayer);
map.removeOverlays(Mesa);
map.removeOverlays(Paulden);
map.removeOverlays(Peridot);
map.removeOverlays(Prescott);
map.removeOverlays(Prescott_Valley);
map.removeOverlays(Rimrock);
map.removeOverlays(Sedona);
map.removeOverlays(Seligman);
map.removeOverlays(Skull_Valley);
map.removeOverlays(Sun_City);
map.removeOverlays(Yarnell);
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(Prescott);map.removeOverlays(Ash_Fork);
map.removeOverlays(Bagdad);
map.removeOverlays(Black_Canyon_City);
map.removeOverlays(Camp_Verde);
map.removeOverlays(Campe_Verde);
map.removeOverlays(Chino_Valley);
map.removeOverlays(Clarkdale);
map.removeOverlays(Congress);
map.removeOverlays(Cornville);
map.removeOverlays(Cottonwood);
map.removeOverlays(Crown_King);
map.removeOverlays(Dewey);
map.removeOverlays(Flagstaff);
map.removeOverlays(Fort_Mojave);
map.removeOverlays(Humboldt);
map.removeOverlays(Kirkland);
map.removeOverlays(Lake_Montezuma);
map.removeOverlays(Mayer);
map.removeOverlays(Mesa);
map.removeOverlays(Paulden);
map.removeOverlays(Peridot);
map.removeOverlays(Prescott);
map.removeOverlays(Prescott_Valley);
map.removeOverlays(Rimrock);
map.removeOverlays(Sedona);
map.removeOverlays(Seligman);
map.removeOverlays(Skull_Valley);
map.removeOverlays(Sun_City);
map.removeOverlays(Yarnell);
map.addOverlays(Ash_Fork);
centerByArray(Ash_Fork, false, false);
cntMarker += Ash_Fork.length;
map.addOverlays(Bagdad);
centerByArray(Bagdad, false, false);
cntMarker += Bagdad.length;
map.addOverlays(Black_Canyon_City);
centerByArray(Black_Canyon_City, false, false);
cntMarker += Black_Canyon_City.length;
map.addOverlays(Camp_Verde);
centerByArray(Camp_Verde, false, false);
cntMarker += Camp_Verde.length;
map.addOverlays(Campe_Verde);
centerByArray(Campe_Verde, false, false);
cntMarker += Campe_Verde.length;
map.addOverlays(Chino_Valley);
centerByArray(Chino_Valley, false, false);
cntMarker += Chino_Valley.length;
map.addOverlays(Clarkdale);
centerByArray(Clarkdale, false, false);
cntMarker += Clarkdale.length;
map.addOverlays(Congress);
centerByArray(Congress, false, false);
cntMarker += Congress.length;
map.addOverlays(Cornville);
centerByArray(Cornville, false, false);
cntMarker += Cornville.length;
map.addOverlays(Cottonwood);
centerByArray(Cottonwood, false, false);
cntMarker += Cottonwood.length;
map.addOverlays(Crown_King);
centerByArray(Crown_King, false, false);
cntMarker += Crown_King.length;
map.addOverlays(Dewey);
centerByArray(Dewey, false, false);
cntMarker += Dewey.length;
map.addOverlays(Flagstaff);
centerByArray(Flagstaff, false, false);
cntMarker += Flagstaff.length;
map.addOverlays(Fort_Mojave);
centerByArray(Fort_Mojave, false, false);
cntMarker += Fort_Mojave.length;
map.addOverlays(Humboldt);
centerByArray(Humboldt, false, false);
cntMarker += Humboldt.length;
map.addOverlays(Kirkland);
centerByArray(Kirkland, false, false);
cntMarker += Kirkland.length;
map.addOverlays(Lake_Montezuma);
centerByArray(Lake_Montezuma, false, false);
cntMarker += Lake_Montezuma.length;
map.addOverlays(Mayer);
centerByArray(Mayer, false, false);
cntMarker += Mayer.length;
map.addOverlays(Mesa);
centerByArray(Mesa, false, false);
cntMarker += Mesa.length;
map.addOverlays(Paulden);
centerByArray(Paulden, false, false);
cntMarker += Paulden.length;
map.addOverlays(Peridot);
centerByArray(Peridot, false, false);
cntMarker += Peridot.length;
map.addOverlays(Prescott);
centerByArray(Prescott, false, false);
cntMarker += Prescott.length;
map.addOverlays(Prescott_Valley);
centerByArray(Prescott_Valley, false, false);
cntMarker += Prescott_Valley.length;
map.addOverlays(Rimrock);
centerByArray(Rimrock, false, false);
cntMarker += Rimrock.length;
map.addOverlays(Sedona);
centerByArray(Sedona, false, false);
cntMarker += Sedona.length;
map.addOverlays(Seligman);
centerByArray(Seligman, false, false);
cntMarker += Seligman.length;
map.addOverlays(Skull_Valley);
centerByArray(Skull_Valley, false, false);
cntMarker += Skull_Valley.length;
map.addOverlays(Sun_City);
centerByArray(Sun_City, false, false);
cntMarker += Sun_City.length;
map.addOverlays(Yarnell);
centerByArray(Yarnell, false, false);
cntMarker += Yarnell.length;
centerByArray(Prescott,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');
}
}