function addMarkers() { mySelect = document.getElementById('selection'); Avondale = [];Pueblo = [];Beulah = [];Pueblo_West = [];Colorado_City = [];Boone = [];Rye = [];mySelect.options[mySelect.options.length] = new Option("Avondale schools",'all=Avondale'); mySelect.options[mySelect.options.length] = new Option("Beulah schools",'all=Beulah'); mySelect.options[mySelect.options.length] = new Option("Boone schools",'all=Boone'); mySelect.options[mySelect.options.length] = new Option("Colorado City schools",'all=Colorado_City'); mySelect.options[mySelect.options.length] = new Option("Pueblo schools",'all=Pueblo'); mySelect.options[mySelect.options.length] = new Option("Pueblo West schools",'all=Pueblo_West'); mySelect.options[mySelect.options.length] = new Option("Rye schools",'all=Rye'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Avondale[Avondale.length] = createMarker(new GPoint(-104.34987640,38.23741913),"
Avondale Elementary School
213 Highway 50 East
Avondale, CO 81022

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Avondale Elementary School",'Avondale=' + Avondale.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.58961487,38.29870224),"
Belmont Elementary School
31 Macnaughton Road
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Belmont Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.58899689,38.28986359),"
Benjamin Franklin Elementary School
1315 Horseshoe Drive
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Benjamin Franklin Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.61637115,38.24727631),"
Bessemer Elementary School
1125 E Routt Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bessemer Elementary School",'Pueblo=' + Pueblo.length); Beulah[Beulah.length] = createMarker(new GPoint(-104.97770691,38.07596207),"
Beulah Elementary School
8734 Schoolhouse Lane
Beulah, CO 81023

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beulah Elementary School",'Beulah=' + Beulah.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.64877319,38.22331619),"
Beulah Heights Elementary School
2670 Delphinium Street
Pueblo, CO 81005

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beulah Heights Elementary School",'Pueblo=' + Pueblo.length); Beulah[Beulah.length] = createMarker(new GPoint(-104.97770691,38.07596207),"
Beulah Middle School
8734 Schoolhouse Lane
Beulah, CO 81023

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Beulah Middle School",'Beulah=' + Beulah.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.58907318,38.26811981),"
Bradford Elementary School
107 South La Crosse Avenue
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bradford Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.63065338,38.26476288),"
Carlile Elementary School
736 West Evans Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carlile Elementary School",'Pueblo=' + Pueblo.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.80036900,38.30805900),"
Cedar Ridge Elementary School
1266 West Oro Grande Drive
Pueblo West, CO 81007

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cedar Ridge Elementary School",'Pueblo_West=' + Pueblo_West.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.61071777,38.25469971),"
Centennial High School
2525 Montview Dirve
Pueblo, CO 81008

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Centennial High School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.62569427,38.25356674),"
Central High School
216 East Orman Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central High School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.64925385,38.28306198),"
Cesar Chavez Academy
2500 West 18th Street
Pueblo, CO 81003

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cesar Chavez Academy",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.63102722,38.24573135),"
Columbian Elementary School
1202 Bragdon Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Columbian Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.61812592,38.24018860),"
Community Transition House High School
1512 Pine Street
Pueblo, CO 81004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Transition House High School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.60732269,38.27316284),"
Connect Charter School
104 West 7th
Pueblo, CO 81003

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Connect Charter School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.61045837,38.27723694),"
Connections Academy
315 West 11th Street
Pueblo, CO 81003

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Connections Academy",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.62897491,38.23486328),"
Corwin Middle School
1500 Lakeview Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Corwin Middle School",'Pueblo=' + Pueblo.length); Colorado_City[Colorado_City.length] = createMarker(new GPoint(-104.82967377,37.96853638),"
Craver Middle School
4850 Crow Cut Off Road
Colorado City, CO 81019

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Craver Middle School",'Colorado_City=' + Colorado_City.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.75296021,38.30358887),"
Desert Sage Elementary School
935 South Palomar Drive
Pueblo West, CO 81007

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Desert Sage Elementary School",'Pueblo_West=' + Pueblo_West.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.64826800,38.28356600),"
Dolores Huerta Preparatory High School
2500 W 18th Street
Pueblo, CO 81003

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dolores Huerta Preparatory High School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.57612610,38.28854370),"
East High School
9 Mac Neil Road
Pueblo, CO 81001

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("East High School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.56252289,38.27573776),"
Eastside Care Center
2717 East 8th Street
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eastside Care Center",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.56112671,38.28336334),"
Eva R Baca Elementary School
2800 East 17th Street
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eva R Baca Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.59700775,38.27581024),"
Fountain Elementary School
925 N. Glendale Ave.
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fountain Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.61672211,38.28601074),"
Freed Middle School
715 West 20th Street
Pueblo, CO 81003

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Freed Middle School",'Pueblo=' + Pueblo.length); Boone[Boone.length] = createMarker(new GPoint(-104.29428101,38.22125626),"
Futures Academy
1516 Asbury Lane
Boone, CO 81025

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Futures Academy",'Boone=' + Boone.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.67105103,38.25606155),"
Goodnight Elementary School
624 Windy Way
Pueblo, CO 81005

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Goodnight Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.59672546,38.29673004),"
Haaff Elementary School
15 Chinook Lane
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Haaff Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.63717651,38.25610352),"
Heritage Elementary School
625 Brown Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Heritage Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.65977478,38.22135162),"
Highland Park Elementary School
2701 Vinewood Lane
Pueblo, CO 81005

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Highland Park Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.63325500,38.28633881),"
Irving Elementary School
1629 West 21st
Pueblo, CO 81003

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Irving Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.58687592,38.27619553),"
James H Risley Middle School
925 Monument Avenue
Pueblo, CO 81001

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("James H Risley Middle School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.62596130,38.25338364),"
Keating Continuing Education
215 East Orman
Pueblo, CO 81004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Keating Continuing Education",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.65659332,38.24103546),"
Lemuel Pitts Middle School
29 Lehigh Avenue
Pueblo, CO 81005

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lemuel Pitts Middle School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.62052155,38.23667908),"
Minnequa Elementary School
1708 East Orman Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Minnequa Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.63157654,38.30056381),"
Morton Elementary School
1900 West 31st Street
Pueblo, CO 81003

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Morton Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.51643372,38.24873734),"
North Mesa Elementary School
28881 Gale Road
Pueblo, CO 81006

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Mesa Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.63518524,38.30636215),"
Northmoor Preschool
2003 Northmoor Terrace
Pueblo, CO 81008

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northmoor Preschool",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.64617157,38.23476410),"
Olga A Hellbeck Elementary School
3000 Lakeview
Pueblo, CO 81005

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Olga A Hellbeck Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.58852386,38.27578735),"
Park View Elementary School
1327 East 9th Street
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Park View Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.54924011,38.25240707),"
Pleasant View Middle School
23600 Everett Road
Pueblo, CO 81006

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pleasant View Middle School",'Pueblo=' + Pueblo.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.71607200,38.34501800),"
Prairie Winds Elementary School
597 E Earl Drive
Pueblo West, CO 81007

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prairie Winds Elementary School",'Pueblo_West=' + Pueblo_West.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.63927460,38.23860168),"
Pueblo Charter School For Arts & Sciences
1745 Acero
Pueblo, CO 81004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pueblo Charter School For Arts & Sciences",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.46832275,38.24696350),"
Pueblo County High School
1050 35th Lane
Pueblo, CO 81006

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pueblo County High School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.57510376,38.28590012),"
Pueblo Technical Academy
900 West Orman Gsac
Pueblo, CO 81004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pueblo Technical Academy",'Pueblo=' + Pueblo.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.72416687,38.31946564),"
Pueblo West Elementary School
386 East Hahns Peak Avenue
Pueblo West, CO 81007

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pueblo West Elementary School",'Pueblo_West=' + Pueblo_West.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.77244568,38.31229401),"
Pueblo West High School
661 Capistrano Drive
Pueblo West, CO 81007

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pueblo West High School",'Pueblo_West=' + Pueblo_West.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.73010254,38.31669998),"
Pueblo West Middle School
484 South Maher Drive
Pueblo West, CO 81007

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pueblo West Middle School",'Pueblo_West=' + Pueblo_West.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.61071777,38.25469971),"
Roncalli Middle School
4202 Highway 78
Pueblo, CO 81005

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Roncalli Middle School",'Pueblo=' + Pueblo.length); Rye[Rye.length] = createMarker(new GPoint(-104.86810303,37.93019867),"
Rye Elementary School
P O Box 220
Rye, CO 81069

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rye Elementary School",'Rye=' + Rye.length); Rye[Rye.length] = createMarker(new GPoint(-104.86810303,37.93019867),"
Rye High School
P O Box 10
Rye, CO 81069

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rye High School",'Rye=' + Rye.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.77082062,38.32287598),"
Sierra Vista Elementary School
500 South Spaulding
Pueblo West, CO 81007

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sierra Vista Elementary School",'Pueblo_West=' + Pueblo_West.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.77925873,38.30449295),"
Sky View Middle School
1047 Camino De Bravo
Pueblo West, CO 81007

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sky View Middle School",'Pueblo_West=' + Pueblo_West.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.61669922,38.29562378),"
Somerlid Elementary School
2717 West Street
Pueblo, CO 81003

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Somerlid Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.65487671,38.23645020),"
South High School
1801 Hollywood Drive
Pueblo, CO 81005

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South High School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.54803467,38.23093796),"
South Mesa Elementary School
23701 East Preston Road
Pueblo, CO 81006

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Mesa Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.65432739,38.21626282),"
South Park Elementary School
3100 Hollywood
Pueblo, CO 81005

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Park Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.56982422,38.27706146),"
Spann Elementary School
2300 East 10th
Pueblo, CO 81001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Spann Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.65676880,38.24490356),"
Sunset Park Elementary School
110 University Circle
Pueblo, CO 81005

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sunset Park Elementary School",'Pueblo=' + Pueblo.length); Pueblo_West[Pueblo_West.length] = createMarker(new GPoint(-104.74119568,38.32772064),"
Swallows Charter Academy
278 South Mcculloch Boulevard
Pueblo West, CO 81007

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Swallows Charter Academy",'Pueblo_West=' + Pueblo_West.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.46498108,38.24003601),"
Vineland Elementary School
35777 Iris Road
Pueblo, CO 81006

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vineland Elementary School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.45912933,38.24335861),"
Vineland Middle School
1132 Lane 36
Pueblo, CO 81006

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Vineland Middle School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.58793640,38.30180359),"
W H Heaton Middle School
6 Adair Road
Pueblo, CO 81001

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("W H Heaton Middle School",'Pueblo=' + Pueblo.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.62596130,38.25338364),"
Youth & Family Academy Charter
215 East Orman Avenue
Pueblo, CO 81004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Youth & Family Academy Charter",'Pueblo=' + Pueblo.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(Avondale); map.removeOverlays(Beulah); map.removeOverlays(Boone); map.removeOverlays(Colorado_City); map.removeOverlays(Pueblo); map.removeOverlays(Pueblo_West); map.removeOverlays(Rye); 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(Avondale);map.removeOverlays(Avondale); map.removeOverlays(Beulah); map.removeOverlays(Boone); map.removeOverlays(Colorado_City); map.removeOverlays(Pueblo); map.removeOverlays(Pueblo_West); map.removeOverlays(Rye); map.addOverlays(Avondale); centerByArray(Avondale, false, false); cntMarker += Avondale.length; map.addOverlays(Beulah); centerByArray(Beulah, false, false); cntMarker += Beulah.length; map.addOverlays(Boone); centerByArray(Boone, false, false); cntMarker += Boone.length; map.addOverlays(Colorado_City); centerByArray(Colorado_City, false, false); cntMarker += Colorado_City.length; map.addOverlays(Pueblo); centerByArray(Pueblo, false, false); cntMarker += Pueblo.length; map.addOverlays(Pueblo_West); centerByArray(Pueblo_West, false, false); cntMarker += Pueblo_West.length; map.addOverlays(Rye); centerByArray(Rye, false, false); cntMarker += Rye.length; centerByArray(Avondale,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'); } }