function addMarkers() { mySelect = document.getElementById('selection'); Umatilla = [];Altoona = [];Leesburg = [];Astatula = [];Clermont = [];Eustis = [];Fruitland_Park = [];Groveland = [];Howey_in_the_hills = [];Tavares = [];Mascotte = [];Sorrento = [];Mt_Dora = [];Paisley = [];Lady_Lake = [];mySelect.options[mySelect.options.length] = new Option("Altoona schools",'all=Altoona'); mySelect.options[mySelect.options.length] = new Option("Astatula schools",'all=Astatula'); mySelect.options[mySelect.options.length] = new Option("Clermont schools",'all=Clermont'); mySelect.options[mySelect.options.length] = new Option("Eustis schools",'all=Eustis'); mySelect.options[mySelect.options.length] = new Option("Fruitland Park schools",'all=Fruitland_Park'); mySelect.options[mySelect.options.length] = new Option("Groveland schools",'all=Groveland'); mySelect.options[mySelect.options.length] = new Option("Howey in the hills schools",'all=Howey_in_the_hills'); mySelect.options[mySelect.options.length] = new Option("Lady Lake schools",'all=Lady_Lake'); mySelect.options[mySelect.options.length] = new Option("Leesburg schools",'all=Leesburg'); mySelect.options[mySelect.options.length] = new Option("Mascotte schools",'all=Mascotte'); mySelect.options[mySelect.options.length] = new Option("Mt Dora schools",'all=Mt_Dora'); mySelect.options[mySelect.options.length] = new Option("Paisley schools",'all=Paisley'); mySelect.options[mySelect.options.length] = new Option("Sorrento schools",'all=Sorrento'); mySelect.options[mySelect.options.length] = new Option("Tavares schools",'all=Tavares'); mySelect.options[mySelect.options.length] = new Option("Umatilla schools",'all=Umatilla'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Umatilla[Umatilla.length] = createMarker(new GPoint(-81.70069885,28.95000076),"
Alee Academy Charter School
P. O. Box 2481
Umatilla, FL 32784

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alee Academy Charter School",'Umatilla=' + Umatilla.length); Umatilla[Umatilla.length] = createMarker(new GPoint(-81.66750400,28.93116500),"
Alee Academy/acer Night Prog.
P. O. Box 2481
Umatilla, FL 32784

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alee Academy/acer Night Prog.",'Umatilla=' + Umatilla.length); Altoona[Altoona.length] = createMarker(new GPoint(-81.64914700,28.96515500),"
Altoona School
P O Box 201
Altoona, FL 32702

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Altoona School",'Altoona=' + Altoona.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.88695526,28.83146286),"
Arnette House Second Chance
1335 N Shore Drive
Leesburg, FL 34748

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arnette House Second Chance",'Leesburg=' + Leesburg.length); Astatula[Astatula.length] = createMarker(new GPoint(-81.72605896,28.71013641),"
Astatula Elementary School
13925 Florida Avenue
Astatula, FL 34705

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Astatula Elementary School",'Astatula=' + Astatula.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.88164520,28.82903671),"
Beverly Shores Elementary School
1108 W Griffin Road
Leesburg, FL 34748

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beverly Shores Elementary School",'Leesburg=' + Leesburg.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.89564514,28.82753754),"
Carver Middle School
1200 N Beecher Street
Leesburg, FL 34748

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Carver Middle School",'Leesburg=' + Leesburg.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.74632600,28.55117000),"
Clermont Elementary School
680 E Highland Avenue
Clermont, FL 34711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clermont Elementary School",'Clermont=' + Clermont.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.75604248,28.56030083),"
Clermont Middle School
301 East Avenue
Clermont, FL 34711

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Clermont Middle School",'Clermont=' + Clermont.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.75635529,28.55941772),"
Cypress Ridge Elementary School
350 East Avenue
Clermont, FL 34711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cypress Ridge Elementary School",'Clermont=' + Clermont.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.76633900,28.55129500),"
East Ridge High School
13322 Excalibur Road
Clermont, FL 34711

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("East Ridge High School",'Clermont=' + Clermont.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.67804718,28.85176277),"
Eustis Elementary School
714 E Citrus Avenue
Eustis, FL 32726

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eustis Elementary School",'Eustis=' + Eustis.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.68901825,28.83816338),"
Eustis Heights Elementary School
310 W Taylor Avenue
Eustis, FL 32726

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eustis Heights Elementary School",'Eustis=' + Eustis.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.67194366,28.84726334),"
Eustis High School
1300 E Washington Avenue
Eustis, FL 32726

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eustis High School",'Eustis=' + Eustis.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.64623260,28.85844040),"
Eustis Middle School
18725 E Bates Avenue
Eustis, FL 32726

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Eustis Middle School",'Eustis=' + Eustis.length); Fruitland_Park[Fruitland_Park.length] = createMarker(new GPoint(-81.91038513,28.85923767),"
Fruitland Park Elementary School
304 W Fountain Street
Fruitland Park, FL 34731

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fruitland Park Elementary School",'Fruitland_Park=' + Fruitland_Park.length); Groveland[Groveland.length] = createMarker(new GPoint(-81.85604095,28.55690384),"
Gray Middle School
205 E Magnolia Street
Groveland, FL 34736

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Gray Middle School",'Groveland=' + Groveland.length); Howey_in_the_hills[Howey_in_the_hills.length] = createMarker(new GPoint(-81.77122498,28.70971680),"
Griffin Middle School (inactiv
512 South Palm Avenue
Howey-in-the-hills, FL 32737

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Griffin Middle School (inactiv",'Howey_in_the_hills=' + Howey_in_the_hills.length); Groveland[Groveland.length] = createMarker(new GPoint(-81.84866333,28.55436707),"
Groveland Elementary School
930 Parkwood Avenue
Groveland, FL 34736

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Groveland Elementary School",'Groveland=' + Groveland.length); Umatilla[Umatilla.length] = createMarker(new GPoint(-81.66047668,28.92803764),"
Harry-anna School (inactive 11/99)
305 East Lake Street
Umatilla, FL 32784

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harry-anna School (inactive 11/99)",'Umatilla=' + Umatilla.length); Tavares[Tavares.length] = createMarker(new GPoint(-81.73305511,28.80216217),"
Lake County Acer Program
551 W Main Street
Tavares, FL 32778

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake County Acer Program",'Tavares=' + Tavares.length); Tavares[Tavares.length] = createMarker(new GPoint(-84.42198700,33.76419700),"
Lake County Superintendent's Office
0201 W Burleigh Boulevard
Tavares, FL 32778

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake County Superintendent's Office",'Tavares=' + Tavares.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.68618774,28.85269928),"
Lake Hills School
200 W Golf Links Avenue
Eustis, FL 32726

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Hills School",'Eustis=' + Eustis.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.69185638,28.82704735),"
Lake Technical Center
2001 Kurt Street
Eustis, FL 32726

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Technical Center",'Eustis=' + Eustis.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.89893400,28.80302800),"
Leesburg Elementary School
2229 South Street
Leesburg, FL 34748

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leesburg Elementary School",'Leesburg=' + Leesburg.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.88777161,28.80846596),"
Leesburg High School
1401 W Meadows Drive
Leesburg, FL 34748

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Leesburg High School",'Leesburg=' + Leesburg.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.64750671,28.96913719),"
Life Stream Academy
3010 Idlewild Ave
Eustis, FL 32726

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Stream Academy",'Eustis=' + Eustis.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.87799835,28.81049919),"
Lifestream Academy
P. O. Box 49100
Leesburg, FL 34748

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lifestream Academy",'Leesburg=' + Leesburg.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.71848297,28.52510071),"
Lost Lake Elementary School
1901 Johns Lake Road
Clermont, FL 34711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lost Lake Elementary School",'Clermont=' + Clermont.length); Mascotte[Mascotte.length] = createMarker(new GPoint(-81.88571400,28.57818500),"
Mascotte Elementary School
513 Albrook Street
Mascotte, FL 34753

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mascotte Elementary School",'Mascotte=' + Mascotte.length); Sorrento[Sorrento.length] = createMarker(new GPoint(-81.51704407,28.80993652),"
Milestones Community Middle School
31600 Camp Challenge Road
Sorrento, FL 32776

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Milestones Community Middle School",'Sorrento=' + Sorrento.length); Sorrento[Sorrento.length] = createMarker(new GPoint(-81.51704407,28.80993652),"
Milestones Community School
31600 Camp Challenge Road
Sorrento, FL 32776

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Milestones Community School",'Sorrento=' + Sorrento.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.74990082,28.60470009),"
Minneola Elementary School
300 Pearl Street
Clermont, FL 34711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Minneola Elementary School",'Clermont=' + Clermont.length); Mt_Dora[Mt_Dora.length] = createMarker(new GPoint(-81.63634491,28.80224037),"
Mt. Dora High School
700 N Highland Street
Mt. Dora, FL 32757

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt. Dora High School",'Mt_Dora=' + Mt_Dora.length); Mt_Dora[Mt_Dora.length] = createMarker(new GPoint(-81.63275909,28.80956268),"
Mt. Dora Middle School
1405 Lincoln Avenue
Mt. Dora, FL 32757

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mt. Dora Middle School",'Mt_Dora=' + Mt_Dora.length); Mt_Dora[Mt_Dora.length] = createMarker(new GPoint(-81.63601685,28.82240677),"
National Deaf Academy Charter
19650 Us Highway 441
Mt. Dora, FL 32757

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("National Deaf Academy Charter",'Mt_Dora=' + Mt_Dora.length); Tavares[Tavares.length] = createMarker(new GPoint(-81.72916100,28.81258900),"
Non-school Migrant
201 W Burleigh Boulevard
Tavares, FL 32778

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Non-school Migrant",'Tavares=' + Tavares.length); Tavares[Tavares.length] = createMarker(new GPoint(-81.72932434,28.81268692),"
Nonschool Exceptional Education
201 W Burleigh Boulevard
Tavares, FL 32778

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nonschool Exceptional Education",'Tavares=' + Tavares.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.89698029,28.80296326),"
Oak Park Middle School
2101 W South Street
Leesburg, FL 34748

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Oak Park Middle School",'Leesburg=' + Leesburg.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.74369812,28.53440094),"
Pine Ridge Elementary School
10245 County Road 561
Clermont, FL 34711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pine Ridge Elementary School",'Clermont=' + Clermont.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.91893768,28.82664490),"
Rimes Elementary School
3101 Schoolview Street
Leesburg, FL 34748

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rimes Elementary School",'Leesburg=' + Leesburg.length); Altoona[Altoona.length] = createMarker(new GPoint(-81.65432000,28.98217600),"
Rivendell Academy
18121 Boys Ranch Rd
Altoona, FL 32702

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rivendell Academy",'Altoona=' + Altoona.length); Mt_Dora[Mt_Dora.length] = createMarker(new GPoint(-81.59295654,28.80558586),"
Round Lake Elementary School
31333 Round Lake Road
Mt. Dora, FL 32757

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Round Lake Elementary School",'Mt_Dora=' + Mt_Dora.length); Eustis[Eustis.length] = createMarker(new GPoint(-81.52754211,28.85723877),"
Seminole Springs Elementary School
26200 W Huff Road
Eustis, FL 32736

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Seminole Springs Elementary School",'Eustis=' + Eustis.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.70695000,28.49981000),"
South Lake Charter Elementary School
15220 Hartwood Marsh Rd
Clermont, FL 34711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Lake Charter Elementary School",'Clermont=' + Clermont.length); Groveland[Groveland.length] = createMarker(new GPoint(-81.81834412,28.57293892),"
South Lake High School
15600 Silver Eagle Road
Groveland, FL 34736

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Lake High School",'Groveland=' + Groveland.length); Paisley[Paisley.length] = createMarker(new GPoint(-81.54296875,28.99645042),"
Spring Creek Elementary School
44440 Spring Creek Road
Paisley, FL 32767

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Spring Creek Elementary School",'Paisley=' + Paisley.length); Tavares[Tavares.length] = createMarker(new GPoint(-81.72050476,28.81070709),"
Tavares Elementary School
720 E Clifford Street
Tavares, FL 32778

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tavares Elementary School",'Tavares=' + Tavares.length); Tavares[Tavares.length] = createMarker(new GPoint(-81.72805786,28.80726242),"
Tavares High School
603 N New Hampshire Avenu
Tavares, FL 32778

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tavares High School",'Tavares=' + Tavares.length); Tavares[Tavares.length] = createMarker(new GPoint(-81.74209595,28.77181244),"
Tavares Middle School
13032 Lane Park Cutoff
Tavares, FL 32778

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Tavares Middle School",'Tavares=' + Tavares.length); Leesburg[Leesburg.length] = createMarker(new GPoint(-81.78084564,28.84463692),"
Treadway Elementary School
10619 Treadway School Roa
Leesburg, FL 34788

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Treadway Elementary School",'Leesburg=' + Leesburg.length); Mt_Dora[Mt_Dora.length] = createMarker(new GPoint(-81.67515564,28.81208038),"
Triangle Elementary School
1707 Eudora Road
Mt. Dora, FL 32757

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Triangle Elementary School",'Mt_Dora=' + Mt_Dora.length); Umatilla[Umatilla.length] = createMarker(new GPoint(-81.66946411,28.93826294),"
Umatilla Elementary School
401 Lake Street
Umatilla, FL 32784

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Umatilla Elementary School",'Umatilla=' + Umatilla.length); Umatilla[Umatilla.length] = createMarker(new GPoint(-81.66715000,28.93115400),"
Umatilla Girls Academy
P O Box 9
Umatilla, FL 32784

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Umatilla Girls Academy",'Umatilla=' + Umatilla.length); Umatilla[Umatilla.length] = createMarker(new GPoint(-81.66554260,28.92977142),"
Umatilla High School
320 N Trowell Avenue
Umatilla, FL 32784

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Umatilla High School",'Umatilla=' + Umatilla.length); Umatilla[Umatilla.length] = createMarker(new GPoint(-81.66047668,28.92803764),"
Umatilla Middle School
305 E Lake Street
Umatilla, FL 32784

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Umatilla Middle School",'Umatilla=' + Umatilla.length); Lady_Lake[Lady_Lake.length] = createMarker(new GPoint(-81.93705750,28.92972565),"
Villages Elementary School
695 Rolling Acres Road
Lady Lake, FL 32159

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Villages Elementary School",'Lady_Lake=' + Lady_Lake.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.70690155,28.52173996),"
Windy Hill Middle School
3575 Hancock Road
Clermont, FL 34711

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Windy Hill Middle School",'Clermont=' + Clermont.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(Altoona); map.removeOverlays(Astatula); map.removeOverlays(Clermont); map.removeOverlays(Eustis); map.removeOverlays(Fruitland_Park); map.removeOverlays(Groveland); map.removeOverlays(Howey_in_the_hills); map.removeOverlays(Lady_Lake); map.removeOverlays(Leesburg); map.removeOverlays(Mascotte); map.removeOverlays(Mt_Dora); map.removeOverlays(Paisley); map.removeOverlays(Sorrento); map.removeOverlays(Tavares); map.removeOverlays(Umatilla); 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(Umatilla);map.removeOverlays(Altoona); map.removeOverlays(Astatula); map.removeOverlays(Clermont); map.removeOverlays(Eustis); map.removeOverlays(Fruitland_Park); map.removeOverlays(Groveland); map.removeOverlays(Howey_in_the_hills); map.removeOverlays(Lady_Lake); map.removeOverlays(Leesburg); map.removeOverlays(Mascotte); map.removeOverlays(Mt_Dora); map.removeOverlays(Paisley); map.removeOverlays(Sorrento); map.removeOverlays(Tavares); map.removeOverlays(Umatilla); map.addOverlays(Altoona); centerByArray(Altoona, false, false); cntMarker += Altoona.length; map.addOverlays(Astatula); centerByArray(Astatula, false, false); cntMarker += Astatula.length; map.addOverlays(Clermont); centerByArray(Clermont, false, false); cntMarker += Clermont.length; map.addOverlays(Eustis); centerByArray(Eustis, false, false); cntMarker += Eustis.length; map.addOverlays(Fruitland_Park); centerByArray(Fruitland_Park, false, false); cntMarker += Fruitland_Park.length; map.addOverlays(Groveland); centerByArray(Groveland, false, false); cntMarker += Groveland.length; map.addOverlays(Howey_in_the_hills); centerByArray(Howey_in_the_hills, false, false); cntMarker += Howey_in_the_hills.length; map.addOverlays(Lady_Lake); centerByArray(Lady_Lake, false, false); cntMarker += Lady_Lake.length; map.addOverlays(Leesburg); centerByArray(Leesburg, false, false); cntMarker += Leesburg.length; map.addOverlays(Mascotte); centerByArray(Mascotte, false, false); cntMarker += Mascotte.length; map.addOverlays(Mt_Dora); centerByArray(Mt_Dora, false, false); cntMarker += Mt_Dora.length; map.addOverlays(Paisley); centerByArray(Paisley, false, false); cntMarker += Paisley.length; map.addOverlays(Sorrento); centerByArray(Sorrento, false, false); cntMarker += Sorrento.length; map.addOverlays(Tavares); centerByArray(Tavares, false, false); cntMarker += Tavares.length; map.addOverlays(Umatilla); centerByArray(Umatilla, false, false); cntMarker += Umatilla.length; centerByArray(Umatilla,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'); } }