function addMarkers() { mySelect = document.getElementById('selection'); Sarasota = [];North_Port = [];Englewood = [];Venice = [];Nokomis = [];Osprey = [];Nakomis = [];mySelect.options[mySelect.options.length] = new Option("Englewood schools",'all=Englewood'); mySelect.options[mySelect.options.length] = new Option("Nakomis schools",'all=Nakomis'); mySelect.options[mySelect.options.length] = new Option("Nokomis schools",'all=Nokomis'); mySelect.options[mySelect.options.length] = new Option("North Port schools",'all=North_Port'); mySelect.options[mySelect.options.length] = new Option("Osprey schools",'all=Osprey'); mySelect.options[mySelect.options.length] = new Option("Sarasota schools",'all=Sarasota'); mySelect.options[mySelect.options.length] = new Option("Venice schools",'all=Venice'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.51805115,27.32485771),"
Alta Vista Elementary School
1050 S Euclid Street
Sarasota, FL 34237

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Alta Vista Elementary School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.46672821,27.27646255),"
Ashton Elementary School
5110 Ashton Road
Sarasota, FL 34233

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ashton Elementary School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.55094910,27.36174583),"
Bay Haven School Of Basics Plus
2901 W Tamiami Circle
Sarasota, FL 34234

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bay Haven School Of Basics Plus",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53862000,27.36381721),"
Booker High School
3201 N Orange Avenue
Sarasota, FL 34234

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Booker High School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52682495,27.36709976),"
Booker Middle School
2250 Myrtle Street
Sarasota, FL 34234

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Booker Middle School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.47297200,27.31062500),"
Brentwood Elementary School
2500 Vinson Avenue
Sarasota, FL 34232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brentwood Elementary School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52245331,27.30099869),"
Brookside Middle School
3636 S Shade Avenue
Sarasota, FL 34239

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Brookside Middle School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52625275,27.33680153),"
Character House
41 North School Ave
Sarasota, FL 34237

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Character House",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53850200,27.35251800),"
Children First
1723 N Orange Ave
Sarasota, FL 34236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Children First",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.47923900,27.36475000),"
Children's Haven
84405 Desoto Road
Sarasota, FL 34235

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Children's Haven",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.64457703,27.52359962),"
Children's Haven (formerly School # 9004)
4405 Desoto Road
Sarasota, FL 34235

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Children's Haven (formerly School # 9004)",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53932000,27.33566400),"
Coastal Behavioral Healthcare Residential Treatmen
1565 State Road
Sarasota, FL 34236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Coastal Behavioral Healthcare Residential Treatmen",'Sarasota=' + Sarasota.length); North_Port[North_Port.length] = createMarker(new GPoint(-82.12079620,27.05159950),"
Cranberry Elementary School
2775 Shalimar Terrace
North Port, FL 34286

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cranberry Elementary School",'North_Port=' + North_Port.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49752045,27.28694153),"
Cyesis
4430 Beneva Road
Sarasota, FL 34233

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cyesis",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53090668,27.33646965),"
Emma E. Booker Elementary School
2350 Martin L King Way
Sarasota, FL 34234

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Emma E. Booker Elementary School",'Sarasota=' + Sarasota.length); Englewood[Englewood.length] = createMarker(new GPoint(-82.35725403,26.96515656),"
Englewood Elementary School
150 N Mccall Road
Englewood, FL 34223

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Englewood Elementary School",'Englewood=' + Englewood.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52686600,27.33824900),"
Ephrata Middle School
P O Box 48367
Sarasota, FL 34234

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ephrata Middle School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53134918,27.28026581),"
Ese Special Programs
1960 Landings Boulevard
Sarasota, FL 34231

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ese Special Programs",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.47744400,27.35216500),"
Florida Center For Child And Family Developmen
4620 17th St
Sarasota, FL 34235

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Florida Center For Child And Family Developmen",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.46354675,27.33087158),"
Fruitville Elementary School
601 Honore Avenue
Sarasota, FL 34232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fruitville Elementary School",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.39997864,27.07876205),"
Garden Elementary School
700 Center Road
Venice, FL 34285

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Garden Elementary School",'Venice=' + Venice.length); North_Port[North_Port.length] = createMarker(new GPoint(-82.23621368,27.07685852),"
Glenallen Elementary School
7050 Glenallen Boulevard
North Port, FL 34287

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Glenallen Elementary School",'North_Port=' + North_Port.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49984741,27.36316299),"
Gocio Elementary School
3450 Gocio Road
Sarasota, FL 34235

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gocio Elementary School",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.44325256,27.09825134),"
Gulf Coast Marine Institute
220 Bahama Street
Venice, FL 34285

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gulf Coast Marine Institute",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53691101,27.34636307),"
Gulf Coast Vocational Institute
1684 Eleventh Street
Sarasota, FL 34236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gulf Coast Vocational Institute",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.50595093,27.26099968),"
Gulf Gate Elementary School
6500 S Lockwood Ridge Roa
Sarasota, FL 34231

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gulf Gate Elementary School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48064423,27.33020782),"
Infinity Middle School/sarasota
705 S Mcintosh Road
Sarasota, FL 34232

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Infinity Middle School/sarasota",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.38682000,27.10180900),"
Island Village Montessori Middle School
2001 Pine Brook Rd
Venice, FL 34292

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Island Village Montessori Middle School",'Venice=' + Venice.length); Venice[Venice.length] = createMarker(new GPoint(-82.41696167,27.12175941),"
Island Village Montessori School
2001 Pinebrook Road
Venice, FL 34292

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Island Village Montessori School",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48923100,27.33753100),"
Island Village North
3975 Fruitville Rd
Sarasota, FL 34232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Island Village North",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.42398834,27.27423477),"
Lakeview Elementary School
7299 Proctor Road
Sarasota, FL 34241

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lakeview Elementary School",'Sarasota=' + Sarasota.length); Nokomis[Nokomis.length] = createMarker(new GPoint(-82.42489624,27.13736153),"
Laurel Nokomis School
1900 E Laurel Road
Nokomis, FL 34275

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Laurel Nokomis School",'Nokomis=' + Nokomis.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48064423,27.33024406),"
Mcintosh Middle School
701 Mcintosh Road
Sarasota, FL 34232

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcintosh Middle School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.33184814,27.24247932),"
Myakka Stop Camp (inactiv
13220 State Road 72
Sarasota, FL 34241

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Myakka Stop Camp (inactiv",'Sarasota=' + Sarasota.length); North_Port[North_Port.length] = createMarker(new GPoint(-82.23003387,27.07425117),"
New Middle Dd
6501 W Price Boulevard
North Port, FL 34286

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Middle Dd",'North_Port=' + North_Port.length); North_Port[North_Port.length] = createMarker(new GPoint(-82.22829437,27.07368660),"
North Port High School
6400 W Price Boulevard
North Port, FL 34286

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Port High School",'North_Port=' + North_Port.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.42420959,27.27452469),"
Oak Park School
7285 Proctor Road
Sarasota, FL 34241

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oak Park School",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.35624800,27.07883200),"
Oak Park South
1900 Center Road
Venice, FL 34292

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oak Park South",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49748230,27.28994179),"
Opportunity High School (formerly Milburn Dropou
4458 Beneva Road
Sarasota, FL 34233

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Opportunity High School (formerly Milburn Dropou",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53054810,27.28507233),"
Phillippi Shores Elementary School
4747 S Tamiami Trail
Sarasota, FL 34231

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Phillippi Shores Elementary School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52188000,27.32373800),"
Phoenix School
1085 S Shade Ave
Sarasota, FL 34237

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phoenix School",'Sarasota=' + Sarasota.length); Osprey[Osprey.length] = createMarker(new GPoint(-82.48162079,27.18881989),"
Pine View School For Gifted
1 Python Path
Osprey, FL 34229

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pine View School For Gifted",'Osprey=' + Osprey.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.43936100,27.25247800),"
Pinnacle Academy, Inc.
6431 Jackie Lynn Court
Sarasota, FL 34241

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pinnacle Academy, Inc.",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52520000,27.37709200),"
Richard Milburn Academy Of Florida
2207 Industrial Boulevard
Sarasota, FL 34234

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Richard Milburn Academy Of Florida",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.51785278,27.28266335),"
Riverview High School
1 Ram Way
Sarasota, FL 34231

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverview High School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53488922,27.35606384),"
Roy Mcbean Charter School (inactiv
1790 21st Street
Sarasota, FL 34234

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Roy Mcbean Charter School (inactiv",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.51635500,27.26818000),"
Sarasota County Superintendent's Office
01960 Landings Boulevard
Sarasota, FL 34231

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sarasota County Superintendent's Office",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49755096,27.28518677),"
Sarasota County Technical Institute High School
4748 Beneva Road
Sarasota, FL 34233

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sarasota County Technical Institute High School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52595520,27.32538033),"
Sarasota High School
1000 S School Avenue
Sarasota, FL 34237

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sarasota High School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.47190857,27.27646255),"
Sarasota Middle School
4826 Ashton Road
Sarasota, FL 34233

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sarasota Middle School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53865051,27.34324265),"
Sarasota Military Academy
801 N Orange Avenue
Sarasota, FL 34236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sarasota Military Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.54275513,27.34176826),"
Sarasota School Of Arts/sciences
645 Central Avenue
Sarasota, FL 34236

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sarasota School Of Arts/sciences",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48086000,27.33544400),"
Sarasota Suncoast Academy
133 Mcintosh Road
Sarasota, FL 34232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sarasota Suncoast Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53182100,27.30829700),"
Southside Elementary School
1901 Webber Street
Sarasota, FL 34239

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southside Elementary School",'Sarasota=' + Sarasota.length); Nakomis[Nakomis.length] = createMarker(new GPoint(-10.00000000,10.00000000),"
Student Leadership Academy
Post Office Box 93
Nakomis, FL 34274

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Student Leadership Academy",'Nakomis=' + Nakomis.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.51151276,27.26218987),"
Suncoast School
1300 South Tuttle Avenue
Sarasota, FL 34239

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Suncoast School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.41655700,27.33100300),"
Tatum Ridge Elementary School
4100 Tatum Road
Sarasota, FL 34240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tatum Ridge Elementary School",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.35845184,27.04708862),"
Taylor Ranch Elementary School
2500 Taylor Ranch Trail
Venice, FL 34293

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Taylor Ranch Elementary School",'Venice=' + Venice.length); North_Port[North_Port.length] = createMarker(new GPoint(-82.14886475,27.06736374),"
Toledo Blade Elementary School
1201 Geranium Avenue
North Port, FL 34288

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Toledo Blade Elementary School",'North_Port=' + North_Port.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53134918,27.28026581),"
Triad
4405 Sawyer Road
Sarasota, FL 34233

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Triad",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.51219940,27.34323692),"
Tuttle Elementary School
2863 8th Street
Sarasota, FL 34237

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tuttle Elementary School",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.45000900,27.09944500),"
Venice Elementary School
301 Bahama Street
Venice, FL 34285

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Venice Elementary School",'Venice=' + Venice.length); Venice[Venice.length] = createMarker(new GPoint(-82.35904694,27.07876205),"
Venice Middle School
1900 Center Road
Venice, FL 34292

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Venice Middle School",'Venice=' + Venice.length); Venice[Venice.length] = createMarker(new GPoint(-82.43679810,27.09620094),"
Venice Senior High School
1 Indian Avenue
Venice, FL 34285

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Venice Senior High School",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.50034332,27.29136276),"
Wilkinson Elementary School
3400 Wilkinson Road
Sarasota, FL 34231

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wilkinson Elementary School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52686600,27.33824900),"
Wings Academy
P O Box 48367
Sarasota, FL 34234

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wings Academy",'Sarasota=' + Sarasota.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(Englewood); map.removeOverlays(Nakomis); map.removeOverlays(Nokomis); map.removeOverlays(North_Port); map.removeOverlays(Osprey); map.removeOverlays(Sarasota); map.removeOverlays(Venice); 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(Sarasota);map.removeOverlays(Englewood); map.removeOverlays(Nakomis); map.removeOverlays(Nokomis); map.removeOverlays(North_Port); map.removeOverlays(Osprey); map.removeOverlays(Sarasota); map.removeOverlays(Venice); map.addOverlays(Englewood); centerByArray(Englewood, false, false); cntMarker += Englewood.length; map.addOverlays(Nakomis); centerByArray(Nakomis, false, false); cntMarker += Nakomis.length; map.addOverlays(Nokomis); centerByArray(Nokomis, false, false); cntMarker += Nokomis.length; map.addOverlays(North_Port); centerByArray(North_Port, false, false); cntMarker += North_Port.length; map.addOverlays(Osprey); centerByArray(Osprey, false, false); cntMarker += Osprey.length; map.addOverlays(Sarasota); centerByArray(Sarasota, false, false); cntMarker += Sarasota.length; map.addOverlays(Venice); centerByArray(Venice, false, false); cntMarker += Venice.length; centerByArray(Sarasota,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'); } }