function addMarkers(){ mySelect = document.getElementById('selection'); Albany = [];Alfred = [];Amherst = [];Amityville = [];Angelica = [];Altamont = [];Astoria = [];Auburn = [];Attica = [];Albertson = [];Au_Sable_Forks = [];Amenia = [];Armonk = [];Ardsley = [];Amsterdam = [];Aquebogue = [];Aurora = [];Athol_Springs = [];Alden = [];Avon = [];mySelect.options[mySelect.options.length] = new Option("Albany schools",'all=Albany'); mySelect.options[mySelect.options.length] = new Option("Albertson schools",'all=Albertson'); mySelect.options[mySelect.options.length] = new Option("Alden schools",'all=Alden'); mySelect.options[mySelect.options.length] = new Option("Alfred schools",'all=Alfred'); mySelect.options[mySelect.options.length] = new Option("Altamont schools",'all=Altamont'); mySelect.options[mySelect.options.length] = new Option("Amenia schools",'all=Amenia'); mySelect.options[mySelect.options.length] = new Option("Amherst schools",'all=Amherst'); mySelect.options[mySelect.options.length] = new Option("Amityville schools",'all=Amityville'); mySelect.options[mySelect.options.length] = new Option("Amsterdam schools",'all=Amsterdam'); mySelect.options[mySelect.options.length] = new Option("Angelica schools",'all=Angelica'); mySelect.options[mySelect.options.length] = new Option("Aquebogue schools",'all=Aquebogue'); mySelect.options[mySelect.options.length] = new Option("Ardsley schools",'all=Ardsley'); mySelect.options[mySelect.options.length] = new Option("Armonk schools",'all=Armonk'); mySelect.options[mySelect.options.length] = new Option("Astoria schools",'all=Astoria'); mySelect.options[mySelect.options.length] = new Option("Athol Springs schools",'all=Athol_Springs'); mySelect.options[mySelect.options.length] = new Option("Attica schools",'all=Attica'); mySelect.options[mySelect.options.length] = new Option("Au Sable Forks schools",'all=Au_Sable_Forks'); mySelect.options[mySelect.options.length] = new Option("Auburn schools",'all=Auburn'); mySelect.options[mySelect.options.length] = new Option("Aurora schools",'all=Aurora'); mySelect.options[mySelect.options.length] = new Option("Avon schools",'all=Avon'); Albany[Albany.length] = createMarker(new GPoint(-73.83417500,42.65004000),"
Academy Of The Holy Names Uppe
1075 New Scotland Road
Albany, NY 12208
All-girls school, 9-12
[ View School Profile ]
",iconRd); Albany[Albany.length] = createMarker(new GPoint(-73.83367700,42.65015000),"
Academy Of The Holy Names Upper School
1075 New Scotland Road
Albany, NY 12208
All-girls school, 9-12
[ View School Profile ]
",iconRd); Albany[Albany.length] = createMarker(new GPoint(-73.78572600,42.64713800),"
The Albany Academy
135 Academy Road
Albany, NY 12208
All-boys school, PK-12
[ View School Profile ]
",iconBl); Albany[Albany.length] = createMarker(new GPoint(-73.78537200,42.64695300),"
Albany Academy For Girls
140 Academy Road
Albany, NY 12208
All-girls school, PK-12
[ View School Profile ]
",iconRd); Albany[Albany.length] = createMarker(new GPoint(-73.80633400,42.64899100),"
Albany Jcc
340 Whitehall Road
Albany, NY 12208
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Alfred[Alfred.length] = createMarker(new GPoint(-77.79058100,42.25324500),"
The Alfred Montessori Church
8 12 S. Main St.
Alfred, NY 14802
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); Amherst[Amherst.length] = createMarker(new GPoint(-78.75295900,43.06876600),"
Amherst Christian Academy
2625 Tonawanda Creek Road
Amherst, NY 14228
Co-ed school, K-12
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78206300,42.68882700),"
Bet Shraga Hebrew Academy
54 Sand Creek Road
Albany, NY 12205
Co-ed school, K-8
[ View School Profile ]
",iconGr); Amityville[Amityville.length] = createMarker(new GPoint(-73.41594700,40.70728800),"
Bethesda Sda Elementary School
76 Parkway Avenue
Amityville, NY 11701
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.77196400,42.64248400),"
Bishop Maginn High School
99 Slingerland Street
Albany, NY 12202
Co-ed school, 9-12
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78174700,42.67307800),"
Blessed Sacrament School
605 Central Avenue
Albany, NY 12206
Co-ed school, NS-8
[ View School Profile ]
",iconGr); Amherst[Amherst.length] = createMarker(new GPoint(-78.80721300,42.96223700),"
Buffalo Academy Of The Sacred Heart
3860 Main Street
Amherst, NY 14226
All-girls school, 9-12
[ View School Profile ]
",iconRd); Angelica[Angelica.length] = createMarker(new GPoint(-78.01425400,42.30548300),"
Centerpoint Christian Academy
21 E Main Street
Angelica, NY 14709
Co-ed school, K-6
[ View School Profile ]
",iconGr); Amherst[Amherst.length] = createMarker(new GPoint(-78.77433500,42.96020000),"
Christ The King Elementary School
2 Lamarck Drive
Amherst, NY 14226
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.83520000,42.68050000),"
Christ The King Elementary School
20 Sumpter Avenue
Albany, NY 12203
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.81873900,42.73692200),"
Christian Brothers Academy
12 Airline Drive
Albany, NY 12205
All-boys school, 6-12
[ View School Profile ]
",iconBl); Altamont[Altamont.length] = createMarker(new GPoint(-74.01870000,42.70090000),"
Cobb Memorial School
100-300 Mt. Presentation Way, Po Box 503
Altamont, NY 12009
Co-ed school, 1-7
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.81376100,42.70071400),"
Colony Christian Academy
1 Van Buren Avenue
Albany, NY 12205
Co-ed school, K-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.76700800,42.62864000),"
Doane Stuart School
799 S Pearl St
Albany, NY 12202
Co-ed school, NS-12
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.91355900,40.75345000),"
El-ber Islamic School
2542 49th Street
Astoria, NY 11103
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-76.58201500,42.93495500),"
Eliakim Christian Academy
99 Wall Street
Auburn, NY 13021
Co-ed school, NS-12
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.75737400,42.64573500),"
The Free School
8 Elm Street
Albany, NY 12202
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Attica[Attica.length] = createMarker(new GPoint(-78.27478800,42.86585000),"
Genesee-wyoming Catholic Central School
72 East Avenue
Attica, NY 14011
Co-ed school, K-8
[ View School Profile ]
",iconGr); Albertson[Albertson.length] = createMarker(new GPoint(-73.64111500,40.77124900),"
Henry Viscardi School
201 I U Willets Rd
Albertson, NY 11507
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-76.54181400,42.97775200),"
Hillside Childrens Center-finger Lakes
7432 County House Road
Auburn, NY 13021
Co-ed school, 5-12
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.80535400,42.67165000),"
Holy Cross Elementary School
10 Rosemont Street
Albany, NY 12203
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Au_Sable_Forks[Au_Sable_Forks.length] = createMarker(new GPoint(-73.71820000,44.46000000),"
Holy Name Elementary School
Po Box 658 5 Pleasant Street
Au Sable Forks, NY 12912
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.91870700,40.76932900),"
Ideal Islamic School
3121 12th Street
Astoria, NY 11106
Co-ed school, PK-7
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.91073000,40.77742800),"
Immaculate Conception School
2163 29th Street
Astoria, NY 11105
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Amherst[Amherst.length] = createMarker(new GPoint(-78.78209400,43.01528800),"
Jewish Heritage Day School Of Buffalo
411 J J Audubon Parkway
Amherst, NY 14228
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Amherst[Amherst.length] = createMarker(new GPoint(-78.79191300,42.98013700),"
Kadimah School Of Buffalo
1085 Eggert Road
Amherst, NY 14226
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.80619300,42.65489200),"
Kevin G Langan School
314 So Manning Blvd
Albany, NY 12208
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); Amenia[Amenia.length] = createMarker(new GPoint(-73.55782000,41.89139300),"
The Kildonan School
425 Morse Hill Road
Amenia, NY 12501
Co-ed school, 2-12
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78529000,42.66458400),"
Lasalle School
391 Western Avenue
Albany, NY 12203
All-boys school, 7-12
[ View School Profile ]
",iconBl); Astoria[Astoria.length] = createMarker(new GPoint(-73.92180300,40.76906000),"
Les Enfants Montessori School
2921 Newtown Avenue
Astoria, NY 11102
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Armonk[Armonk.length] = createMarker(new GPoint(-73.69131200,41.12734400),"
Little Sparrows Nursery School And Kindergarten
448 Bedford Road
Armonk, NY 10504
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Ardsley[Ardsley.length] = createMarker(new GPoint(-73.83687500,41.00541800),"
Lyceum Kennedy French International School
One Cross Road
Ardsley, NY 10502
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78949800,42.65701400),"
Maimonides Hebrew Day School
Po Box 8806
Albany, NY 12208
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Amenia[Amenia.length] = createMarker(new GPoint(-73.54671400,41.86560500),"
Maplebrook School
5142 Route 22
Amenia, NY 12501
Co-ed school, 6-12
[ View School Profile ]
",iconGr); Amenia[Amenia.length] = createMarker(new GPoint(-73.54606200,41.86614200),"
The Maplebrook School
5142 Route 22
Amenia, NY 12501
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.80759200,42.65875900),"
Maria College Campus School
700 New Scotland Avenue
Albany, NY 12208
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Amherst[Amherst.length] = createMarker(new GPoint(-78.80371100,42.95780800),"
Martin Luther Chrn School
1085 Eggert Road
Amherst, NY 14226
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.91194900,40.76356000),"
Mi Nuevo Mundo Children Education Center
Po Box 3203
Astoria, NY 11103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Armonk[Armonk.length] = createMarker(new GPoint(-73.71859800,41.11877900),"
Montessori Childrens Room
67 Old Route 22
Armonk, NY 10504
Co-ed school, K-K
[ View School Profile ]
",iconGr); Amsterdam[Amsterdam.length] = createMarker(new GPoint(-74.18418900,42.94375300),"
Montessori School Of Amsterdam
74 Locust Avenue
Amsterdam, NY 12010
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-76.56562900,42.92314300),"
Montessori School Of The Finger Lakes
Po Box 1312 99 South Street
Auburn, NY 13021
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.92448900,40.77134700),"
Our Lady Of Mt Carmel School
2315 Newtown Avenue
Astoria, NY 11102
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Aquebogue[Aquebogue.length] = createMarker(new GPoint(-72.60990000,40.93560000),"
Our Redeemer Lutheran School
Po Box 960
Aquebogue, NY 11931
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.80972400,42.70406800),"
Our Savior's Lutheran School
63 Mountain View Avenue
Albany, NY 12205
Co-ed school, NS-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78507100,42.64987100),"
Parsons Child & Family Center
60 Academy Road
Albany, NY 12208
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); Aurora[Aurora.length] = createMarker(new GPoint(-76.67520000,42.74870000),"
Peachtown Elementary School
Po Box 178
Aurora, NY 13026
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Amsterdam[Amsterdam.length] = createMarker(new GPoint(-74.18998900,43.01892800),"
Perth Bible Christian Academy
1863 County Highway 107
Amsterdam, NY 12010
Co-ed school, PK-10
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.79200100,42.66478100),"
Pine Hills Montessori Daycare
715 Morris St
Albany, NY 12208
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.85995600,42.70659800),"
Pineview Community Church Preschool
251 Washington Avenue Ext
Albany, NY 12205
Co-ed school, K-K
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78243000,42.67094700),"
St. Anne Institute
160 North Main Avenue
Albany, NY 12206
All-girls school, 7-12
[ View School Profile ]
",iconRd); Albany[Albany.length] = createMarker(new GPoint(-73.76365000,42.66049500),"
St. Casimir Regional School
309 Sheridan Avenue
Albany, NY 12206
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.81350600,42.65644900),"
St. Catherine Of Siena
35 Hurst Avenue
Albany, NY 12208
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78688800,42.66633500),"
St. Catherine's Center For Chil
30 North Main Avenue
Albany, NY 12203
Co-ed school, NS-6
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.92323300,40.76563200),"
St. Demetrios School
30-03 30th Drive
Astoria, NY 11102
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Athol_Springs[Athol_Springs.length] = createMarker(new GPoint(-78.86534000,42.77143700),"
St. Francis High School
4129 Lake Shore Road
Athol Springs, NY 14010
All-boys school, 9-12
[ View School Profile ]
",iconBl); Astoria[Astoria.length] = createMarker(new GPoint(-73.90082700,40.77188300),"
St. Francis Of Assisi School
2118 46th Street
Astoria, NY 11105
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Alden[Alden.length] = createMarker(new GPoint(-78.52360000,42.91205500),"
St. John The Baptist School
2028 Sandridge Road
Alden, NY 14004
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.91260300,40.78006700),"
St. John's Preparatory School
2121 Crescent Street
Astoria, NY 11105
Co-ed school, 9-12
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-76.55560100,42.93353700),"
St. Joseph School
89 E Genesee St
Auburn, NY 13021
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78694800,42.64104400),"
St. Matthew Lutheran School
75 Whitehall Rd
Albany, NY 12209
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Amsterdam[Amsterdam.length] = createMarker(new GPoint(-74.18220300,42.93627600),"
St. Stanislaus School
42-44 Cornell St.
Amsterdam, NY 12010
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.79414700,42.65370200),"
St. Teresa Of Avila School
8 Hollywood Avenue
Albany, NY 12208
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Amityville[Amityville.length] = createMarker(new GPoint(-73.42381500,40.67438700),"
South Shore Montessori School
79 County Line Road
Amityville, NY 11701
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-76.57817600,42.93941900),"
Ss Peter & Paul Ukrainian Catholic School
134 Washington Street
Auburn, NY 13021
Co-ed school, K-8
[ View School Profile ]
",iconGr); Avon[Avon.length] = createMarker(new GPoint(-77.74508500,42.91218800),"
St Agnes Elementary School
60 Park Place
Avon, NY 14414
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.91061600,40.77478600),"
St Catherine & St George
2230 33rd Street
Astoria, NY 11105
Co-ed school, PK-3
[ View School Profile ]
",iconGr); Astoria[Astoria.length] = createMarker(new GPoint(-73.91000000,40.77640000),"
St Demetrios School
30-03 30th Drive
Astoria, NY 11102
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Albany[Albany.length] = createMarker(new GPoint(-73.78087500,42.64276100),"
St James Institute School
50 Summit Avenue
Albany, NY 12209
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-76.55560100,42.93353700),"
St Josephs School
89 E Genesee Street
Auburn, NY 13021
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Amherst[Amherst.length] = createMarker(new GPoint(-78.80720700,42.98820300),"
St Leo The Great School
903 Sweet Home Road
Amherst, NY 14226
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Amityville[Amityville.length] = createMarker(new GPoint(-73.41576100,40.67767700),"
St Martin Of Tours School
41 Union Avenue
Amityville, NY 11701
Co-ed school, 5-8
[ View School Profile ]
",iconGr); Amsterdam[Amsterdam.length] = createMarker(new GPoint(-74.18490000,42.93770000),"
St Marys Institute
10 Kopernik Road
Amsterdam, NY 12010
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-76.58815200,42.92840100),"
Tyburn Academy
50 Wallace Ave
Auburn, NY 13021
Co-ed school, 9-12
[ View School Profile ]
",iconGr); } // 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//////' + showArray); map.removeOverlays(Albany); map.removeOverlays(Albertson); map.removeOverlays(Alden); map.removeOverlays(Alfred); map.removeOverlays(Altamont); map.removeOverlays(Amenia); map.removeOverlays(Amherst); map.removeOverlays(Amityville); map.removeOverlays(Amsterdam); map.removeOverlays(Angelica); map.removeOverlays(Aquebogue); map.removeOverlays(Ardsley); map.removeOverlays(Armonk); map.removeOverlays(Astoria); map.removeOverlays(Athol_Springs); map.removeOverlays(Attica); map.removeOverlays(Au_Sable_Forks); map.removeOverlays(Auburn); map.removeOverlays(Aurora); map.removeOverlays(Avon); 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(Albany);map.removeOverlays(Albany); map.removeOverlays(Albertson); map.removeOverlays(Alden); map.removeOverlays(Alfred); map.removeOverlays(Altamont); map.removeOverlays(Amenia); map.removeOverlays(Amherst); map.removeOverlays(Amityville); map.removeOverlays(Amsterdam); map.removeOverlays(Angelica); map.removeOverlays(Aquebogue); map.removeOverlays(Ardsley); map.removeOverlays(Armonk); map.removeOverlays(Astoria); map.removeOverlays(Athol_Springs); map.removeOverlays(Attica); map.removeOverlays(Au_Sable_Forks); map.removeOverlays(Auburn); map.removeOverlays(Aurora); map.removeOverlays(Avon); map.addOverlays(Albany); centerByArray(Albany, false, false); cntMarker += Albany.length; map.addOverlays(Albertson); centerByArray(Albertson, false, false); cntMarker += Albertson.length; map.addOverlays(Alden); centerByArray(Alden, false, false); cntMarker += Alden.length; map.addOverlays(Alfred); centerByArray(Alfred, false, false); cntMarker += Alfred.length; map.addOverlays(Altamont); centerByArray(Altamont, false, false); cntMarker += Altamont.length; map.addOverlays(Amenia); centerByArray(Amenia, false, false); cntMarker += Amenia.length; map.addOverlays(Amherst); centerByArray(Amherst, false, false); cntMarker += Amherst.length; map.addOverlays(Amityville); centerByArray(Amityville, false, false); cntMarker += Amityville.length; map.addOverlays(Amsterdam); centerByArray(Amsterdam, false, false); cntMarker += Amsterdam.length; map.addOverlays(Angelica); centerByArray(Angelica, false, false); cntMarker += Angelica.length; map.addOverlays(Aquebogue); centerByArray(Aquebogue, false, false); cntMarker += Aquebogue.length; map.addOverlays(Ardsley); centerByArray(Ardsley, false, false); cntMarker += Ardsley.length; map.addOverlays(Armonk); centerByArray(Armonk, false, false); cntMarker += Armonk.length; map.addOverlays(Astoria); centerByArray(Astoria, false, false); cntMarker += Astoria.length; map.addOverlays(Athol_Springs); centerByArray(Athol_Springs, false, false); cntMarker += Athol_Springs.length; map.addOverlays(Attica); centerByArray(Attica, false, false); cntMarker += Attica.length; map.addOverlays(Au_Sable_Forks); centerByArray(Au_Sable_Forks, false, false); cntMarker += Au_Sable_Forks.length; map.addOverlays(Auburn); centerByArray(Auburn, false, false); cntMarker += Auburn.length; map.addOverlays(Aurora); centerByArray(Aurora, false, false); cntMarker += Aurora.length; map.addOverlays(Avon); centerByArray(Avon, false, false); cntMarker += Avon.length; centerByArray(Albany,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=&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; }