function addMarkers(){ mySelect = document.getElementById('selection'); Elmont = [];Cedarhurst = [];Woodbury = [];Roosevelt = [];Woodmere = [];Oyster_Bay = [];Merrick = [];East_Norwich = [];Long_Beach = [];Lawrence = [];Uniondale = [];Albertson = [];Hicksville = [];Bethpage = [];Brookville = [];Roslyn = [];Hewlett = [];Mill_Neck = [];Bellmore = [];Great_Neck = [];Syosset = [];Port_Washington = [];Locust_Valley = [];Hempstead = [];Manhasset = [];Glen_Cove = [];Valley_Stream = [];Garden_City = [];Freeport = [];mySelect.options[mySelect.options.length] = new Option("Albertson schools",'all=Albertson'); mySelect.options[mySelect.options.length] = new Option("Bellmore schools",'all=Bellmore'); mySelect.options[mySelect.options.length] = new Option("Bethpage schools",'all=Bethpage'); mySelect.options[mySelect.options.length] = new Option("Brookville schools",'all=Brookville'); mySelect.options[mySelect.options.length] = new Option("Cedarhurst schools",'all=Cedarhurst'); mySelect.options[mySelect.options.length] = new Option("East Norwich schools",'all=East_Norwich'); mySelect.options[mySelect.options.length] = new Option("Elmont schools",'all=Elmont'); mySelect.options[mySelect.options.length] = new Option("Freeport schools",'all=Freeport'); mySelect.options[mySelect.options.length] = new Option("Garden City schools",'all=Garden_City'); mySelect.options[mySelect.options.length] = new Option("Glen Cove schools",'all=Glen_Cove'); mySelect.options[mySelect.options.length] = new Option("Great Neck schools",'all=Great_Neck'); mySelect.options[mySelect.options.length] = new Option("Hempstead schools",'all=Hempstead'); mySelect.options[mySelect.options.length] = new Option("Hewlett schools",'all=Hewlett'); mySelect.options[mySelect.options.length] = new Option("Hicksville schools",'all=Hicksville'); mySelect.options[mySelect.options.length] = new Option("Lawrence schools",'all=Lawrence'); mySelect.options[mySelect.options.length] = new Option("Locust Valley schools",'all=Locust_Valley'); mySelect.options[mySelect.options.length] = new Option("Long Beach schools",'all=Long_Beach'); mySelect.options[mySelect.options.length] = new Option("Manhasset schools",'all=Manhasset'); mySelect.options[mySelect.options.length] = new Option("Merrick schools",'all=Merrick'); mySelect.options[mySelect.options.length] = new Option("Mill Neck schools",'all=Mill_Neck'); mySelect.options[mySelect.options.length] = new Option("Oyster Bay schools",'all=Oyster_Bay'); mySelect.options[mySelect.options.length] = new Option("Port Washington schools",'all=Port_Washington'); mySelect.options[mySelect.options.length] = new Option("Roosevelt schools",'all=Roosevelt'); mySelect.options[mySelect.options.length] = new Option("Roslyn schools",'all=Roslyn'); mySelect.options[mySelect.options.length] = new Option("Syosset schools",'all=Syosset'); mySelect.options[mySelect.options.length] = new Option("Uniondale schools",'all=Uniondale'); mySelect.options[mySelect.options.length] = new Option("Valley Stream schools",'all=Valley_Stream'); mySelect.options[mySelect.options.length] = new Option("Woodbury schools",'all=Woodbury'); mySelect.options[mySelect.options.length] = new Option("Woodmere schools",'all=Woodmere'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Elmont[Elmont.length] = createMarker(new GPoint(-73.72054800,40.69078500),"
Bible Baptist Academy
779 Elmont Road
Elmont, NY 11003
Co-ed school, 6-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bible Baptist Academy",'Elmont=' + Elmont.length); Cedarhurst[Cedarhurst.length] = createMarker(new GPoint(-73.72423000,40.62409100),"
Bible Baptist Academy
565 Park Avenue
Cedarhurst, NY 11516
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bible Baptist Academy",'Cedarhurst=' + Cedarhurst.length); Woodbury[Woodbury.length] = createMarker(new GPoint(-73.47972000,40.82244000),"
The Center For Developmental D
72 Southwoods Rd
Woodbury, NY 11797
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Center For Developmental D",'Woodbury=' + Woodbury.length); Roosevelt[Roosevelt.length] = createMarker(new GPoint(-73.57515500,40.67950000),"
The Children's Learning Center
380 Washington Ave
Roosevelt, NY 11575
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Children's Learning Center",'Roosevelt=' + Roosevelt.length); Woodmere[Woodmere.length] = createMarker(new GPoint(-73.72443700,40.63438400),"
Drs Yeshiva High School For Boys
700 Ibsen Street
Woodmere, NY 11598
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Drs Yeshiva High School For Boys",'Woodmere=' + Woodmere.length); Oyster_Bay[Oyster_Bay.length] = createMarker(new GPoint(-73.49679000,40.85766100),"
East Woods School
31 Yellow Cote Road
Oyster Bay, NY 11771
Co-ed school, NS-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("East Woods School",'Oyster_Bay=' + Oyster_Bay.length); Merrick[Merrick.length] = createMarker(new GPoint(-73.55527500,40.66602600),"
Grace Christian Academy
36 Smith Street
Merrick, NY 11566
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Christian Academy",'Merrick=' + Merrick.length); East_Norwich[East_Norwich.length] = createMarker(new GPoint(-73.53458500,40.84047500),"
Harmony Heights
60 Walnut Avenue
East Norwich, NY 11732
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harmony Heights",'East_Norwich=' + East_Norwich.length); Oyster_Bay[Oyster_Bay.length] = createMarker(new GPoint(-73.51677900,40.85425000),"
Harmony Heights School
Po Box 569
Oyster Bay, NY 11771
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harmony Heights School",'Oyster_Bay=' + Oyster_Bay.length); Long_Beach[Long_Beach.length] = createMarker(new GPoint(-73.66082300,40.58883700),"
Harriet Eisman Community School
165 E Park Avenue
Long Beach, NY 11561
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harriet Eisman Community School",'Long_Beach=' + Long_Beach.length); Cedarhurst[Cedarhurst.length] = createMarker(new GPoint(-73.71995700,40.62426600),"
Hebrew Academy Five Towns Rockaway High School
635 Central Avenue
Cedarhurst, NY 11516
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hebrew Academy Five Towns Rockaway High School",'Cedarhurst=' + Cedarhurst.length); Lawrence[Lawrence.length] = createMarker(new GPoint(-73.73996400,40.61230900),"
Hebrew Academy Long Bch High School Boys
140 Central Ave
Lawrence, NY 11559
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hebrew Academy Long Bch High School Boys",'Lawrence=' + Lawrence.length); Uniondale[Uniondale.length] = createMarker(new GPoint(-73.60629800,40.72084000),"
Hebrew Academy Of Nassau County
215 Oak Street
Uniondale, NY 11553
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hebrew Academy Of Nassau County",'Uniondale=' + Uniondale.length); 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); mySelect.options[mySelect.options.length] = new Option("Henry Viscardi School",'Albertson=' + Albertson.length); Hicksville[Hicksville.length] = createMarker(new GPoint(-73.53209200,40.75086300),"
Holy Trinity Diocesan High School
98 Cherry Lane
Hicksville, NY 11801
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Trinity Diocesan High School",'Hicksville=' + Hicksville.length); Uniondale[Uniondale.length] = createMarker(new GPoint(-73.58746600,40.71911300),"
Kellenberg Memorial High School
1400 Glenn Curtiss Blvd
Uniondale, NY 11553
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kellenberg Memorial High School",'Uniondale=' + Uniondale.length); Woodmere[Woodmere.length] = createMarker(new GPoint(-73.71432200,40.63429900),"
Lawrence Woodmere Academy
336 Woodmere Blvd
Woodmere, NY 11598
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lawrence Woodmere Academy",'Woodmere=' + Woodmere.length); Bethpage[Bethpage.length] = createMarker(new GPoint(-73.48480000,40.73970000),"
Long Island Christian Academy
Po Box 369
Bethpage, NY 11714
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Long Island Christian Academy",'Bethpage=' + Bethpage.length); Brookville[Brookville.length] = createMarker(new GPoint(-73.55051500,40.81933300),"
Long Island Lutheran Middle & High School
131 Brookville Road
Brookville, NY 11545
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Long Island Lutheran Middle & High School",'Brookville=' + Brookville.length); Roslyn[Roslyn.length] = createMarker(new GPoint(-73.67014500,40.76415300),"
Mesiuta Of Roslyn.
2 Shelter Rock Road
Roslyn, NY 11576
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mesiuta Of Roslyn.",'Roslyn=' + Roslyn.length); Hewlett[Hewlett.length] = createMarker(new GPoint(-73.70750900,40.64144700),"
Mesivta Ateres Yaakov
1170a William Street
Hewlett, NY 11557
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mesivta Ateres Yaakov",'Hewlett=' + Hewlett.length); Long_Beach[Long_Beach.length] = createMarker(new GPoint(-73.67020300,40.58632500),"
Mesivta Of Long Beach
205 W Beech Street
Long Beach, NY 11561
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mesivta Of Long Beach",'Long_Beach=' + Long_Beach.length); Mill_Neck[Mill_Neck.length] = createMarker(new GPoint(-73.56690000,40.87334000),"
Mill Neck Manor School For Deaf
Frost Mill Road - Box 12
Mill Neck, NY 11765
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mill Neck Manor School For Deaf",'Mill_Neck=' + Mill_Neck.length); Bethpage[Bethpage.length] = createMarker(new GPoint(-73.48324100,40.72176600),"
New Jeresalem Christian Academy
65 Stewart Ave
Bethpage, NY 11714
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Jeresalem Christian Academy",'Bethpage=' + Bethpage.length); Bellmore[Bellmore.length] = createMarker(new GPoint(-73.52306000,40.65745300),"
New Jerusalem Christian Academy
2658 Corner Lane
Bellmore, NY 11710
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Jerusalem Christian Academy",'Bellmore=' + Bellmore.length); Great_Neck[Great_Neck.length] = createMarker(new GPoint(-73.70442000,40.78220600),"
North Shore Hebrew Academy High School
175 Community Drive
Great Neck, NY 11021
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Shore Hebrew Academy High School",'Great_Neck=' + Great_Neck.length); Syosset[Syosset.length] = createMarker(new GPoint(-73.48230800,40.82208100),"
Our Lady Of Mercy Academy
815 Convent Road
Syosset, NY 11791
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Mercy Academy",'Syosset=' + Syosset.length); Port_Washington[Port_Washington.length] = createMarker(new GPoint(-73.68322500,40.82924000),"
Port Washington Christian School
35 Campus Dr
Port Washington, NY 11050
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Port Washington Christian School",'Port_Washington=' + Port_Washington.length); Locust_Valley[Locust_Valley.length] = createMarker(new GPoint(-73.58581700,40.86778500),"
Portledge School
355 Duck Pond Road
Locust Valley, NY 11560
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Portledge School",'Locust_Valley=' + Locust_Valley.length); Merrick[Merrick.length] = createMarker(new GPoint(-73.56044600,40.68429900),"
Progressive School Of Long Island
1425 Merrick Ave
Merrick, NY 11566
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Progressive School Of Long Island",'Merrick=' + Merrick.length); Hewlett[Hewlett.length] = createMarker(new GPoint(-73.70087400,40.63810700),"
Reenas Bais Yaakov
1 Piermont Avenue
Hewlett, NY 11557
All-girls school, 9-11
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Reenas Bais Yaakov",'Hewlett=' + Hewlett.length); Hempstead[Hempstead.length] = createMarker(new GPoint(-73.63384900,40.70733300),"
Sacred Heart Academy
47 Cathedral Avenue
Hempstead, NY 11550
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Academy",'Hempstead=' + Hempstead.length); Oyster_Bay[Oyster_Bay.length] = createMarker(new GPoint(-73.52770000,40.86818000),"
St. Dominic High School
110 Anstice Street
Oyster Bay, NY 11771
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Dominic High School",'Oyster_Bay=' + Oyster_Bay.length); Manhasset[Manhasset.length] = createMarker(new GPoint(-73.69816000,40.79106100),"
St. Mary's High School
51 Clapham Avenue
Manhasset, NY 11030
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary's High School",'Manhasset=' + Manhasset.length); Glen_Cove[Glen_Cove.length] = createMarker(new GPoint(-73.61957800,40.85680100),"
Solomon Schechter Day School Of Nassau County
27 Cedar Swamp Road
Glen Cove, NY 11542
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Solomon Schechter Day School Of Nassau County",'Glen_Cove=' + Glen_Cove.length); Lawrence[Lawrence.length] = createMarker(new GPoint(-73.74042500,40.61210700),"
Tiferet High School For Girls (gamala)
140 Central Avenue
Lawrence, NY 11559
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tiferet High School For Girls (gamala)",'Lawrence=' + Lawrence.length); Cedarhurst[Cedarhurst.length] = createMarker(new GPoint(-73.72376700,40.61895500),"
Torah Academy Of Lawrence-cedarhurst
Po Box 486 26 Columbia Avenue
Cedarhurst, NY 11516
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Torah Academy Of Lawrence-cedarhurst",'Cedarhurst=' + Cedarhurst.length); Syosset[Syosset.length] = createMarker(new GPoint(-73.50343400,40.79523700),"
Torah Academy Of Long Island
310a South Oyster Bay Road 100
Syosset, NY 11791
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Torah Academy Of Long Island",'Syosset=' + Syosset.length); Long_Beach[Long_Beach.length] = createMarker(new GPoint(-73.67020300,40.58632500),"
Torah High School Long Beach
205 W Beech St
Long Beach, NY 11561
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Torah High School Long Beach",'Long_Beach=' + Long_Beach.length); Valley_Stream[Valley_Stream.length] = createMarker(new GPoint(-73.69822100,40.66324200),"
Valley Stream Christian Academy
12 E. Fairview Ave
Valley Stream, NY 11580
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Valley Stream Christian Academy",'Valley_Stream=' + Valley_Stream.length); Port_Washington[Port_Washington.length] = createMarker(new GPoint(-73.68022700,40.81364900),"
Vincent Smith School
322 Port Washington Blvd
Port Washington, NY 11050
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Vincent Smith School",'Port_Washington=' + Port_Washington.length); Garden_City[Garden_City.length] = createMarker(new GPoint(-73.68422000,40.71700000),"
The Waldorf School Of Garden City
225 Cambridge Avenue
Garden City, NY 11530
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Waldorf School Of Garden City",'Garden_City=' + Garden_City.length); Freeport[Freeport.length] = createMarker(new GPoint(-73.58875500,40.65251000),"
Woodward Children's Center
201 West Merrick Road
Freeport, NY 11520
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodward Children's Center",'Freeport=' + Freeport.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(Albertson); map.removeOverlays(Bellmore); map.removeOverlays(Bethpage); map.removeOverlays(Brookville); map.removeOverlays(Cedarhurst); map.removeOverlays(East_Norwich); map.removeOverlays(Elmont); map.removeOverlays(Freeport); map.removeOverlays(Garden_City); map.removeOverlays(Glen_Cove); map.removeOverlays(Great_Neck); map.removeOverlays(Hempstead); map.removeOverlays(Hewlett); map.removeOverlays(Hicksville); map.removeOverlays(Lawrence); map.removeOverlays(Locust_Valley); map.removeOverlays(Long_Beach); map.removeOverlays(Manhasset); map.removeOverlays(Merrick); map.removeOverlays(Mill_Neck); map.removeOverlays(Oyster_Bay); map.removeOverlays(Port_Washington); map.removeOverlays(Roosevelt); map.removeOverlays(Roslyn); map.removeOverlays(Syosset); map.removeOverlays(Uniondale); map.removeOverlays(Valley_Stream); map.removeOverlays(Woodbury); map.removeOverlays(Woodmere); 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(Elmont);map.removeOverlays(Albertson); map.removeOverlays(Bellmore); map.removeOverlays(Bethpage); map.removeOverlays(Brookville); map.removeOverlays(Cedarhurst); map.removeOverlays(East_Norwich); map.removeOverlays(Elmont); map.removeOverlays(Freeport); map.removeOverlays(Garden_City); map.removeOverlays(Glen_Cove); map.removeOverlays(Great_Neck); map.removeOverlays(Hempstead); map.removeOverlays(Hewlett); map.removeOverlays(Hicksville); map.removeOverlays(Lawrence); map.removeOverlays(Locust_Valley); map.removeOverlays(Long_Beach); map.removeOverlays(Manhasset); map.removeOverlays(Merrick); map.removeOverlays(Mill_Neck); map.removeOverlays(Oyster_Bay); map.removeOverlays(Port_Washington); map.removeOverlays(Roosevelt); map.removeOverlays(Roslyn); map.removeOverlays(Syosset); map.removeOverlays(Uniondale); map.removeOverlays(Valley_Stream); map.removeOverlays(Woodbury); map.removeOverlays(Woodmere); map.addOverlays(Albertson); centerByArray(Albertson, false, false); cntMarker += Albertson.length; map.addOverlays(Bellmore); centerByArray(Bellmore, false, false); cntMarker += Bellmore.length; map.addOverlays(Bethpage); centerByArray(Bethpage, false, false); cntMarker += Bethpage.length; map.addOverlays(Brookville); centerByArray(Brookville, false, false); cntMarker += Brookville.length; map.addOverlays(Cedarhurst); centerByArray(Cedarhurst, false, false); cntMarker += Cedarhurst.length; map.addOverlays(East_Norwich); centerByArray(East_Norwich, false, false); cntMarker += East_Norwich.length; map.addOverlays(Elmont); centerByArray(Elmont, false, false); cntMarker += Elmont.length; map.addOverlays(Freeport); centerByArray(Freeport, false, false); cntMarker += Freeport.length; map.addOverlays(Garden_City); centerByArray(Garden_City, false, false); cntMarker += Garden_City.length; map.addOverlays(Glen_Cove); centerByArray(Glen_Cove, false, false); cntMarker += Glen_Cove.length; map.addOverlays(Great_Neck); centerByArray(Great_Neck, false, false); cntMarker += Great_Neck.length; map.addOverlays(Hempstead); centerByArray(Hempstead, false, false); cntMarker += Hempstead.length; map.addOverlays(Hewlett); centerByArray(Hewlett, false, false); cntMarker += Hewlett.length; map.addOverlays(Hicksville); centerByArray(Hicksville, false, false); cntMarker += Hicksville.length; map.addOverlays(Lawrence); centerByArray(Lawrence, false, false); cntMarker += Lawrence.length; map.addOverlays(Locust_Valley); centerByArray(Locust_Valley, false, false); cntMarker += Locust_Valley.length; map.addOverlays(Long_Beach); centerByArray(Long_Beach, false, false); cntMarker += Long_Beach.length; map.addOverlays(Manhasset); centerByArray(Manhasset, false, false); cntMarker += Manhasset.length; map.addOverlays(Merrick); centerByArray(Merrick, false, false); cntMarker += Merrick.length; map.addOverlays(Mill_Neck); centerByArray(Mill_Neck, false, false); cntMarker += Mill_Neck.length; map.addOverlays(Oyster_Bay); centerByArray(Oyster_Bay, false, false); cntMarker += Oyster_Bay.length; map.addOverlays(Port_Washington); centerByArray(Port_Washington, false, false); cntMarker += Port_Washington.length; map.addOverlays(Roosevelt); centerByArray(Roosevelt, false, false); cntMarker += Roosevelt.length; map.addOverlays(Roslyn); centerByArray(Roslyn, false, false); cntMarker += Roslyn.length; map.addOverlays(Syosset); centerByArray(Syosset, false, false); cntMarker += Syosset.length; map.addOverlays(Uniondale); centerByArray(Uniondale, false, false); cntMarker += Uniondale.length; map.addOverlays(Valley_Stream); centerByArray(Valley_Stream, false, false); cntMarker += Valley_Stream.length; map.addOverlays(Woodbury); centerByArray(Woodbury, false, false); cntMarker += Woodbury.length; map.addOverlays(Woodmere); centerByArray(Woodmere, false, false); cntMarker += Woodmere.length; centerByArray(Elmont,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; }