function addMarkers() { mySelect = document.getElementById('selection'); Ransom = [];Mendota = [];Streator = [];Ottawa = [];Seneca = [];La_Salle = [];Earlville = [];Grand_Ridge = [];Lasalle = [];Leland = [];Oglesby = [];Lostant = [];Marseilles = [];Peru = [];Serena = [];Sheridan = [];Tonica = [];Utica = [];mySelect.options[mySelect.options.length] = new Option("Earlville schools",'all=Earlville'); mySelect.options[mySelect.options.length] = new Option("Grand Ridge schools",'all=Grand_Ridge'); mySelect.options[mySelect.options.length] = new Option("La Salle schools",'all=La_Salle'); mySelect.options[mySelect.options.length] = new Option("Lasalle schools",'all=Lasalle'); mySelect.options[mySelect.options.length] = new Option("Leland schools",'all=Leland'); mySelect.options[mySelect.options.length] = new Option("Lostant schools",'all=Lostant'); mySelect.options[mySelect.options.length] = new Option("Marseilles schools",'all=Marseilles'); mySelect.options[mySelect.options.length] = new Option("Mendota schools",'all=Mendota'); mySelect.options[mySelect.options.length] = new Option("Oglesby schools",'all=Oglesby'); mySelect.options[mySelect.options.length] = new Option("Ottawa schools",'all=Ottawa'); mySelect.options[mySelect.options.length] = new Option("Peru schools",'all=Peru'); mySelect.options[mySelect.options.length] = new Option("Ransom schools",'all=Ransom'); mySelect.options[mySelect.options.length] = new Option("Seneca schools",'all=Seneca'); mySelect.options[mySelect.options.length] = new Option("Serena schools",'all=Serena'); mySelect.options[mySelect.options.length] = new Option("Sheridan schools",'all=Sheridan'); mySelect.options[mySelect.options.length] = new Option("Streator schools",'all=Streator'); mySelect.options[mySelect.options.length] = new Option("Tonica schools",'all=Tonica'); mySelect.options[mySelect.options.length] = new Option("Utica schools",'all=Utica'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Ransom[Ransom.length] = createMarker(new GPoint(-88.65408325,41.15396118),"
Allen-otter Creek Ccsd 65 Elementary School
400 S Lane St
Ransom, IL 60470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Allen-otter Creek Ccsd 65 Elementary School",'Ransom=' + Ransom.length); Mendota[Mendota.length] = createMarker(new GPoint(-89.12797546,41.54916382),"
Blackstone Elementary School
1309 Jefferson St
Mendota, IL 61342

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Blackstone Elementary School",'Mendota=' + Mendota.length); Streator[Streator.length] = createMarker(new GPoint(-88.84456635,41.15013885),"
Centennial Elementary School
614 Oakley Ave
Streator, IL 61364

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Centennial Elementary School",'Streator=' + Streator.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.84401703,41.34429932),"
Central Elementary School
400 Clinton St
Ottawa, IL 61350

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'Ottawa=' + Ottawa.length); Seneca[Seneca.length] = createMarker(new GPoint(-88.60619354,41.31399155),"
Circuit Breaker School
226 E Scott St
Seneca, IL 61360

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Circuit Breaker School",'Seneca=' + Seneca.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.96661377,41.27318573),"
Deer Park C C Elementary School
2350 E 1025th Rd
Ottawa, IL 61350

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Deer Park C C Elementary School",'Ottawa=' + Ottawa.length); La_Salle[La_Salle.length] = createMarker(new GPoint(-89.10736847,41.41152573),"
Dimmick Community Consolidated School
297 N 33rd Rd
La Salle, IL 61301

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dimmick Community Consolidated School",'La_Salle=' + La_Salle.length); Earlville[Earlville.length] = createMarker(new GPoint(-88.91510010,41.59049988),"
Earlville Elementary School
Po Box 539
Earlville, IL 60518

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Earlville Elementary School",'Earlville=' + Earlville.length); Earlville[Earlville.length] = createMarker(new GPoint(-88.91510010,41.59049988),"
Earlville High School
P O Box 539
Earlville, IL 60518

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Earlville High School",'Earlville=' + Earlville.length); Grand_Ridge[Grand_Ridge.length] = createMarker(new GPoint(-88.83029938,41.23500061),"
Grand Ridge Community Consolidated School
Po Box 37
Grand Ridge, IL 61325

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Grand Ridge Community Consolidated School",'Grand_Ridge=' + Grand_Ridge.length); Earlville[Earlville.length] = createMarker(new GPoint(-88.84621429,41.51496124),"
Harding Grade School
1643 N 40th Rd
Earlville, IL 60518

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harding Grade School",'Earlville=' + Earlville.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.84117889,41.35796738),"
Jefferson Elementary School
1709 Columbus St
Ottawa, IL 61350

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Ottawa=' + Ottawa.length); Streator[Streator.length] = createMarker(new GPoint(-88.82450104,41.12054062),"
Kimes Elementary School
1207 Reading St
Streator, IL 61364

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kimes Elementary School",'Streator=' + Streator.length); La_Salle[La_Salle.length] = createMarker(new GPoint(-89.10472870,41.33227158),"
La Salle-peru Township High School
541 Chartres St
La Salle, IL 61301

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Salle-peru Township High School",'La_Salle=' + La_Salle.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.82909393,41.37346268),"
Lasalle County Detention Home
707 Etna Rd
Ottawa, IL 61350

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lasalle County Detention Home",'Ottawa=' + Ottawa.length); Lasalle[Lasalle.length] = createMarker(new GPoint(-89.09174347,41.33177948),"
Lasalle-peru Area Career Center
Sixth Creve Coeur
Lasalle, IL 61301

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lasalle-peru Area Career Center",'Lasalle=' + Lasalle.length); Leland[Leland.length] = createMarker(new GPoint(-88.79938507,41.61737823),"
Leland Elementary School
370 N Main St
Leland, IL 60531

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leland Elementary School",'Leland=' + Leland.length); Leland[Leland.length] = createMarker(new GPoint(-88.79938507,41.61737823),"
Leland High School
370 N Main St
Leland, IL 60531

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Leland High School",'Leland=' + Leland.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.85554504,41.34656143),"
Lincoln Elementary School
1110 W Main St
Ottawa, IL 61350

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Ottawa=' + Ottawa.length); Oglesby[Oglesby.length] = createMarker(new GPoint(-89.07064056,41.30632019),"
Lincoln Elementary School
755 Bennett Ave
Oglesby, IL 61348

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Oglesby=' + Oglesby.length); Mendota[Mendota.length] = createMarker(new GPoint(-89.11301422,41.54898834),"
Lincoln Elementary School
805 4th Ave
Mendota, IL 61342

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Mendota=' + Mendota.length); La_Salle[La_Salle.length] = createMarker(new GPoint(-89.09648132,41.33955002),"
Lincoln Junior High School
1165 St Vincents Ave
La Salle, IL 61301

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lincoln Junior High School",'La_Salle=' + La_Salle.length); Lostant[Lostant.length] = createMarker(new GPoint(-89.07669830,41.13970184),"
Lostant Elementary School
Po Box 320
Lostant, IL 61334

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lostant Elementary School",'Lostant=' + Lostant.length); Marseilles[Marseilles.length] = createMarker(new GPoint(-88.69781494,41.32418060),"
Marseilles Elementary School
201 Chicago St
Marseilles, IL 61341

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Marseilles Elementary School",'Marseilles=' + Marseilles.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.83951569,41.32503510),"
Mckinley Elementary School
1320 State St
Ottawa, IL 61350

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Ottawa=' + Ottawa.length); Mendota[Mendota.length] = createMarker(new GPoint(-89.12454224,41.55852127),"
Mendota Township High School
2300 W Main St
Mendota, IL 61342

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mendota Township High School",'Mendota=' + Mendota.length); Marseilles[Marseilles.length] = createMarker(new GPoint(-88.70258331,41.32493973),"
Milton Pope Elementary School
3197 E 28th Rd
Marseilles, IL 61341

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Milton Pope Elementary School",'Marseilles=' + Marseilles.length); Mendota[Mendota.length] = createMarker(new GPoint(-89.11848450,41.55995560),"
Northbrook School
1804 Guiles Ave
Mendota, IL 61342

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northbrook School",'Mendota=' + Mendota.length); Streator[Streator.length] = createMarker(new GPoint(-88.83381653,41.13555145),"
Northlawn Junior High School
202 E 1st St
Streator, IL 61364

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northlawn Junior High School",'Streator=' + Streator.length); Peru[Peru.length] = createMarker(new GPoint(-89.12454224,41.33860016),"
Northview Elementary School
1429 Shooting Pk Rd
Peru, IL 61354

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northview Elementary School",'Peru=' + Peru.length); La_Salle[La_Salle.length] = createMarker(new GPoint(-89.10168457,41.34654236),"
Northwest Elementary School
1735 Malcolm Ave
La Salle, IL 61301

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northwest Elementary School",'La_Salle=' + La_Salle.length); Streator[Streator.length] = createMarker(new GPoint(-88.82981873,41.11166000),"
Oakland Park Elementary School
701 S Sterling St
Streator, IL 61364

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakland Park Elementary School",'Streator=' + Streator.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.83932495,41.34566116),"
Ottawa Township High School
211 E Main St
Ottawa, IL 61350

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ottawa Township High School",'Ottawa=' + Ottawa.length); Streator[Streator.length] = createMarker(new GPoint(-88.83460236,41.12670135),"
Otter Creek-hyatt Elementary School
R R 1
Streator, IL 61364

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Otter Creek-hyatt Elementary School",'Streator=' + Streator.length); Peru[Peru.length] = createMarker(new GPoint(-89.12474060,41.33116150),"
Peru Washington School
1325 Park Rd
Peru, IL 61354

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Peru Washington School",'Peru=' + Peru.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.84230804,41.34666443),"
Regional Safe School
119 W Madison Rm 102
Ottawa, IL 61350

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Regional Safe School",'Ottawa=' + Ottawa.length); Peru[Peru.length] = createMarker(new GPoint(-89.13542938,41.32953644),"
Roosevelt Elementary School
2233 6th St
Peru, IL 61354

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Peru=' + Peru.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.84213257,41.34576035),"
Rutland Elementary School
3231 Il Rte 71 E
Ottawa, IL 61350

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rutland Elementary School",'Ottawa=' + Ottawa.length); Seneca[Seneca.length] = createMarker(new GPoint(-88.60781860,41.30947876),"
Seneca Elementary School South Campus
174 Oak St
Seneca, IL 61360

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Seneca Elementary School South Campus",'Seneca=' + Seneca.length); Seneca[Seneca.length] = createMarker(new GPoint(-88.60781860,41.30947876),"
Seneca Grade School
174 Oak St
Seneca, IL 61360

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Seneca Grade School",'Seneca=' + Seneca.length); Seneca[Seneca.length] = createMarker(new GPoint(-88.61840057,41.32109833),"
Seneca High School
Po Box 20
Seneca, IL 61360

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seneca High School",'Seneca=' + Seneca.length); Serena[Serena.length] = createMarker(new GPoint(-88.73194122,41.48699951),"
Serena Elementary School
2283 N 3812 Rd
Serena, IL 60549

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Serena Elementary School",'Serena=' + Serena.length); Serena[Serena.length] = createMarker(new GPoint(-88.74040222,41.48649979),"
Serena High School
Po Box 107
Serena, IL 60549

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Serena High School",'Serena=' + Serena.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.82996368,41.32436371),"
Shepherd Middle School
701 E Mckinley Rd
Ottawa, IL 61350

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Shepherd Middle School",'Ottawa=' + Ottawa.length); Sheridan[Sheridan.length] = createMarker(new GPoint(-88.68013400,41.53079000),"
Sheridan Correctional Center
Po Box 38
Sheridan, IL 60551

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sheridan Correctional Center",'Sheridan=' + Sheridan.length); Sheridan[Sheridan.length] = createMarker(new GPoint(-88.67989349,41.52986145),"
Sheridan Elementary School
115 E Si Johnson Av
Sheridan, IL 60551

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sheridan Elementary School",'Sheridan=' + Sheridan.length); Streator[Streator.length] = createMarker(new GPoint(-88.81906128,41.12323761),"
Sherman Elementary School
1206 E Elm St
Streator, IL 61364

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sherman Elementary School",'Streator=' + Streator.length); Streator[Streator.length] = createMarker(new GPoint(-88.83857727,41.12623978),"
Streator Township High School
600 N Jefferson St
Streator, IL 61364

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Streator Township High School",'Streator=' + Streator.length); Tonica[Tonica.length] = createMarker(new GPoint(-89.05742645,41.22054291),"
Tonica Grade School
535 N 1981st Rd
Tonica, IL 61370

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tonica Grade School",'Tonica=' + Tonica.length); Utica[Utica.length] = createMarker(new GPoint(-89.00859833,41.36140060),"
Utica Elementary School
Po Box 430
Utica, IL 61373

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Utica Elementary School",'Utica=' + Utica.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-88.88132477,41.41164017),"
Wallace Elementary School
1463 N 33rd Rd
Ottawa, IL 61350

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wallace Elementary School",'Ottawa=' + Ottawa.length); Utica[Utica.length] = createMarker(new GPoint(-88.98239136,41.41106415),"
Waltham Elementary School
946 N 33rd Rd
Utica, IL 61373

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Waltham Elementary School",'Utica=' + Utica.length); Oglesby[Oglesby.length] = createMarker(new GPoint(-89.06282043,41.29523849),"
Washington Elementary School
212 W Walnut St
Oglesby, IL 61348

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Oglesby=' + Oglesby.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(Earlville); map.removeOverlays(Grand_Ridge); map.removeOverlays(La_Salle); map.removeOverlays(Lasalle); map.removeOverlays(Leland); map.removeOverlays(Lostant); map.removeOverlays(Marseilles); map.removeOverlays(Mendota); map.removeOverlays(Oglesby); map.removeOverlays(Ottawa); map.removeOverlays(Peru); map.removeOverlays(Ransom); map.removeOverlays(Seneca); map.removeOverlays(Serena); map.removeOverlays(Sheridan); map.removeOverlays(Streator); map.removeOverlays(Tonica); map.removeOverlays(Utica); 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(Ransom);map.removeOverlays(Earlville); map.removeOverlays(Grand_Ridge); map.removeOverlays(La_Salle); map.removeOverlays(Lasalle); map.removeOverlays(Leland); map.removeOverlays(Lostant); map.removeOverlays(Marseilles); map.removeOverlays(Mendota); map.removeOverlays(Oglesby); map.removeOverlays(Ottawa); map.removeOverlays(Peru); map.removeOverlays(Ransom); map.removeOverlays(Seneca); map.removeOverlays(Serena); map.removeOverlays(Sheridan); map.removeOverlays(Streator); map.removeOverlays(Tonica); map.removeOverlays(Utica); map.addOverlays(Earlville); centerByArray(Earlville, false, false); cntMarker += Earlville.length; map.addOverlays(Grand_Ridge); centerByArray(Grand_Ridge, false, false); cntMarker += Grand_Ridge.length; map.addOverlays(La_Salle); centerByArray(La_Salle, false, false); cntMarker += La_Salle.length; map.addOverlays(Lasalle); centerByArray(Lasalle, false, false); cntMarker += Lasalle.length; map.addOverlays(Leland); centerByArray(Leland, false, false); cntMarker += Leland.length; map.addOverlays(Lostant); centerByArray(Lostant, false, false); cntMarker += Lostant.length; map.addOverlays(Marseilles); centerByArray(Marseilles, false, false); cntMarker += Marseilles.length; map.addOverlays(Mendota); centerByArray(Mendota, false, false); cntMarker += Mendota.length; map.addOverlays(Oglesby); centerByArray(Oglesby, false, false); cntMarker += Oglesby.length; map.addOverlays(Ottawa); centerByArray(Ottawa, false, false); cntMarker += Ottawa.length; map.addOverlays(Peru); centerByArray(Peru, false, false); cntMarker += Peru.length; map.addOverlays(Ransom); centerByArray(Ransom, false, false); cntMarker += Ransom.length; map.addOverlays(Seneca); centerByArray(Seneca, false, false); cntMarker += Seneca.length; map.addOverlays(Serena); centerByArray(Serena, false, false); cntMarker += Serena.length; map.addOverlays(Sheridan); centerByArray(Sheridan, false, false); cntMarker += Sheridan.length; map.addOverlays(Streator); centerByArray(Streator, false, false); cntMarker += Streator.length; map.addOverlays(Tonica); centerByArray(Tonica, false, false); cntMarker += Tonica.length; map.addOverlays(Utica); centerByArray(Utica, false, false); cntMarker += Utica.length; centerByArray(Ransom,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'); } }