function addMarkers()
{
mySelect = document.getElementById('selection');
Englewood = [];Littleton = [];Aurora = [];Centennial = [];Greenwood_Village = [];Byers = [];Cherry_Hills_Village = [];Deer_Trail = [];Watkins = [];mySelect.options[mySelect.options.length] = new Option("Aurora schools",'all=Aurora');
mySelect.options[mySelect.options.length] = new Option("Byers schools",'all=Byers');
mySelect.options[mySelect.options.length] = new Option("Centennial schools",'all=Centennial');
mySelect.options[mySelect.options.length] = new Option("Cherry Hills Village schools",'all=Cherry_Hills_Village');
mySelect.options[mySelect.options.length] = new Option("Deer Trail schools",'all=Deer_Trail');
mySelect.options[mySelect.options.length] = new Option("Englewood schools",'all=Englewood');
mySelect.options[mySelect.options.length] = new Option("Greenwood Village schools",'all=Greenwood_Village');
mySelect.options[mySelect.options.length] = new Option("Littleton schools",'all=Littleton');
mySelect.options[mySelect.options.length] = new Option("Watkins schools",'all=Watkins');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Englewood[Englewood.length] = createMarker(new GPoint(-105.03017426,39.63550186),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Alice Terry Elementary School",'Englewood=' + Englewood.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.93613434,39.58478928),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ames Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.72415924,39.61803818),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Antelope Ridge Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.96513367,39.58048630),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Arapahoe High School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.78498840,39.69183731),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Arkansas Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.76715088,39.66422653),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Arrowhead Elementary School",'Aurora=' + Aurora.length);
Centennial[Centennial.length] = createMarker(new GPoint(-10.00000000,10.00000000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Aspen Crossing Elementary School",'Centennial=' + Centennial.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.86831665,39.71833801),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Aurora Academy Charter School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.85172272,39.73276138),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Aurora Central High School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.81264900,39.70870900),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Aurora Hills Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.83117676,39.74196243),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Aurora Public Schools Child Development Center",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.83396149,39.70382690),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Aurora Quest Academy",'Aurora=' + Aurora.length);
Greenwood_Village[Greenwood_Village.length] = createMarker(new GPoint(-104.87597656,39.62822342),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Belleview Elementary School",'Greenwood_Village=' + Greenwood_Village.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.88018036,39.73810196),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Boston Elementary School",'Aurora=' + Aurora.length);
Byers[Byers.length] = createMarker(new GPoint(-104.21738434,39.70822525),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Byers Elementary School",'Byers=' + Byers.length);
Byers[Byers.length] = createMarker(new GPoint(-105.01461792,39.67238617),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Byers Junior-senior High School",'Byers=' + Byers.length);
Greenwood_Village[Greenwood_Village.length] = createMarker(new GPoint(-104.87597656,39.62957764),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Campus Middle School",'Greenwood_Village=' + Greenwood_Village.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.72155762,39.60550690),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Canyon Creek Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.06060791,39.61659241),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Centennial Academy Of Fine Arts Education",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.81077576,39.67191315),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Century Elementary School",'Aurora=' + Aurora.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.99190521,39.62785339),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Charles B Sinclair Middle School",'Englewood=' + Englewood.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.97133636,39.65678787),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Charles Hay Elementary School",'Englewood=' + Englewood.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.74449921,39.59320068),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cherokee Trail High School",'Aurora=' + Aurora.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.98663330,39.65208817),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cherrelyn Elementary School",'Englewood=' + Englewood.length);
Greenwood_Village[Greenwood_Village.length] = createMarker(new GPoint(-104.87592316,39.60305786),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cherry Creek Charter Academy",'Greenwood_Village=' + Greenwood_Village.length);
Greenwood_Village[Greenwood_Village.length] = createMarker(new GPoint(-104.88124847,39.63126373),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cherry Creek High School",'Greenwood_Village=' + Greenwood_Village.length);
Cherry_Hills_Village[Cherry_Hills_Village.length] = createMarker(new GPoint(-104.95951843,39.63746262),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cherry Hills Village Elementary School",'Cherry_Hills_Village=' + Cherry_Hills_Village.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.78476715,39.64813995),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cimarron Elementary School",'Aurora=' + Aurora.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.99483490,39.63328552),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Clayton Elementary School",'Englewood=' + Englewood.length);
Englewood[Englewood.length] = createMarker(new GPoint(-72.07049800,41.43517200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Colorado's Finest Alternative High School",'Englewood=' + Englewood.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.78353119,39.66120529),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Columbia Middle School",'Aurora=' + Aurora.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.85839081,39.60958862),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cottonwood Creek Elementary School",'Englewood=' + Englewood.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.75418091,39.58045197),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Creekside Elementary School",'Centennial=' + Centennial.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.74642181,39.64484024),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dakota Valley Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.78685760,39.65958023),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dalton Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.79968262,39.66211319),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dartmouth Elementary School",'Aurora=' + Aurora.length);
Deer_Trail[Deer_Trail.length] = createMarker(new GPoint(-104.07170105,39.57989883),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Deer Trail Elementary School",'Deer_Trail=' + Deer_Trail.length);
Deer_Trail[Deer_Trail.length] = createMarker(new GPoint(-104.07170105,39.57989883),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Deer Trail Junior-senior High School",'Deer_Trail=' + Deer_Trail.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.89945984,39.58196259),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dry Creek Elementary School",'Englewood=' + Englewood.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.73802185,39.62708664),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eaglecrest High School",'Centennial=' + Centennial.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.99046326,39.60879517),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("East Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.81221771,39.73487473),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("East Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.85169220,39.67263794),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eastridge Community Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.81591797,39.73106766),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Elkhart Elementary School",'Aurora=' + Aurora.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.98323822,39.65018845),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Englewood High School",'Englewood=' + Englewood.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.98645020,39.64764023),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Englewood Leadership Academy",'Englewood=' + Englewood.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.99724579,39.59708786),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Euclid Middle School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.75675964,39.60763931),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Falcon Creek Middle School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.98089600,39.61177063),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Field Elementary School",'Littleton=' + Littleton.length);
Englewood[Englewood.length] = createMarker(new GPoint(-105.03202057,39.64926529),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fort Logan Elementary School",'Englewood=' + Englewood.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.78115845,39.60144043),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fox Hollow Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.96981049,39.59918976),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franklin Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.87077332,39.72753143),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fulton Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.81912231,39.69314575),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Gateway High School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.06060791,39.61659241),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Goddard Middle School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.75312042,39.59486389),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Grandview High School",'Aurora=' + Aurora.length);
Greenwood_Village[Greenwood_Village.length] = createMarker(new GPoint(-104.92262268,39.61589432),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greenwood Elementary School",'Greenwood_Village=' + Greenwood_Village.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.79091644,39.72376251),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hartenbach High School",'Aurora=' + Aurora.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.90957642,39.59609222),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Heritage Elementary School",'Centennial=' + Centennial.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.00572968,39.58438873),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Heritage High School",'Littleton=' + Littleton.length);
Greenwood_Village[Greenwood_Village.length] = createMarker(new GPoint(-104.87139130,39.60576248),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("High Plains Elementary School",'Greenwood_Village=' + Greenwood_Village.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.97983551,39.59769058),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Highland Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.86009979,39.70366287),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Highline Community Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.80972290,39.73490524),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hinkley High School",'Aurora=' + Aurora.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.90923309,39.58124161),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Homestead Elementary School",'Centennial=' + Centennial.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.98174286,39.58774948),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hopkins Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.76735687,39.64243317),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Horizon Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.79842377,39.63076401),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Independence Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.79636383,39.62065887),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Indian Ridge Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.79401398,39.68743515),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Iowa Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.86302185,39.72913742),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jamaica Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.81837463,39.68223572),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jewell Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.97803497,39.57298660),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("John Wesley Powell Middle School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.86017609,39.73568344),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kenton Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.85947418,39.72401047),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lansing Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.80042267,39.73739624),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Laredo Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.80412292,39.62386322),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Laredo Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.73606110,39.57976151),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Liberty Middle School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.00278473,39.57368851),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Littleton Academy",'Littleton=' + Littleton.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.98539734,39.61328506),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Littleton High School",'Littleton=' + Littleton.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.02564240,39.62305832),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Littleton Prep Charter School",'Littleton=' + Littleton.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.93083191,39.60112381),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lois Lenski Elementary School",'Littleton=' + Littleton.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.98323822,39.65018845),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lowell Prekindergarten",'Englewood=' + Englewood.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.84201050,39.71858215),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lyn Knoll Elementary School",'Aurora=' + Aurora.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.99596405,39.64588547),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Maddox Elementary School",'Englewood=' + Englewood.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.98663330,39.65208817),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mary L Flood Middle School",'Englewood=' + Englewood.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.77986908,39.62603760),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Meadow Point Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.80445862,39.64748383),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mission Viejo Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.00713348,39.60073853),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Moody Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.78177643,39.68158340),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mrachek Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.71194000,39.69088700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Murphy Creek K-8 School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.94133759,39.59498978),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Newton Middle School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.84494019,39.68196487),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Overland High School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.84837341,39.74267578),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Paris Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.95249176,39.60424423),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Peabody Elementary School",'Littleton=' + Littleton.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.76159668,39.62173843),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Peakview Elementary School",'Centennial=' + Centennial.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.85090637,39.66365433),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Polton Community Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.85677338,39.68239594),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ponderosa Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.84355164,39.68196487),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Prairie Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.78056335,39.67413712),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rangeview High School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.95359400,39.58319500),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Red Hawk Ridge Elementary School",'Aurora=' + Aurora.length);
Watkins[Watkins.length] = createMarker(new GPoint(-104.67506409,39.63863754),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ridge View Academy Charter School",'Watkins=' + Watkins.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.76490784,39.61177063),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rolling Hills Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.99790955,39.58493805),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Runyon Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.81771851,39.63312912),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sagebrush Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.95533752,39.59118652),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sandburg Elementary School",'Littleton=' + Littleton.length);
Englewood[Englewood.length] = createMarker(new GPoint(-105.02548981,39.64196777),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sheridan Middle School",'Englewood=' + Englewood.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.76483917,39.67713928),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Side Creek Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.83102417,39.72471619),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sixth Avenue Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.74916100,39.63472900),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sky Vista Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.80194855,39.62945557),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Smoky Hill High School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.84329224,39.72243118),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("South Middle School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.77561188,39.63873672),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Summit Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.75782013,39.64233780),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sunrise Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.73851776,39.62162018),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Thunder Ridge Middle School",'Aurora=' + Aurora.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.74911499,39.61691284),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Timberline Elementary School",'Centennial=' + Centennial.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.80187988,39.70394897),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tollgate Elementary School",'Aurora=' + Aurora.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.77899933,39.61932373),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Trails West Elementary School",'Centennial=' + Centennial.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.96947479,39.59118652),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Twain Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-81.78726196,24.55717087),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vassar Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.83627319,39.73464584),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vaughn Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.01024628,39.61518860),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Village At North Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.85157776,39.69040680),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Village East Community Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.84017944,39.70746231),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Virginia Court Elementary School",'Aurora=' + Aurora.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.89595795,39.58940125),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Walnut Hills Community Elementary School",'Centennial=' + Centennial.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.87042236,39.73626328),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("West Middle School",'Aurora=' + Aurora.length);
Greenwood_Village[Greenwood_Village.length] = createMarker(new GPoint(-104.89025879,39.52909851),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("West Middle School",'Greenwood_Village=' + Greenwood_Village.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.83396149,39.70382690),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wheeling Elementary School",'Aurora=' + Aurora.length);
Littleton[Littleton.length] = createMarker(new GPoint(-104.99057770,39.59824371),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Whitman Elementary School",'Littleton=' + Littleton.length);
Littleton[Littleton.length] = createMarker(new GPoint(-105.04255676,39.60314178),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wilder Elementary School",'Littleton=' + Littleton.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.84737396,39.72978973),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("William Smith High School",'Aurora=' + Aurora.length);
Centennial[Centennial.length] = createMarker(new GPoint(-104.88739777,39.57387161),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Willow Creek Elementary School",'Centennial=' + Centennial.length);
Englewood[Englewood.length] = createMarker(new GPoint(-104.99353790,39.66048813),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wm E Bishop Elementary School",'Englewood=' + Englewood.length);
Aurora[Aurora.length] = createMarker(new GPoint(-104.80294800,39.66766739),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Yale Elementary School",'Aurora=' + Aurora.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(Aurora);
map.removeOverlays(Byers);
map.removeOverlays(Centennial);
map.removeOverlays(Cherry_Hills_Village);
map.removeOverlays(Deer_Trail);
map.removeOverlays(Englewood);
map.removeOverlays(Greenwood_Village);
map.removeOverlays(Littleton);
map.removeOverlays(Watkins);
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(Englewood);map.removeOverlays(Aurora);
map.removeOverlays(Byers);
map.removeOverlays(Centennial);
map.removeOverlays(Cherry_Hills_Village);
map.removeOverlays(Deer_Trail);
map.removeOverlays(Englewood);
map.removeOverlays(Greenwood_Village);
map.removeOverlays(Littleton);
map.removeOverlays(Watkins);
map.addOverlays(Aurora);
centerByArray(Aurora, false, false);
cntMarker += Aurora.length;
map.addOverlays(Byers);
centerByArray(Byers, false, false);
cntMarker += Byers.length;
map.addOverlays(Centennial);
centerByArray(Centennial, false, false);
cntMarker += Centennial.length;
map.addOverlays(Cherry_Hills_Village);
centerByArray(Cherry_Hills_Village, false, false);
cntMarker += Cherry_Hills_Village.length;
map.addOverlays(Deer_Trail);
centerByArray(Deer_Trail, false, false);
cntMarker += Deer_Trail.length;
map.addOverlays(Englewood);
centerByArray(Englewood, false, false);
cntMarker += Englewood.length;
map.addOverlays(Greenwood_Village);
centerByArray(Greenwood_Village, false, false);
cntMarker += Greenwood_Village.length;
map.addOverlays(Littleton);
centerByArray(Littleton, false, false);
cntMarker += Littleton.length;
map.addOverlays(Watkins);
centerByArray(Watkins, false, false);
cntMarker += Watkins.length;
centerByArray(Englewood,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');
}
}