function addMarkers() { mySelect = document.getElementById('selection'); Mars = [];Butler = [];Bruin = [];Sarver = [];Chicora = [];Fenelton = [];Saxonburg = [];Renfrew = [];Zelienople = [];West_Sunbury = [];Evans_City = [];Cranberry_Twp = [];Harrisville = [];Karns_City = [];Valencia = [];Prospect = [];Harmony = [];Slippery_Rock = [];Parker = [];Cabot = [];mySelect.options[mySelect.options.length] = new Option("Bruin schools",'all=Bruin'); mySelect.options[mySelect.options.length] = new Option("Butler schools",'all=Butler'); mySelect.options[mySelect.options.length] = new Option("Cabot schools",'all=Cabot'); mySelect.options[mySelect.options.length] = new Option("Chicora schools",'all=Chicora'); mySelect.options[mySelect.options.length] = new Option("Cranberry Twp schools",'all=Cranberry_Twp'); mySelect.options[mySelect.options.length] = new Option("Evans City schools",'all=Evans_City'); mySelect.options[mySelect.options.length] = new Option("Fenelton schools",'all=Fenelton'); mySelect.options[mySelect.options.length] = new Option("Harmony schools",'all=Harmony'); mySelect.options[mySelect.options.length] = new Option("Harrisville schools",'all=Harrisville'); mySelect.options[mySelect.options.length] = new Option("Karns City schools",'all=Karns_City'); mySelect.options[mySelect.options.length] = new Option("Mars schools",'all=Mars'); mySelect.options[mySelect.options.length] = new Option("Parker schools",'all=Parker'); mySelect.options[mySelect.options.length] = new Option("Prospect schools",'all=Prospect'); mySelect.options[mySelect.options.length] = new Option("Renfrew schools",'all=Renfrew'); mySelect.options[mySelect.options.length] = new Option("Sarver schools",'all=Sarver'); mySelect.options[mySelect.options.length] = new Option("Saxonburg schools",'all=Saxonburg'); mySelect.options[mySelect.options.length] = new Option("Slippery Rock schools",'all=Slippery_Rock'); mySelect.options[mySelect.options.length] = new Option("Valencia schools",'all=Valencia'); mySelect.options[mySelect.options.length] = new Option("West Sunbury schools",'all=West_Sunbury'); mySelect.options[mySelect.options.length] = new Option("Zelienople schools",'all=Zelienople'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Mars[Mars.length] = createMarker(new GPoint(-79.98615265,40.69413757),"
Adams Elementary School
549 Route 228
Mars, PA 16046

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Adams Elementary School",'Mars=' + Mars.length); Butler[Butler.length] = createMarker(new GPoint(-79.90229034,40.86252594),"
Broad St School
200 Broad St
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Broad St School",'Butler=' + Butler.length); Bruin[Bruin.length] = createMarker(new GPoint(-79.72638702,41.06092834),"
Bruin Elementary School
139 School St
Bruin, PA 16022

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bruin Elementary School",'Bruin=' + Bruin.length); Sarver[Sarver.length] = createMarker(new GPoint(-79.75561523,40.72296143),"
Buffalo Elementary School
500 Sarver Rd
Sarver, PA 16055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Buffalo Elementary School",'Sarver=' + Sarver.length); Butler[Butler.length] = createMarker(new GPoint(-79.91587067,40.86091232),"
Butler Area Ihs
551 Fairground Hill Rd
Butler, PA 16001

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Butler Area Ihs",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.89344025,40.86230087),"
Butler Area Junior High School
East North Street
Butler, PA 16001

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Butler Area Junior High School",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.91978455,40.86598206),"
Butler Area Senior High School
120 Campus Ln
Butler, PA 16001

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Butler Area Senior High School",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.91648102,40.86396027),"
Butler County Avts
210 Campus Ln
Butler, PA 16001

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Butler County Avts",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.88839722,40.85490036),"
Center Avenue School
Center At Lincoln
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center Avenue School",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.92897034,40.90574265),"
Center Township School
950 Mercer Rd
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center Township School",'Butler=' + Butler.length); Chicora[Chicora.length] = createMarker(new GPoint(-79.73851013,40.95095062),"
Chicora Elementary School
205 Kittanning Street
Chicora, PA 16025

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chicora Elementary School",'Chicora=' + Chicora.length); Fenelton[Fenelton.length] = createMarker(new GPoint(-79.72829437,40.85535431),"
Clearfield Elementary School
621 Clearfield Rd
Fenelton, PA 16034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clearfield Elementary School",'Fenelton=' + Fenelton.length); Saxonburg[Saxonburg.length] = createMarker(new GPoint(-79.84139252,40.72077942),"
Clinton Elementary School
100 Deer Creek Road
Saxonburg, PA 16056

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clinton Elementary School",'Saxonburg=' + Saxonburg.length); Renfrew[Renfrew.length] = createMarker(new GPoint(-80.01133728,40.82396317),"
Connoquenessing Elementary School
102 Connoquenessing School Rd
Renfrew, PA 16053

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Connoquenessing Elementary School",'Renfrew=' + Renfrew.length); Zelienople[Zelienople.length] = createMarker(new GPoint(-80.12759399,40.79338455),"
Connoquenessing Valley Elementary School
300 Pittsburgh St
Zelienople, PA 16063

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Connoquenessing Valley Elementary School",'Zelienople=' + Zelienople.length); West_Sunbury[West_Sunbury.length] = createMarker(new GPoint(-79.88114929,41.00044250),"
Dassa Mckinney Elementary School
391 Hooker Rd
West Sunbury, PA 16061

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dassa Mckinney Elementary School",'West_Sunbury=' + West_Sunbury.length); Butler[Butler.length] = createMarker(new GPoint(-79.89707947,40.86463928),"
Emily Brittain Elementary School
338 N Washington St
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Emily Brittain Elementary School",'Butler=' + Butler.length); Evans_City[Evans_City.length] = createMarker(new GPoint(-80.06900024,40.76974869),"
Evans City Elementary School
345 W Main St
Evans City, PA 16033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Evans City Elementary School",'Evans_City=' + Evans_City.length); Evans_City[Evans_City.length] = createMarker(new GPoint(-80.06900024,40.76974869),"
Evans City Middle School
345 W Main St
Evans City, PA 16033

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Evans City Middle School",'Evans_City=' + Evans_City.length); Cranberry_Twp[Cranberry_Twp.length] = createMarker(new GPoint(-80.12599945,40.69533539),"
Haine Elementary School
1516 Haine School Rd
Cranberry Twp, PA 16066

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Haine Elementary School",'Cranberry_Twp=' + Cranberry_Twp.length); Cranberry_Twp[Cranberry_Twp.length] = createMarker(new GPoint(-79.71043396,41.34944153),"
Haine Middle School
1516 Haine School Road
Cranberry Twp, PA 16066

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Haine Middle School",'Cranberry_Twp=' + Cranberry_Twp.length); Harrisville[Harrisville.length] = createMarker(new GPoint(-80.00933838,41.13570023),"
Har-mer Elementary School
220 Prairie Street
Harrisville, PA 16038

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Har-mer Elementary School",'Harrisville=' + Harrisville.length); Butler[Butler.length] = createMarker(new GPoint(-79.84975433,40.80187225),"
Jefferson Elementary School
650 Saxonburg Rd
Butler, PA 16002

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Butler=' + Butler.length); Karns_City[Karns_City.length] = createMarker(new GPoint(-79.72589111,40.98765945),"
Karns City High School
1446 Kittanning Pike
Karns City, PA 16041

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Karns City High School",'Karns_City=' + Karns_City.length); Saxonburg[Saxonburg.length] = createMarker(new GPoint(-79.82768250,40.74686813),"
Knoch High School
345 Knoch Rd
Saxonburg, PA 16056

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Knoch High School",'Saxonburg=' + Saxonburg.length); Saxonburg[Saxonburg.length] = createMarker(new GPoint(-79.83300018,40.75126266),"
Knoch Middle School
754 Dinnerbell Rd
Saxonburg, PA 16056

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Knoch Middle School",'Saxonburg=' + Saxonburg.length); Mars[Mars.length] = createMarker(new GPoint(-79.97697449,40.69676971),"
Mars Area Middle School
1775 Three Degree Rd
Mars, PA 16046

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mars Area Middle School",'Mars=' + Mars.length); Mars[Mars.length] = createMarker(new GPoint(-79.98148346,40.69279480),"
Mars Area Senior High School
520 Route 228
Mars, PA 16046

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mars Area Senior High School",'Mars=' + Mars.length); Mars[Mars.length] = createMarker(new GPoint(-79.98651886,40.69413757),"
Mars Primary Center
547 Route 228
Mars, PA 16046

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mars Primary Center",'Mars=' + Mars.length); Butler[Butler.length] = createMarker(new GPoint(-79.88896179,40.84487915),"
Mcquistion Elementary School
210 Mechling Drive
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcquistion Elementary School",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.96161652,40.85121918),"
Meridian School
135 Sparks Avenue
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meridian School",'Butler=' + Butler.length); Valencia[Valencia.length] = createMarker(new GPoint(-79.92837524,40.71342087),"
Middlesex Elementary School
116 Browns Hill Rd
Valencia, PA 16059

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Middlesex Elementary School",'Valencia=' + Valencia.length); West_Sunbury[West_Sunbury.length] = createMarker(new GPoint(-79.90087891,41.05831146),"
Moniteau Junior Senior High School
1810 W Sunbury Rd
West Sunbury, PA 16061

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Moniteau Junior Senior High School",'West_Sunbury=' + West_Sunbury.length); Prospect[Prospect.length] = createMarker(new GPoint(-80.04326630,40.90456390),"
Moraine Elementary School
350 Main St
Prospect, PA 16052

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Moraine Elementary School",'Prospect=' + Prospect.length); Butler[Butler.length] = createMarker(new GPoint(-79.93817139,40.86979675),"
Northwest School
124 Staley Ave
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northwest School",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.81873322,40.90220261),"
Oakland Township School
545 Chicora Rd
Butler, PA 16001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakland Township School",'Butler=' + Butler.length); Butler[Butler.length] = createMarker(new GPoint(-79.93710327,40.77997208),"
Penn Elementary School
199 Airport Rd
Butler, PA 16002

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Penn Elementary School",'Butler=' + Butler.length); Cranberry_Twp[Cranberry_Twp.length] = createMarker(new GPoint(-80.09606934,40.70405960),"
Rowan Elementary School
8051 Rowan Rd
Cranberry Twp, PA 16066

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rowan Elementary School",'Cranberry_Twp=' + Cranberry_Twp.length); Harmony[Harmony.length] = createMarker(new GPoint(-80.10710144,40.80948639),"
Seneca Valley Ihs
126 Seneca School Rd
Harmony, PA 16037

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seneca Valley Ihs",'Harmony=' + Harmony.length); Harmony[Harmony.length] = createMarker(new GPoint(-80.10739899,40.80963898),"
Seneca Valley Middle School
128 Seneca School Rd
Harmony, PA 16037

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Seneca Valley Middle School",'Harmony=' + Harmony.length); Harmony[Harmony.length] = createMarker(new GPoint(-80.12788600,40.79964200),"
Seneca Valley MiddleSchool
122 Seneca School Rd
Harmony, PA 16037

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Seneca Valley MiddleSchool",'Harmony=' + Harmony.length); Harmony[Harmony.length] = createMarker(new GPoint(-80.10694885,40.80941391),"
Seneca Valley Senior High School
128 Seneca School Rd
Harmony, PA 16037

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seneca Valley Senior High School",'Harmony=' + Harmony.length); Slippery_Rock[Slippery_Rock.length] = createMarker(new GPoint(-80.06451416,41.07089615),"
Slippery Rock Area Elementary School
470 N Main St
Slippery Rock, PA 16057

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Slippery Rock Area Elementary School",'Slippery_Rock=' + Slippery_Rock.length); Slippery_Rock[Slippery_Rock.length] = createMarker(new GPoint(-80.04304504,41.05866241),"
Slippery Rock Area High School
201 Kiester Rd
Slippery Rock, PA 16057

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Slippery Rock Area High School",'Slippery_Rock=' + Slippery_Rock.length); Slippery_Rock[Slippery_Rock.length] = createMarker(new GPoint(-80.04304504,41.05866241),"
Slippery Rock Area Middle School
201 Kiester Rd
Slippery Rock, PA 16057

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Slippery Rock Area Middle School",'Slippery_Rock=' + Slippery_Rock.length); Saxonburg[Saxonburg.length] = createMarker(new GPoint(-79.82737732,40.74645996),"
South Butler Intermediate El S
340 Knoch Road
Saxonburg, PA 16056

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("South Butler Intermediate El S",'Saxonburg=' + Saxonburg.length); Saxonburg[Saxonburg.length] = createMarker(new GPoint(-79.82750702,40.74554825),"
South Butler Primary School
328 Knoch Road
Saxonburg, PA 16056

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Butler Primary School",'Saxonburg=' + Saxonburg.length); Butler[Butler.length] = createMarker(new GPoint(-79.82836914,40.84033966),"
Summit Elementary School
351 Brinker Rd
Butler, PA 16002

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Summit Elementary School",'Butler=' + Butler.length); Parker[Parker.length] = createMarker(new GPoint(-79.79139709,41.09138870),"
Washington Elementary School
2780 Oneida Valley Rd
Parker, PA 16049

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Parker=' + Parker.length); Cabot[Cabot.length] = createMarker(new GPoint(-79.75746155,40.77463531),"
Winfield Elementary School
707 Winfield Rd
Cabot, PA 16023

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Winfield Elementary School",'Cabot=' + Cabot.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(Bruin); map.removeOverlays(Butler); map.removeOverlays(Cabot); map.removeOverlays(Chicora); map.removeOverlays(Cranberry_Twp); map.removeOverlays(Evans_City); map.removeOverlays(Fenelton); map.removeOverlays(Harmony); map.removeOverlays(Harrisville); map.removeOverlays(Karns_City); map.removeOverlays(Mars); map.removeOverlays(Parker); map.removeOverlays(Prospect); map.removeOverlays(Renfrew); map.removeOverlays(Sarver); map.removeOverlays(Saxonburg); map.removeOverlays(Slippery_Rock); map.removeOverlays(Valencia); map.removeOverlays(West_Sunbury); map.removeOverlays(Zelienople); 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(Mars);map.removeOverlays(Bruin); map.removeOverlays(Butler); map.removeOverlays(Cabot); map.removeOverlays(Chicora); map.removeOverlays(Cranberry_Twp); map.removeOverlays(Evans_City); map.removeOverlays(Fenelton); map.removeOverlays(Harmony); map.removeOverlays(Harrisville); map.removeOverlays(Karns_City); map.removeOverlays(Mars); map.removeOverlays(Parker); map.removeOverlays(Prospect); map.removeOverlays(Renfrew); map.removeOverlays(Sarver); map.removeOverlays(Saxonburg); map.removeOverlays(Slippery_Rock); map.removeOverlays(Valencia); map.removeOverlays(West_Sunbury); map.removeOverlays(Zelienople); map.addOverlays(Bruin); centerByArray(Bruin, false, false); cntMarker += Bruin.length; map.addOverlays(Butler); centerByArray(Butler, false, false); cntMarker += Butler.length; map.addOverlays(Cabot); centerByArray(Cabot, false, false); cntMarker += Cabot.length; map.addOverlays(Chicora); centerByArray(Chicora, false, false); cntMarker += Chicora.length; map.addOverlays(Cranberry_Twp); centerByArray(Cranberry_Twp, false, false); cntMarker += Cranberry_Twp.length; map.addOverlays(Evans_City); centerByArray(Evans_City, false, false); cntMarker += Evans_City.length; map.addOverlays(Fenelton); centerByArray(Fenelton, false, false); cntMarker += Fenelton.length; map.addOverlays(Harmony); centerByArray(Harmony, false, false); cntMarker += Harmony.length; map.addOverlays(Harrisville); centerByArray(Harrisville, false, false); cntMarker += Harrisville.length; map.addOverlays(Karns_City); centerByArray(Karns_City, false, false); cntMarker += Karns_City.length; map.addOverlays(Mars); centerByArray(Mars, false, false); cntMarker += Mars.length; map.addOverlays(Parker); centerByArray(Parker, false, false); cntMarker += Parker.length; map.addOverlays(Prospect); centerByArray(Prospect, false, false); cntMarker += Prospect.length; map.addOverlays(Renfrew); centerByArray(Renfrew, false, false); cntMarker += Renfrew.length; map.addOverlays(Sarver); centerByArray(Sarver, false, false); cntMarker += Sarver.length; map.addOverlays(Saxonburg); centerByArray(Saxonburg, false, false); cntMarker += Saxonburg.length; map.addOverlays(Slippery_Rock); centerByArray(Slippery_Rock, false, false); cntMarker += Slippery_Rock.length; map.addOverlays(Valencia); centerByArray(Valencia, false, false); cntMarker += Valencia.length; map.addOverlays(West_Sunbury); centerByArray(West_Sunbury, false, false); cntMarker += West_Sunbury.length; map.addOverlays(Zelienople); centerByArray(Zelienople, false, false); cntMarker += Zelienople.length; centerByArray(Mars,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'); } }