function addMarkers(){ mySelect = document.getElementById('selection'); White_Plains = [];New_Rochelle = [];Ossining = [];Yonkers = [];Briarcliff_Manor = [];Mount_Vernon = [];Mamaroneck = [];Tarrytown = [];Katonah = [];Lincolndale = [];Somers = [];Mount_Kisco = [];Purchase = [];Hartsdale = [];Dobbs_Ferry = [];Peekskill = [];Bedford = [];Rye = [];Yorktown_Heights = [];North_Salem = [];Bedford_Hills = [];Mt_Kisco = [];mySelect.options[mySelect.options.length] = new Option("Bedford schools",'all=Bedford'); mySelect.options[mySelect.options.length] = new Option("Bedford Hills schools",'all=Bedford_Hills'); mySelect.options[mySelect.options.length] = new Option("Briarcliff Manor schools",'all=Briarcliff_Manor'); mySelect.options[mySelect.options.length] = new Option("Dobbs Ferry schools",'all=Dobbs_Ferry'); mySelect.options[mySelect.options.length] = new Option("Hartsdale schools",'all=Hartsdale'); mySelect.options[mySelect.options.length] = new Option("Katonah schools",'all=Katonah'); mySelect.options[mySelect.options.length] = new Option("Lincolndale schools",'all=Lincolndale'); mySelect.options[mySelect.options.length] = new Option("Mamaroneck schools",'all=Mamaroneck'); mySelect.options[mySelect.options.length] = new Option("Mount Kisco schools",'all=Mount_Kisco'); mySelect.options[mySelect.options.length] = new Option("Mount Vernon schools",'all=Mount_Vernon'); mySelect.options[mySelect.options.length] = new Option("Mt Kisco schools",'all=Mt_Kisco'); mySelect.options[mySelect.options.length] = new Option("New Rochelle schools",'all=New_Rochelle'); mySelect.options[mySelect.options.length] = new Option("North Salem schools",'all=North_Salem'); mySelect.options[mySelect.options.length] = new Option("Ossining schools",'all=Ossining'); mySelect.options[mySelect.options.length] = new Option("Peekskill schools",'all=Peekskill'); mySelect.options[mySelect.options.length] = new Option("Purchase schools",'all=Purchase'); mySelect.options[mySelect.options.length] = new Option("Rye schools",'all=Rye'); mySelect.options[mySelect.options.length] = new Option("Somers schools",'all=Somers'); mySelect.options[mySelect.options.length] = new Option("Tarrytown schools",'all=Tarrytown'); mySelect.options[mySelect.options.length] = new Option("White Plains schools",'all=White_Plains'); mySelect.options[mySelect.options.length] = new Option("Yonkers schools",'all=Yonkers'); mySelect.options[mySelect.options.length] = new Option("Yorktown Heights schools",'all=Yorktown_Heights'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); White_Plains[White_Plains.length] = createMarker(new GPoint(-73.75267000,41.00872100),"
Archbishop Stepinac High School
950 Mamaroneck Avenue
White Plains, NY 10605
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Archbishop Stepinac High School",'White_Plains=' + White_Plains.length); New_Rochelle[New_Rochelle.length] = createMarker(new GPoint(-73.78303800,40.90568100),"
Blessed Sacrament St Gabriel High School
24 Shea Place
New Rochelle, NY 10801
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blessed Sacrament St Gabriel High School",'New_Rochelle=' + New_Rochelle.length); Ossining[Ossining.length] = createMarker(new GPoint(-73.86302900,41.16758100),"
Cardinal Mccloskey School
155 N Highland Avenue
Ossining, NY 10562
Co-ed school, 4-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cardinal Mccloskey School",'Ossining=' + Ossining.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.90538500,40.91656200),"
The Carol And Frank Biondi Edu
463 Hawthorne Ave
Yonkers, NY 10705
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Carol And Frank Biondi Edu",'Yonkers=' + Yonkers.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.90538500,40.91656200),"
Carol And Frank Biondi Educati
463 Hawthorne Ave
Yonkers, NY 10705
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Carol And Frank Biondi Educati",'Yonkers=' + Yonkers.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.90140400,40.93367000),"
City Harvest Academy
44 Hudson Street
Yonkers, NY 10701
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("City Harvest Academy",'Yonkers=' + Yonkers.length); Briarcliff_Manor[Briarcliff_Manor.length] = createMarker(new GPoint(-73.86184700,41.12846400),"
Clearview School Day Treatment
550 Albany Post Road
Briarcliff Manor, NY 10510
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clearview School Day Treatment",'Briarcliff_Manor=' + Briarcliff_Manor.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.86676700,40.97363200),"
Ferncliff Manor
1154 Saw Mill River Road
Yonkers, NY 10710
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ferncliff Manor",'Yonkers=' + Yonkers.length); Mount_Vernon[Mount_Vernon.length] = createMarker(new GPoint(-73.84261700,40.91366500),"
Fortress Christian Academy
51 North 10th Avenue
Mount Vernon, NY 10550
Co-ed school, K-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fortress Christian Academy",'Mount_Vernon=' + Mount_Vernon.length); Mamaroneck[Mamaroneck.length] = createMarker(new GPoint(-73.75080000,40.92697700),"
French American School Of New York (fasny)
145 New Street
Mamaroneck, NY 10543
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("French American School Of New York (fasny)",'Mamaroneck=' + Mamaroneck.length); White_Plains[White_Plains.length] = createMarker(new GPoint(-73.73386600,41.01401600),"
German School New York
50 Partridge Road
White Plains, NY 10605
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("German School New York",'White_Plains=' + White_Plains.length); Tarrytown[Tarrytown.length] = createMarker(new GPoint(-73.84629800,41.06867100),"
Hackley School
293 Benedict Avenue
Tarrytown, NY 10591
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hackley School",'Tarrytown=' + Tarrytown.length); New_Rochelle[New_Rochelle.length] = createMarker(new GPoint(-73.78377400,40.90693800),"
The Hallen School
97 Centre Avenue
New Rochelle, NY 10801
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Hallen School",'New_Rochelle=' + New_Rochelle.length); Katonah[Katonah.length] = createMarker(new GPoint(-73.66663600,41.25489700),"
The Harvey School
260 Jay Street
Katonah, NY 10536
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Harvey School",'Katonah=' + Katonah.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.89197400,40.95390100),"
Hudson View Christian Academy
170 Hudson Terrace
Yonkers, NY 10701
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hudson View Christian Academy",'Yonkers=' + Yonkers.length); New_Rochelle[New_Rochelle.length] = createMarker(new GPoint(-73.79576200,40.96265000),"
Iona Preparatory School
255 Wilmot Road
New Rochelle, NY 10804
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Iona Preparatory School",'New_Rochelle=' + New_Rochelle.length); Lincolndale[Lincolndale.length] = createMarker(new GPoint(-73.72510000,41.31730000),"
Ives School
Po Box 600
Lincolndale, NY 10540
All-boys school, 7-11
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ives School",'Lincolndale=' + Lincolndale.length); Somers[Somers.length] = createMarker(new GPoint(-73.68687300,41.30108600),"
John F Kennedy Catholic High School
54 Route 138
Somers, NY 10589
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("John F Kennedy Catholic High School",'Somers=' + Somers.length); Mount_Kisco[Mount_Kisco.length] = createMarker(new GPoint(-73.73001900,41.20455000),"
The Karafin School Inc
Po Box 277
Mount Kisco, NY 10549
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Karafin School Inc",'Mount_Kisco=' + Mount_Kisco.length); Purchase[Purchase.length] = createMarker(new GPoint(-73.71889900,41.02857600),"
Keio Academy Of New York
3 College Road
Purchase, NY 10577
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Keio Academy Of New York",'Purchase=' + Purchase.length); Hartsdale[Hartsdale.length] = createMarker(new GPoint(-73.80924400,41.03269900),"
Maria Regina High School
500 W Hartsdale Avenue
Hartsdale, NY 10530
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Maria Regina High School",'Hartsdale=' + Hartsdale.length); Dobbs_Ferry[Dobbs_Ferry.length] = createMarker(new GPoint(-73.87160900,41.01269400),"
The Masters School
49 Clinton Avenue
Dobbs Ferry, NY 10522
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Masters School",'Dobbs_Ferry=' + Dobbs_Ferry.length); New_Rochelle[New_Rochelle.length] = createMarker(new GPoint(-73.79350400,40.92315300),"
New Testament Church School
138 Mayflower Avenue
New Rochelle, NY 10801
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Testament Church School",'New_Rochelle=' + New_Rochelle.length); White_Plains[White_Plains.length] = createMarker(new GPoint(-73.79857200,41.05379900),"
Ny School For The Deaf
555 Knollwood Road
White Plains, NY 10603
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ny School For The Deaf",'White_Plains=' + White_Plains.length); Peekskill[Peekskill.length] = createMarker(new GPoint(-73.91620000,41.28890000),"
Ohr Hameir Seminary - Tifereth Israel High School
Furnace Woods Road
Peekskill, NY 10566
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ohr Hameir Seminary - Tifereth Israel High School",'Peekskill=' + Peekskill.length); Dobbs_Ferry[Dobbs_Ferry.length] = createMarker(new GPoint(-73.86998100,41.02042200),"
Our Lady Of Victory Academy
565 Broadway
Dobbs Ferry, NY 10522
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Victory Academy",'Dobbs_Ferry=' + Dobbs_Ferry.length); Bedford[Bedford.length] = createMarker(new GPoint(-73.63698100,41.19037200),"
Rippowam Cisqua School
439 Cantitoe St Po Box 488
Bedford, NY 10506
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rippowam Cisqua School",'Bedford=' + Bedford.length); Rye[Rye.length] = createMarker(new GPoint(-73.68094800,40.98760000),"
Rye Country Day School
Cedar Street
Rye, NY 10580
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rye Country Day School",'Rye=' + Rye.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.88631600,40.94936200),"
Sacred Heart High School
34 Convent Avenue
Yonkers, NY 10703
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart High School",'Yonkers=' + Yonkers.length); New_Rochelle[New_Rochelle.length] = createMarker(new GPoint(-73.76918400,40.91677700),"
Salesian High School
148 Main Street
New Rochelle, NY 10801
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Salesian High School",'New_Rochelle=' + New_Rochelle.length); Rye[Rye.length] = createMarker(new GPoint(-73.70583000,41.01291700),"
School Of The Holy Child
2225 Westchester Avenue
Rye, NY 10580
All-girls school, 5-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("School Of The Holy Child",'Rye=' + Rye.length); Hartsdale[Hartsdale.length] = createMarker(new GPoint(-73.80895500,41.03337400),"
Solomon Schechter School of Westchester
555 West Hartsdale Avenue
Hartsdale, NY 10530
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Solomon Schechter School of Westchester",'Hartsdale=' + Hartsdale.length); Yorktown_Heights[Yorktown_Heights.length] = createMarker(new GPoint(-73.78321900,41.26853200),"
Soundview Preparatory School
370 Underhill Avenue
Yorktown Heights, NY 10598
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Soundview Preparatory School",'Yorktown_Heights=' + Yorktown_Heights.length); New_Rochelle[New_Rochelle.length] = createMarker(new GPoint(-73.78309300,40.93320200),"
Thornton-donovan School
100 Overlook Circle
New Rochelle, NY 10804
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Thornton-donovan School",'New_Rochelle=' + New_Rochelle.length); New_Rochelle[New_Rochelle.length] = createMarker(new GPoint(-73.79675300,40.94782800),"
The Ursuline School
1354 North Avenue
New Rochelle, NY 10804
All-girls school, 6-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("The Ursuline School",'New_Rochelle=' + New_Rochelle.length); Mamaroneck[Mamaroneck.length] = createMarker(new GPoint(-73.73033600,40.93416500),"
Westchester Hebrew High School
856 Orienta Avenue
Mamaroneck, NY 10543
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westchester Hebrew High School",'Mamaroneck=' + Mamaroneck.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.89213400,40.94133100),"
Westchester Sch. For Spec Children
45 Park Ave
Yonkers, NY 10703
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westchester Sch. For Spec Children",'Yonkers=' + Yonkers.length); North_Salem[North_Salem.length] = createMarker(new GPoint(-73.65664500,41.32619000),"
Westchstr Excptnl Chldrns School
520 Route 22
North Salem, NY 10560
Co-ed school, 12-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westchstr Excptnl Chldrns School",'North_Salem=' + North_Salem.length); White_Plains[White_Plains.length] = createMarker(new GPoint(-73.74054000,40.98994000),"
Windward School
13 Windward Avenue
White Plains, NY 10605
Co-ed school, 1-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Windward School",'White_Plains=' + White_Plains.length); Bedford_Hills[Bedford_Hills.length] = createMarker(new GPoint(-73.71058900,41.23708700),"
Yeshiva And Mesivta Ohel Shmuel
165 Haines Road
Bedford Hills, NY 10507
All-boys school, 7-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva And Mesivta Ohel Shmuel",'Bedford_Hills=' + Bedford_Hills.length); Mt_Kisco[Mt_Kisco.length] = createMarker(new GPoint(-73.72580000,41.20350000),"
Yeshiva Farm Settlement School
Rt 4 Box 100 Croaton Lake Rd
Mt Kisco, NY 10549
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yeshiva Farm Settlement School",'Mt_Kisco=' + Mt_Kisco.length); Yonkers[Yonkers.length] = createMarker(new GPoint(-73.89494700,40.94213900),"
Yonkers Christian Academy
229 North Broadway
Yonkers, NY 10701
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yonkers Christian Academy",'Yonkers=' + Yonkers.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,11); /* 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/////2/' + showArray); map.removeOverlays(Bedford); map.removeOverlays(Bedford_Hills); map.removeOverlays(Briarcliff_Manor); map.removeOverlays(Dobbs_Ferry); map.removeOverlays(Hartsdale); map.removeOverlays(Katonah); map.removeOverlays(Lincolndale); map.removeOverlays(Mamaroneck); map.removeOverlays(Mount_Kisco); map.removeOverlays(Mount_Vernon); map.removeOverlays(Mt_Kisco); map.removeOverlays(New_Rochelle); map.removeOverlays(North_Salem); map.removeOverlays(Ossining); map.removeOverlays(Peekskill); map.removeOverlays(Purchase); map.removeOverlays(Rye); map.removeOverlays(Somers); map.removeOverlays(Tarrytown); map.removeOverlays(White_Plains); map.removeOverlays(Yonkers); map.removeOverlays(Yorktown_Heights); 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(White_Plains);map.removeOverlays(Bedford); map.removeOverlays(Bedford_Hills); map.removeOverlays(Briarcliff_Manor); map.removeOverlays(Dobbs_Ferry); map.removeOverlays(Hartsdale); map.removeOverlays(Katonah); map.removeOverlays(Lincolndale); map.removeOverlays(Mamaroneck); map.removeOverlays(Mount_Kisco); map.removeOverlays(Mount_Vernon); map.removeOverlays(Mt_Kisco); map.removeOverlays(New_Rochelle); map.removeOverlays(North_Salem); map.removeOverlays(Ossining); map.removeOverlays(Peekskill); map.removeOverlays(Purchase); map.removeOverlays(Rye); map.removeOverlays(Somers); map.removeOverlays(Tarrytown); map.removeOverlays(White_Plains); map.removeOverlays(Yonkers); map.removeOverlays(Yorktown_Heights); map.addOverlays(Bedford); centerByArray(Bedford, false, false); cntMarker += Bedford.length; map.addOverlays(Bedford_Hills); centerByArray(Bedford_Hills, false, false); cntMarker += Bedford_Hills.length; map.addOverlays(Briarcliff_Manor); centerByArray(Briarcliff_Manor, false, false); cntMarker += Briarcliff_Manor.length; map.addOverlays(Dobbs_Ferry); centerByArray(Dobbs_Ferry, false, false); cntMarker += Dobbs_Ferry.length; map.addOverlays(Hartsdale); centerByArray(Hartsdale, false, false); cntMarker += Hartsdale.length; map.addOverlays(Katonah); centerByArray(Katonah, false, false); cntMarker += Katonah.length; map.addOverlays(Lincolndale); centerByArray(Lincolndale, false, false); cntMarker += Lincolndale.length; map.addOverlays(Mamaroneck); centerByArray(Mamaroneck, false, false); cntMarker += Mamaroneck.length; map.addOverlays(Mount_Kisco); centerByArray(Mount_Kisco, false, false); cntMarker += Mount_Kisco.length; map.addOverlays(Mount_Vernon); centerByArray(Mount_Vernon, false, false); cntMarker += Mount_Vernon.length; map.addOverlays(Mt_Kisco); centerByArray(Mt_Kisco, false, false); cntMarker += Mt_Kisco.length; map.addOverlays(New_Rochelle); centerByArray(New_Rochelle, false, false); cntMarker += New_Rochelle.length; map.addOverlays(North_Salem); centerByArray(North_Salem, false, false); cntMarker += North_Salem.length; map.addOverlays(Ossining); centerByArray(Ossining, false, false); cntMarker += Ossining.length; map.addOverlays(Peekskill); centerByArray(Peekskill, false, false); cntMarker += Peekskill.length; map.addOverlays(Purchase); centerByArray(Purchase, false, false); cntMarker += Purchase.length; map.addOverlays(Rye); centerByArray(Rye, false, false); cntMarker += Rye.length; map.addOverlays(Somers); centerByArray(Somers, false, false); cntMarker += Somers.length; map.addOverlays(Tarrytown); centerByArray(Tarrytown, false, false); cntMarker += Tarrytown.length; map.addOverlays(White_Plains); centerByArray(White_Plains, false, false); cntMarker += White_Plains.length; map.addOverlays(Yonkers); centerByArray(Yonkers, false, false); cntMarker += Yonkers.length; map.addOverlays(Yorktown_Heights); centerByArray(Yorktown_Heights, false, false); cntMarker += Yorktown_Heights.length; centerByArray(White_Plains,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'); //window.open('/map.php?type=1&schools=&school_level=2&radius=&zipcode=&school_type_search=&school_type_code='); } } function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }