function addMarkers(){ mySelect = document.getElementById('selection'); Jacksonville = [];Altamonte_Springs = [];Clearwater = [];Valrico = [];Miami_Beach = [];Tampa = [];Dunedin = [];Lauderhill = [];Homestead = [];Riverview = [];Maitland = [];Palm_City = [];Orlando = [];Miami_Springs = [];Key_West = [];Lake_Placid = [];Fort_Walton_Beach = [];Miami = [];Temple_Terrace = [];Fort_Myers = [];Port_Orange = [];Davie = [];Coconut_Creek = [];Clermont = [];Vero_Beach = [];Delray_Beach = [];Saint_Petersburg = [];Wellington = [];Boca_Raton = [];Holiday = [];mySelect.options[mySelect.options.length] = new Option("Altamonte Springs schools",'all=Altamonte_Springs'); mySelect.options[mySelect.options.length] = new Option("Boca Raton schools",'all=Boca_Raton'); mySelect.options[mySelect.options.length] = new Option("Clearwater schools",'all=Clearwater'); mySelect.options[mySelect.options.length] = new Option("Clermont schools",'all=Clermont'); mySelect.options[mySelect.options.length] = new Option("Coconut Creek schools",'all=Coconut_Creek'); mySelect.options[mySelect.options.length] = new Option("Davie schools",'all=Davie'); mySelect.options[mySelect.options.length] = new Option("Delray Beach schools",'all=Delray_Beach'); mySelect.options[mySelect.options.length] = new Option("Dunedin schools",'all=Dunedin'); mySelect.options[mySelect.options.length] = new Option("Fort Myers schools",'all=Fort_Myers'); mySelect.options[mySelect.options.length] = new Option("Fort Walton Beach schools",'all=Fort_Walton_Beach'); mySelect.options[mySelect.options.length] = new Option("Holiday schools",'all=Holiday'); mySelect.options[mySelect.options.length] = new Option("Homestead schools",'all=Homestead'); mySelect.options[mySelect.options.length] = new Option("Jacksonville schools",'all=Jacksonville'); mySelect.options[mySelect.options.length] = new Option("Key West schools",'all=Key_West'); mySelect.options[mySelect.options.length] = new Option("Lake Placid schools",'all=Lake_Placid'); mySelect.options[mySelect.options.length] = new Option("Lauderhill schools",'all=Lauderhill'); mySelect.options[mySelect.options.length] = new Option("Maitland schools",'all=Maitland'); mySelect.options[mySelect.options.length] = new Option("Miami schools",'all=Miami'); mySelect.options[mySelect.options.length] = new Option("Miami Beach schools",'all=Miami_Beach'); mySelect.options[mySelect.options.length] = new Option("Miami Springs schools",'all=Miami_Springs'); mySelect.options[mySelect.options.length] = new Option("Orlando schools",'all=Orlando'); mySelect.options[mySelect.options.length] = new Option("Palm City schools",'all=Palm_City'); mySelect.options[mySelect.options.length] = new Option("Port Orange schools",'all=Port_Orange'); mySelect.options[mySelect.options.length] = new Option("Riverview schools",'all=Riverview'); mySelect.options[mySelect.options.length] = new Option("Saint Petersburg schools",'all=Saint_Petersburg'); mySelect.options[mySelect.options.length] = new Option("Tampa schools",'all=Tampa'); mySelect.options[mySelect.options.length] = new Option("Temple Terrace schools",'all=Temple_Terrace'); mySelect.options[mySelect.options.length] = new Option("Valrico schools",'all=Valrico'); mySelect.options[mySelect.options.length] = new Option("Vero Beach schools",'all=Vero_Beach'); mySelect.options[mySelect.options.length] = new Option("Wellington schools",'all=Wellington'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.63233400,30.13907600),"
a child's place Montessori School - ACP Elementary
12601 San Jose Blvd
Jacksonville, FL 32223
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("a child's place Montessori School - ACP Elementary",'Jacksonville=' + Jacksonville.length); Altamonte_Springs[Altamonte_Springs.length] = createMarker(new GPoint(-81.37437800,28.67166300),"
Altamonte Montessori School
482 Osceola Street
Altamonte Springs, FL 32701
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Altamonte Montessori School",'Altamonte_Springs=' + Altamonte_Springs.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.80399700,27.93505100),"
Belleair Montessori Academy
905 Ponce De Leon Blvd
Clearwater, FL 33756
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Belleair Montessori Academy",'Clearwater=' + Clearwater.length); Valrico[Valrico.length] = createMarker(new GPoint(-82.22092900,27.87824000),"
The Brandon Montessori School At River Hills
4223 Lynx Paw Trail
Valrico, FL 33594
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Brandon Montessori School At River Hills",'Valrico=' + Valrico.length); Miami_Beach[Miami_Beach.length] = createMarker(new GPoint(-80.12634700,25.81327600),"
Casa Dei Bambini
4025 Pine Tree Drive
Miami Beach, FL 33140
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Casa Dei Bambini",'Miami_Beach=' + Miami_Beach.length); Tampa[Tampa.length] = createMarker(new GPoint(-82.57691800,27.99369800),"
Community Montessori School
8411 Civic Road
Tampa, FL 33615
Co-ed school, NS-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Montessori School",'Tampa=' + Tampa.length); Dunedin[Dunedin.length] = createMarker(new GPoint(-82.78278000,28.03771100),"
Dunedin Montessori Academy
637 Michigan Blvd
Dunedin, FL 34698
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dunedin Montessori Academy",'Dunedin=' + Dunedin.length); Lauderhill[Lauderhill.length] = createMarker(new GPoint(-80.24908900,26.19356300),"
Family Montessori
7356 W Comm Blvd
Lauderhill, FL 33319
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Family Montessori",'Lauderhill=' + Lauderhill.length); Homestead[Homestead.length] = createMarker(new GPoint(-80.51701700,25.48406300),"
Kingswood Montessori Academy
20130 Sw 304th Street
Homestead, FL 33030
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kingswood Montessori Academy",'Homestead=' + Homestead.length); Riverview[Riverview.length] = createMarker(new GPoint(-82.27490900,27.85346300),"
Llamas And Learning Montessori School
13227 Boyette Road
Riverview, FL 33569
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Llamas And Learning Montessori School",'Riverview=' + Riverview.length); Maitland[Maitland.length] = createMarker(new GPoint(-81.36174300,28.62840500),"
Maitland Montessori School
200 N Swoope Avenue
Maitland, FL 32751
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maitland Montessori School",'Maitland=' + Maitland.length); Palm_City[Palm_City.length] = createMarker(new GPoint(-80.29330300,27.16420400),"
Martin Downs Montessori School
3001 Sw Mill Creek Way
Palm City, FL 34990
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Martin Downs Montessori School",'Palm_City=' + Palm_City.length); Orlando[Orlando.length] = createMarker(new GPoint(-81.37168900,28.51765700),"
Merris Montessori School
421 E Muriel Street
Orlando, FL 32806
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Merris Montessori School",'Orlando=' + Orlando.length); Miami_Springs[Miami_Springs.length] = createMarker(new GPoint(-80.30533000,25.81967700),"
Miami Springs Montessori
699 Ludlam Drive
Miami Springs, FL 33166
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Miami Springs Montessori",'Miami_Springs=' + Miami_Springs.length); Tampa[Tampa.length] = createMarker(new GPoint(-82.47835400,28.02547200),"
Montessori Academy Of Tampa Bay
1901 W Waters Avenue
Tampa, FL 33604
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Academy Of Tampa Bay",'Tampa=' + Tampa.length); Orlando[Orlando.length] = createMarker(new GPoint(-81.29126000,28.53896300),"
Montessori Bilingual Academy
6912 Lk Underhill Road
Orlando, FL 32822
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Bilingual Academy",'Orlando=' + Orlando.length); Key_West[Key_West.length] = createMarker(new GPoint(-81.79007700,24.55362500),"
Montessori Children's School Of Key West
1221 Varela Street
Key West, FL 33040
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Children's School Of Key West",'Key_West=' + Key_West.length); Lake_Placid[Lake_Placid.length] = createMarker(new GPoint(-81.36624000,27.30143100),"
Montessori Children's School, Inc.
9 Lakeview Street
Lake Placid, FL 33852
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Children's School, Inc.",'Lake_Placid=' + Lake_Placid.length); Tampa[Tampa.length] = createMarker(new GPoint(-82.48525400,27.94325000),"
Montessori Childrens House Of Hyde Park
2416 W Cleveland Street
Tampa, FL 33609
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Childrens House Of Hyde Park",'Tampa=' + Tampa.length); Orlando[Orlando.length] = createMarker(new GPoint(-81.34625500,28.56893700),"
Montessori Children's Academy
1862 East Winter Park Road
Orlando, FL 32803
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Children's Academy",'Orlando=' + Orlando.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.61910000,30.41300000),"
Montessori Learning Center
204 Hospital Drive Ne
Fort Walton Beach, FL 32548
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Learning Center",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Miami[Miami.length] = createMarker(new GPoint(-80.42189900,25.68829200),"
Montessori Learning Center
14092 Sw 84th Street
Miami, FL 33183
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Learning Center",'Miami=' + Miami.length); Temple_Terrace[Temple_Terrace.length] = createMarker(new GPoint(-82.39558700,28.05078500),"
Montessori Preparatory
11302 North 53rd Street
Temple Terrace, FL 33617
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Preparatory",'Temple_Terrace=' + Temple_Terrace.length); Fort_Myers[Fort_Myers.length] = createMarker(new GPoint(-81.86882200,26.56463700),"
Montessori School Of Fort Myers
2151 Crystal Drive
Fort Myers, FL 33907
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Fort Myers",'Fort_Myers=' + Fort_Myers.length); Port_Orange[Port_Orange.length] = createMarker(new GPoint(-81.00712500,29.13144600),"
Montessori School Of Port Orange
3749 South Nova Road
Port Orange, FL 32129
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Port Orange",'Port_Orange=' + Port_Orange.length); Orlando[Orlando.length] = createMarker(new GPoint(-81.39847700,28.38415900),"
Montessori Way School
12601 Balcombe Road
Orlando, FL 32837
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Way School",'Orlando=' + Orlando.length); Davie[Davie.length] = createMarker(new GPoint(-80.25595900,26.05260900),"
Pine Island Montessori
5499 Sw 82nd Avenue
Davie, FL 33328
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pine Island Montessori",'Davie=' + Davie.length); Coconut_Creek[Coconut_Creek.length] = createMarker(new GPoint(-80.17800000,26.25290000),"
Randazzo School
2251 Nw 36th Avenue
Coconut Creek, FL 33066
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Randazzo School",'Coconut_Creek=' + Coconut_Creek.length); Fort_Myers[Fort_Myers.length] = createMarker(new GPoint(-81.88222100,26.58704000),"
Renaissance School Inc
37 Barkley Circle
Fort Myers, FL 33907
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Renaissance School Inc",'Fort_Myers=' + Fort_Myers.length); Clermont[Clermont.length] = createMarker(new GPoint(-81.77173500,28.55416300),"
South Lake Montessori School
983 W Desoto Street
Clermont, FL 34711
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Lake Montessori School",'Clermont=' + Clermont.length); Vero_Beach[Vero_Beach.length] = createMarker(new GPoint(-80.39209500,27.63416300),"
Treasure Coast Montessori School
941 18th Street
Vero Beach, FL 32960
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Treasure Coast Montessori School",'Vero_Beach=' + Vero_Beach.length); Delray_Beach[Delray_Beach.length] = createMarker(new GPoint(-80.07455900,26.48593700),"
Unity School
101 Nw 22nd Street
Delray Beach, FL 33444
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Unity School",'Delray_Beach=' + Delray_Beach.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.63996400,27.81317800),"
Village Montessori
469 45th Avenue North
Saint Petersburg, FL 33703
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Village Montessori",'Saint_Petersburg=' + Saint_Petersburg.length); Wellington[Wellington.length] = createMarker(new GPoint(-80.22310600,26.65806400),"
Wellington Montessori Education
1925 Birkdale Drive
Wellington, FL 33414
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wellington Montessori Education",'Wellington=' + Wellington.length); Boca_Raton[Boca_Raton.length] = createMarker(new GPoint(-80.21128400,26.37283400),"
West Glades Montessori School
20400 Cain Boulevard
Boca Raton, FL 33498
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Glades Montessori School",'Boca_Raton=' + Boca_Raton.length); Miami[Miami.length] = createMarker(new GPoint(-80.35047800,25.60640900),"
Winhold Montessori Schools
17555 S Dixie Highway
Miami, FL 33157
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Winhold Montessori Schools",'Miami=' + Miami.length); Holiday[Holiday.length] = createMarker(new GPoint(-82.73666300,28.18704400),"
World Of Knowledge: A Montessori School
1935 Abacus Road
Holiday, FL 34690
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("World Of Knowledge: A Montessori School",'Holiday=' + Holiday.length); map.removeOverlays(Altamonte_Springs); map.removeOverlays(Boca_Raton); map.removeOverlays(Clearwater); map.removeOverlays(Clermont); map.removeOverlays(Coconut_Creek); map.removeOverlays(Davie); map.removeOverlays(Delray_Beach); map.removeOverlays(Dunedin); map.removeOverlays(Fort_Myers); map.removeOverlays(Fort_Walton_Beach); map.removeOverlays(Holiday); map.removeOverlays(Homestead); map.removeOverlays(Jacksonville); map.removeOverlays(Key_West); map.removeOverlays(Lake_Placid); map.removeOverlays(Lauderhill); map.removeOverlays(Maitland); map.removeOverlays(Miami); map.removeOverlays(Miami_Beach); map.removeOverlays(Miami_Springs); map.removeOverlays(Orlando); map.removeOverlays(Palm_City); map.removeOverlays(Port_Orange); map.removeOverlays(Riverview); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Tampa); map.removeOverlays(Temple_Terrace); map.removeOverlays(Valrico); map.removeOverlays(Vero_Beach); map.removeOverlays(Wellington); setTimeout(function(){map.addOverlays(Altamonte_Springs)},1000); setTimeout(function(){map.addOverlays(Boca_Raton)},1000); setTimeout(function(){map.addOverlays(Clearwater)},1000); setTimeout(function(){map.addOverlays(Clermont)},1000); setTimeout(function(){map.addOverlays(Coconut_Creek)},1000); setTimeout(function(){map.addOverlays(Davie)},1000); setTimeout(function(){map.addOverlays(Delray_Beach)},1000); setTimeout(function(){map.addOverlays(Dunedin)},1000); setTimeout(function(){map.addOverlays(Fort_Myers)},1000); setTimeout(function(){map.addOverlays(Fort_Walton_Beach)},1000); setTimeout(function(){map.addOverlays(Holiday)},1000); setTimeout(function(){map.addOverlays(Homestead)},1000); setTimeout(function(){map.addOverlays(Jacksonville)},1000); setTimeout(function(){map.addOverlays(Key_West)},1000); setTimeout(function(){map.addOverlays(Lake_Placid)},1000); setTimeout(function(){map.addOverlays(Lauderhill)},1000); setTimeout(function(){map.addOverlays(Maitland)},1000); setTimeout(function(){map.addOverlays(Miami)},1000); setTimeout(function(){map.addOverlays(Miami_Beach)},1000); setTimeout(function(){map.addOverlays(Miami_Springs)},1000); setTimeout(function(){map.addOverlays(Orlando)},1000); setTimeout(function(){map.addOverlays(Palm_City)},1000); setTimeout(function(){map.addOverlays(Port_Orange)},1000); setTimeout(function(){map.addOverlays(Riverview)},1000); setTimeout(function(){map.addOverlays(Saint_Petersburg)},1000); setTimeout(function(){map.addOverlays(Tampa)},1000); setTimeout(function(){map.addOverlays(Temple_Terrace)},1000); setTimeout(function(){map.addOverlays(Valrico)},1000); setTimeout(function(){map.addOverlays(Vero_Beach)},1000); setTimeout(function(){map.addOverlays(Wellington)},1000); maxLng = -80.07455900; maxLat = 30.41300000; minLng = -86.61910000; minLat = 24.55362500; reCenterMap(); } // 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(Altamonte_Springs); map.removeOverlays(Boca_Raton); map.removeOverlays(Clearwater); map.removeOverlays(Clermont); map.removeOverlays(Coconut_Creek); map.removeOverlays(Davie); map.removeOverlays(Delray_Beach); map.removeOverlays(Dunedin); map.removeOverlays(Fort_Myers); map.removeOverlays(Fort_Walton_Beach); map.removeOverlays(Holiday); map.removeOverlays(Homestead); map.removeOverlays(Jacksonville); map.removeOverlays(Key_West); map.removeOverlays(Lake_Placid); map.removeOverlays(Lauderhill); map.removeOverlays(Maitland); map.removeOverlays(Miami); map.removeOverlays(Miami_Beach); map.removeOverlays(Miami_Springs); map.removeOverlays(Orlando); map.removeOverlays(Palm_City); map.removeOverlays(Port_Orange); map.removeOverlays(Riverview); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Tampa); map.removeOverlays(Temple_Terrace); map.removeOverlays(Valrico); map.removeOverlays(Vero_Beach); map.removeOverlays(Wellington); 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(Jacksonville);map.removeOverlays(Altamonte_Springs); map.removeOverlays(Boca_Raton); map.removeOverlays(Clearwater); map.removeOverlays(Clermont); map.removeOverlays(Coconut_Creek); map.removeOverlays(Davie); map.removeOverlays(Delray_Beach); map.removeOverlays(Dunedin); map.removeOverlays(Fort_Myers); map.removeOverlays(Fort_Walton_Beach); map.removeOverlays(Holiday); map.removeOverlays(Homestead); map.removeOverlays(Jacksonville); map.removeOverlays(Key_West); map.removeOverlays(Lake_Placid); map.removeOverlays(Lauderhill); map.removeOverlays(Maitland); map.removeOverlays(Miami); map.removeOverlays(Miami_Beach); map.removeOverlays(Miami_Springs); map.removeOverlays(Orlando); map.removeOverlays(Palm_City); map.removeOverlays(Port_Orange); map.removeOverlays(Riverview); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Tampa); map.removeOverlays(Temple_Terrace); map.removeOverlays(Valrico); map.removeOverlays(Vero_Beach); map.removeOverlays(Wellington); map.addOverlays(Altamonte_Springs); centerByArray(Altamonte_Springs, false, false); cntMarker += Altamonte_Springs.length; map.addOverlays(Boca_Raton); centerByArray(Boca_Raton, false, false); cntMarker += Boca_Raton.length; map.addOverlays(Clearwater); centerByArray(Clearwater, false, false); cntMarker += Clearwater.length; map.addOverlays(Clermont); centerByArray(Clermont, false, false); cntMarker += Clermont.length; map.addOverlays(Coconut_Creek); centerByArray(Coconut_Creek, false, false); cntMarker += Coconut_Creek.length; map.addOverlays(Davie); centerByArray(Davie, false, false); cntMarker += Davie.length; map.addOverlays(Delray_Beach); centerByArray(Delray_Beach, false, false); cntMarker += Delray_Beach.length; map.addOverlays(Dunedin); centerByArray(Dunedin, false, false); cntMarker += Dunedin.length; map.addOverlays(Fort_Myers); centerByArray(Fort_Myers, false, false); cntMarker += Fort_Myers.length; map.addOverlays(Fort_Walton_Beach); centerByArray(Fort_Walton_Beach, false, false); cntMarker += Fort_Walton_Beach.length; map.addOverlays(Holiday); centerByArray(Holiday, false, false); cntMarker += Holiday.length; map.addOverlays(Homestead); centerByArray(Homestead, false, false); cntMarker += Homestead.length; map.addOverlays(Jacksonville); centerByArray(Jacksonville, false, false); cntMarker += Jacksonville.length; map.addOverlays(Key_West); centerByArray(Key_West, false, false); cntMarker += Key_West.length; map.addOverlays(Lake_Placid); centerByArray(Lake_Placid, false, false); cntMarker += Lake_Placid.length; map.addOverlays(Lauderhill); centerByArray(Lauderhill, false, false); cntMarker += Lauderhill.length; map.addOverlays(Maitland); centerByArray(Maitland, false, false); cntMarker += Maitland.length; map.addOverlays(Miami); centerByArray(Miami, false, false); cntMarker += Miami.length; map.addOverlays(Miami_Beach); centerByArray(Miami_Beach, false, false); cntMarker += Miami_Beach.length; map.addOverlays(Miami_Springs); centerByArray(Miami_Springs, false, false); cntMarker += Miami_Springs.length; map.addOverlays(Orlando); centerByArray(Orlando, false, false); cntMarker += Orlando.length; map.addOverlays(Palm_City); centerByArray(Palm_City, false, false); cntMarker += Palm_City.length; map.addOverlays(Port_Orange); centerByArray(Port_Orange, false, false); cntMarker += Port_Orange.length; map.addOverlays(Riverview); centerByArray(Riverview, false, false); cntMarker += Riverview.length; map.addOverlays(Saint_Petersburg); centerByArray(Saint_Petersburg, false, false); cntMarker += Saint_Petersburg.length; map.addOverlays(Tampa); centerByArray(Tampa, false, false); cntMarker += Tampa.length; map.addOverlays(Temple_Terrace); centerByArray(Temple_Terrace, false, false); cntMarker += Temple_Terrace.length; map.addOverlays(Valrico); centerByArray(Valrico, false, false); cntMarker += Valrico.length; map.addOverlays(Vero_Beach); centerByArray(Vero_Beach, false, false); cntMarker += Vero_Beach.length; map.addOverlays(Wellington); centerByArray(Wellington, false, false); cntMarker += Wellington.length; centerByArray(Jacksonville,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///6861,5927,7302,5988,7489,6861,7256,7253,34737,6666,6872,6663,7328,6545,7339,6654,34738,7384,6608,7454,7322,6072,6641,34739,7399,6650,7457,6621,6669,7442,34741,6147,34740,6647,7449,35368,7224,7516,/all'); //window.open('/map.php?type=2&schools=6861,5927,7302,5988,7489,6861,7256,7253,34737,6666,6872,6663,7328,6545,7339,6654,34738,7384,6608,7454,7322,6072,6641,34739,7399,6650,7457,6621,6669,7442,34741,6147,34740,6647,7449,35368,7224,7516,&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; }