function addMarkers() { mySelect = document.getElementById('selection'); Springfield = [];Donnelsville = [];Enon = [];New_Carlisle = [];Medway = [];South_Charleston = [];South_Vienna = [];Yellow_Springs = [];mySelect.options[mySelect.options.length] = new Option("Donnelsville schools",'all=Donnelsville'); mySelect.options[mySelect.options.length] = new Option("Enon schools",'all=Enon'); mySelect.options[mySelect.options.length] = new Option("Medway schools",'all=Medway'); mySelect.options[mySelect.options.length] = new Option("New Carlisle schools",'all=New_Carlisle'); mySelect.options[mySelect.options.length] = new Option("South Charleston schools",'all=South_Charleston'); mySelect.options[mySelect.options.length] = new Option("South Vienna schools",'all=South_Vienna'); mySelect.options[mySelect.options.length] = new Option("Springfield schools",'all=Springfield'); mySelect.options[mySelect.options.length] = new Option("Yellow Springs schools",'all=Yellow_Springs'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Springfield[Springfield.length] = createMarker(new GPoint(-83.83229828,39.92468262),"
Clark Middle School
1315 W High St
Springfield, OH 45506

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Clark Middle School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.79754639,39.87060928),"
Clark-shawnee Kindergarten Vil Elementary School
3835 Old Clifton Rd
Springfield, OH 45502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clark-shawnee Kindergarten Vil Elementary School",'Springfield=' + Springfield.length); Donnelsville[Donnelsville.length] = createMarker(new GPoint(-83.94609833,39.91820145),"
Donnelsville Elementary School
Po Box 130
Donnelsville, OH 45319

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Donnelsville Elementary School",'Donnelsville=' + Donnelsville.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.77595520,39.91947174),"
Elmwood Center
601 Selma Rd
Springfield, OH 45505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elmwood Center",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.80104828,39.91440582),"
Emerson Elementary School
601 Selma Rd
Springfield, OH 45505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Emerson Elementary School",'Springfield=' + Springfield.length); Enon[Enon.length] = createMarker(new GPoint(-83.93682098,39.87734222),"
Enon Elementary School
120 S Xenia Dr
Enon, OH 45323

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Enon Elementary School",'Enon=' + Enon.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.78856659,39.90821457),"
Franklin Middle School
1525 Kenwood Ave
Springfield, OH 45505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Franklin Middle School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.82247162,39.91796875),"
Fulton Elementary School
631 S Yellow Springs St
Springfield, OH 45506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fulton Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.83147430,39.92299271),"
Grayhill Elementary School
251 Montgomery Ave
Springfield, OH 45506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Grayhill Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.89007568,39.87091827),"
Greenon High School
3950 S Tecumseh Rd
Springfield, OH 45502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greenon High School",'Springfield=' + Springfield.length); Enon[Enon.length] = createMarker(new GPoint(-83.93705200,39.87651800),"
Greenon Virtual School
500 Enon Xenia Pike
Enon, OH 45323

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greenon Virtual School",'Enon=' + Enon.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.80803680,39.90535355),"
Hayward Middle School
1700 Clifton Ave
Springfield, OH 45505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hayward Middle School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.81568146,39.90875626),"
Highlands Elementary School
1452 S Wittenberg Ave
Springfield, OH 45506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Highlands Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.88464355,39.84090424),"
Hustead Elementary School
3600 Hustead Rd
Springfield, OH 45502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hustead Elementary School",'Springfield=' + Springfield.length); Enon[Enon.length] = createMarker(new GPoint(-83.93764496,39.86391449),"
Indian Valley Middle School
510 Enon Xenia Rd
Enon, OH 45323

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Indian Valley Middle School",'Enon=' + Enon.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.81483459,39.91904831),"
Keifer Community Center High School
601 Selma Rd
Springfield, OH 45505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Keifer Community Center High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.78753662,39.95201492),"
Kenton Elementary School
731 E Home Rd
Springfield, OH 45503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kenton Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.76384735,39.98483276),"
Kenton Ridge High School
4444 Middle Urbana Rd
Springfield, OH 45503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kenton Ridge High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.78810120,39.90685272),"
Kenwood Heights - Beacon Ec Center
1421 Nagley St
Springfield, OH 45505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kenwood Heights - Beacon Ec Center",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.76773071,39.94509506),"
Lagonda Elementary School
800 E Mccreight Ave
Springfield, OH 45503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lagonda Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.79193878,39.90461349),"
Life Skills Center-springfield High School
1637 Selma Rd
Springfield, OH 45505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Skills Center-springfield High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.80173492,39.90695190),"
Lincoln Elementary School
1500 Tibbetts Ave
Springfield, OH 45505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.76570892,39.91456223),"
Mann Elementary School
521 Mount Joy St
Springfield, OH 45505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mann Elementary School",'Springfield=' + Springfield.length); New_Carlisle[New_Carlisle.length] = createMarker(new GPoint(-84.04709625,39.89413834),"
Mcadams Learning Center Elementary School
1400 Mcadams Dr
New Carlisle, OH 45344

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcadams Learning Center Elementary School",'New_Carlisle=' + New_Carlisle.length); Medway[Medway.length] = createMarker(new GPoint(-84.01197815,39.88208389),"
Medway Elementary School
116 Middle St
Medway, OH 45341

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Medway Elementary School",'Medway=' + Medway.length); South_Charleston[South_Charleston.length] = createMarker(new GPoint(-83.64002228,39.82673645),"
Miami View Elementary School
230 Clifton Rd
South Charleston, OH 45368

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Miami View Elementary School",'South_Charleston=' + South_Charleston.length); South_Charleston[South_Charleston.length] = createMarker(new GPoint(-83.64002228,39.82673645),"
Miami View Middle School
230 Clifton Rd
South Charleston, OH 45368

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Miami View Middle School",'South_Charleston=' + South_Charleston.length); New_Carlisle[New_Carlisle.length] = createMarker(new GPoint(-84.03202057,39.94862366),"
New Carlisle Middle School
1203 Kennison Ave
New Carlisle, OH 45344

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("New Carlisle Middle School",'New_Carlisle=' + New_Carlisle.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.79644775,39.95274353),"
North High School
701 E Home Rd
Springfield, OH 45503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.68174744,39.94162369),"
Northeastern High School
1480 Bowman Rd
Springfield, OH 45502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northeastern High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.77214813,39.98709869),"
Northridge Elementary School
4445 Ridgewood Rd E
Springfield, OH 45503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northridge Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.77214813,39.98709869),"
Northridge Middle School
4445 Ridgewood Rd E
Springfield, OH 45503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northridge Middle School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.91560364,39.98905563),"
Northwestern Elementary School
5780 Troy Rd
Springfield, OH 45502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northwestern Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.91082764,39.98881531),"
Northwestern High School
5650 Troy Rd
Springfield, OH 45502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwestern High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.91016388,39.98877716),"
Northwestern Middle School
5610 Troy Rd
Springfield, OH 45502

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northwestern Middle School",'Springfield=' + Springfield.length); New_Carlisle[New_Carlisle.length] = createMarker(new GPoint(-83.99411011,39.91297150),"
Olive Branch Middle School
9712 W National Rd
New Carlisle, OH 45344

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Olive Branch Middle School",'New_Carlisle=' + New_Carlisle.length); New_Carlisle[New_Carlisle.length] = createMarker(new GPoint(-84.04255676,39.88839722),"
Park Layne Elementary School
620 Cliffside Dr
New Carlisle, OH 45344

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Park Layne Elementary School",'New_Carlisle=' + New_Carlisle.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.82126617,39.90296555),"
Perrin Woods Elementary School
431 W John St
Springfield, OH 45506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Perrin Woods Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.82653809,39.90943909),"
Possum Elementary School
2589 S Yellow Springs Rd
Springfield, OH 45506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Possum Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.74317932,39.91267014),"
Reid Elementary School
3640 E High St
Springfield, OH 45505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Reid Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.87500763,39.92620468),"
Rockway Elementary School
3500 W National Rd
Springfield, OH 45504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rockway Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.75061035,39.99402618),"
Rolling Hills Elementary School
2613 Moorefield Rd
Springfield, OH 45502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rolling Hills Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.80480957,39.94360352),"
Roosevelt Middle School
1600 N Limestone St
Springfield, OH 45503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Roosevelt Middle School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.76947021,39.92171860),"
Schaefer Middle School
130 S Burnett Rd
Springfield, OH 45505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Schaefer Middle School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.77982330,39.87091064),"
Shawnee High School
1675 E Possum Rd
Springfield, OH 45502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shawnee High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.81796265,39.94596863),"
Snowhill Elementary School
1221 E Home Rd
Springfield, OH 45503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Snowhill Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.83147430,39.92299271),"
Snyder Park Elementary School
251 Montgomery Ave
Springfield, OH 45506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Snyder Park Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.80905914,39.91596985),"
South High School
700 S Limestone St
Springfield, OH 45505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South High School",'Springfield=' + Springfield.length); South_Vienna[South_Vienna.length] = createMarker(new GPoint(-83.61543274,39.92783737),"
South Vienna Elementary School
140 W Main St
South Vienna, OH 45369

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Vienna Elementary School",'South_Vienna=' + South_Vienna.length); South_Vienna[South_Vienna.length] = createMarker(new GPoint(-83.38095856,38.66448975),"
South Vienna Middle School
140 W Main St
South Vienna, OH 45369

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("South Vienna Middle School",'South_Vienna=' + South_Vienna.length); South_Charleston[South_Charleston.length] = createMarker(new GPoint(-83.65149689,39.85169983),"
Southeastern High School
Po Box Z
South Charleston, OH 45368

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southeastern High School",'South_Charleston=' + South_Charleston.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.81313324,39.91716766),"
Springfield Academy Of Excellence
623 S Center St
Springfield, OH 45506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Springfield Academy Of Excellence",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.79162000,39.90403300),"
Springfield Preparatory And Fitness Academy
1615 Selma Rd
Springfield, OH 45505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Springfield Preparatory And Fitness Academy",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.79123688,39.90082169),"
Springfield-clark County High School
1901 Selma Rd
Springfield, OH 45505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Springfield-clark County High School",'Springfield=' + Springfield.length); New_Carlisle[New_Carlisle.length] = createMarker(new GPoint(-83.99584198,39.91275787),"
Tecumseh High School
9830 W National Rd
New Carlisle, OH 45344

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tecumseh High School",'New_Carlisle=' + New_Carlisle.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.80769500,39.90829000),"
Urban Youth Academy, Inc.
1408 Clifton Ave
Springfield, OH 45505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Urban Youth Academy, Inc.",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-83.77429199,39.92856216),"
Warder Park-wayne Elementary School
2820 Hillside Ave
Springfield, OH 45503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Warder Park-wayne Elementary School",'Springfield=' + Springfield.length); New_Carlisle[New_Carlisle.length] = createMarker(new GPoint(-84.03673553,39.94533539),"
Westlake Elementary School
621 Walsh Dr
New Carlisle, OH 45344

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westlake Elementary School",'New_Carlisle=' + New_Carlisle.length); Yellow_Springs[Yellow_Springs.length] = createMarker(new GPoint(-83.90717316,39.79906845),"
Yellow Springs/mckinney High School
420 E Enon Rd
Yellow Springs, OH 45387

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yellow Springs/mckinney High School",'Yellow_Springs=' + Yellow_Springs.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(Donnelsville); map.removeOverlays(Enon); map.removeOverlays(Medway); map.removeOverlays(New_Carlisle); map.removeOverlays(South_Charleston); map.removeOverlays(South_Vienna); map.removeOverlays(Springfield); map.removeOverlays(Yellow_Springs); 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(Springfield);map.removeOverlays(Donnelsville); map.removeOverlays(Enon); map.removeOverlays(Medway); map.removeOverlays(New_Carlisle); map.removeOverlays(South_Charleston); map.removeOverlays(South_Vienna); map.removeOverlays(Springfield); map.removeOverlays(Yellow_Springs); map.addOverlays(Donnelsville); centerByArray(Donnelsville, false, false); cntMarker += Donnelsville.length; map.addOverlays(Enon); centerByArray(Enon, false, false); cntMarker += Enon.length; map.addOverlays(Medway); centerByArray(Medway, false, false); cntMarker += Medway.length; map.addOverlays(New_Carlisle); centerByArray(New_Carlisle, false, false); cntMarker += New_Carlisle.length; map.addOverlays(South_Charleston); centerByArray(South_Charleston, false, false); cntMarker += South_Charleston.length; map.addOverlays(South_Vienna); centerByArray(South_Vienna, false, false); cntMarker += South_Vienna.length; map.addOverlays(Springfield); centerByArray(Springfield, false, false); cntMarker += Springfield.length; map.addOverlays(Yellow_Springs); centerByArray(Yellow_Springs, false, false); cntMarker += Yellow_Springs.length; centerByArray(Springfield,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'); } }