function addMarkers() { mySelect = document.getElementById('selection'); Tallahassee = [];Woodville = [];mySelect.options[mySelect.options.length] = new Option("Tallahassee schools",'all=Tallahassee'); mySelect.options[mySelect.options.length] = new Option("Woodville schools",'all=Woodville'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33805847,30.44699287),"
Academic Resource Center
526 N Appleyard Drive
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academic Resource Center",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.34053500,30.44864600),"
Academy Of Academics & Technology
500 N Appleyard Drive
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy Of Academics & Technology",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.24849701,30.31100082),"
Adolescent Drug Treatment
3333 W. Pensacola Street
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adolescent Drug Treatment",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.31536102,30.46346283),"
Amos P. Godby High School
1717 W Tharpe Street
Tallahassee, FL 32303

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Amos P. Godby High School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.21456909,30.43617439),"
Apalachee Elementary School
650 Trojan Trail
Tallahassee, FL 32311

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Apalachee Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.32276917,30.47616005),"
Astoria Park Elementary School
2465 Atlas Road
Tallahassee, FL 32303

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Astoria Park Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.28567505,30.46356392),"
Augusta Raa Middle School
401 W Tharpe Street
Tallahassee, FL 32303

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Augusta Raa Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.32247162,30.43801880),"
Belle Vue Middle School
2214 Belle Vue Way
Tallahassee, FL 32304

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Belle Vue Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.29525757,30.41953850),"
Bond Elementary School
2813 S Meridian Street
Tallahassee, FL 32301

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bond Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.18286133,30.47244072),"
Buck Lake Elementary School
1600 Pedrick Road
Tallahassee, FL 32317

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Buck Lake Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.28655243,30.44487190),"
C.k. Steele/leroy Collins Char Middle School
428 W Tennessee Street
Tallahassee, FL 32301

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("C.k. Steele/leroy Collins Char Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.34680939,30.51241684),"
Canopy Oaks Elementary School
3250 Point View Drive
Tallahassee, FL 32303

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Canopy Oaks Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.31718445,30.43443680),"
Caroline Brevard Elementary School
2006 Jackson Bluff Road
Tallahassee, FL 32304

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Caroline Brevard Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.12568665,30.43740654),"
Chaires Elementary School
4774 Chaires Cross Road
Tallahassee, FL 32317

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chaires Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.34156036,30.45693207),"
County-wide Exceptional Student Education Elementary School
500 N. Appleyard Drive
Tallahassee, FL 32304

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("County-wide Exceptional Student Education Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.27967072,30.43807983),"
Deerlake Middle School
9902 Deer Lake Road W
Tallahassee, FL 32312

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Deerlake Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.22771454,30.53763962),"
Desoto Trail Elementary School
2930 Velda Dairy Road
Tallahassee, FL 32309

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Desoto Trail Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.26863861,30.45196533),"
Elizabeth Cobb Middle School
915 Hillcrest Street
Tallahassee, FL 32308

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Elizabeth Cobb Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.26879883,30.40068245),"
Fairview Middle School
3415 Zillah Street
Tallahassee, FL 32305

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fairview Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.27967072,30.43807983),"
Florida A & M University High School
444 Gamble Street
Tallahassee, FL 32307

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Florida A & M University High School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.22619629,30.38292694),"
Florida State University School
3000 School House Road
Tallahassee, FL 32311

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Florida State University School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.51485443,30.43723679),"
Fort Braden Elementary School
15100 Blountstown Highway
Tallahassee, FL 32310

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fort Braden Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.25737000,30.43322182),"
Frank Hartsfield Elementary School
1414 Chowkeebin Nene
Tallahassee, FL 32301

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Frank Hartsfield Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.25830078,30.50351334),"
Gilchrist Elementary School
1301 Timberlane Road
Tallahassee, FL 32312

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gilchrist Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.34156036,30.45693207),"
Gretchen Everhart School
2750 Mission Road
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gretchen Everhart School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.29652405,30.45659256),"
Griffin Middle School
800 Alabama Street
Tallahassee, FL 32304

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Griffin Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.27382660,30.55831528),"
Hawks Rise Elementary School
205 Meadow Ridge Drive
Tallahassee, FL 32312

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hawks Rise Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33363342,30.44127274),"
Hospital/homebound
2757 West Pensacola St.
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hospital/homebound",'Tallahassee=' + Tallahassee.length); Woodville[Woodville.length] = createMarker(new GPoint(-84.24849701,30.31100082),"
J.u.s.t.
P. O. Box 568
Woodville, FL 32362

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("J.u.s.t.",'Woodville=' + Woodville.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.26377869,30.40876770),"
James Rickards High School
3013 Jim Lee Road
Tallahassee, FL 32301

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("James Rickards High School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.30706024,30.45913696),"
John G Riley Elementary School
1400 Indiana Street
Tallahassee, FL 32304

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John G Riley Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.26716614,30.45332718),"
Kate Sullivan Elementary School
927 Miccosukee Road
Tallahassee, FL 32308

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kate Sullivan Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.27967072,30.43807983),"
Killearn Lakes Elementary School
8037 Deer Lake Drive E
Tallahassee, FL 32312

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Killearn Lakes Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.21137238,30.56919670),"
Lawton Chiles High School
7200 Lawton Chiles Lane
Tallahassee, FL 32312

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lawton Chiles High School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33869934,30.41526222),"
Leon Co Juvenile Detention Center
2303 Ron Ellis Drive
Tallahassee, FL 32310

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Leon Co Juvenile Detention Center",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33136200,30.44955600),"
Leon County Superintendent's Office
72757 W Pensacola Street
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Leon County Superintendent's Office",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.21422300,30.43737700),"
Leon Countywide Adult Education Prog
283 Trojan Trail
Tallahassee, FL 32311

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Leon Countywide Adult Education Prog",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.27464294,30.44483757),"
Leon High School
550 E Tennessee St
Tallahassee, FL 32308

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Leon High School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.27693939,30.41297531),"
Leonard Wesson Elementary School
2813 S Meridian St
Tallahassee, FL 32301

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leonard Wesson Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33805847,30.44674110),"
Lewis M. Lively Area Vocational-technical High School
500 N Appleyard Drive
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lewis M. Lively Area Vocational-technical High School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.28796387,30.46153641),"
Lillian Ruediger Elementary School
526 W 10th Avenue
Tallahassee, FL 32303

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lillian Ruediger Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.21360016,30.43464088),"
Lincoln High School
3838 Trojan Trail
Tallahassee, FL 32311

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lincoln High School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.28270721,30.38436890),"
Oak Ridge Elementary School
4530 Shelfer Road
Tallahassee, FL 32305

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Ridge Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.26879120,30.40078354),"
Pace Center
3413 Zillah Street
Tallahassee, FL 32305

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pace Center",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.23600006,30.43227386),"
Pace Center For Girls
1344 Cross Creek Way
Tallahassee, FL 32301

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pace Center For Girls",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.30245972,30.41936111),"
Pineview Elementary School
2230 Lake Bradford Road
Tallahassee, FL 32310

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pineview Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.29533386,30.41246223),"
R. Frank Nims Middle School
723 W Orange Ave
Tallahassee, FL 32310

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("R. Frank Nims Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33922577,30.39776230),"
Rattler Success Center
3420 Capital Circle Sw
Tallahassee, FL 32310

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rattler Success Center",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.19097137,30.52637291),"
Roberts Elementary School
5777 Centerville Road
Tallahassee, FL 32309

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roberts Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33377838,30.42714310),"
Sabal Palm Elementary School
2813 Ridgeway Street
Tallahassee, FL 32310

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sabal Palm Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.28823853,30.44987679),"
Sail
725 N Macomb Street
Tallahassee, FL 32303

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sail",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.32979584,30.43029785),"
Sawmill Academy For Girls
2609-e Springhill Road
Tallahassee, FL 32305

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sawmill Academy For Girls",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.25485992,30.49143791),"
School Of Arts & Sciences
3208 Thomasville Road
Tallahassee, FL 32308

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("School Of Arts & Sciences",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.29414368,30.47923470),"
Sealey Elementary School
2815 Allen Road
Tallahassee, FL 32312

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sealey Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.32979584,30.43029785),"
Second Chance School
2600 Plant Street
Tallahassee, FL 32304

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Second Chance School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33922577,30.39776230),"
Seminole Work And Learn Center
3420 Capital Circle Sw
Tallahassee, FL 32310

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seminole Work And Learn Center",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.34042358,30.49392700),"
Springwood Elementary School
3801 Fred George Road
Tallahassee, FL 32303

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Springwood Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.18312073,30.44923782),"
Swift Creek Middle School
2100 Pedrick Road
Tallahassee, FL 32317

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Swift Creek Middle School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.33232117,30.46553612),"
Tallahassee Marine Institute
2514 W Tharpe Street
Tallahassee, FL 32303

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tallahassee Marine Institute",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.21037292,30.47350883),"
Walter T. Moore, Junior Elementary School
1706 Dempsey Mayo Road
Tallahassee, FL 32308

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walter T. Moore, Junior Elementary School",'Tallahassee=' + Tallahassee.length); Tallahassee[Tallahassee.length] = createMarker(new GPoint(-84.24751282,30.31467438),"
Woodville Elementary School
9373 Woodville Highway
Tallahassee, FL 32305

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Woodville Elementary School",'Tallahassee=' + Tallahassee.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(Tallahassee); map.removeOverlays(Woodville); 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(Tallahassee);map.removeOverlays(Tallahassee); map.removeOverlays(Woodville); map.addOverlays(Tallahassee); centerByArray(Tallahassee, false, false); cntMarker += Tallahassee.length; map.addOverlays(Woodville); centerByArray(Woodville, false, false); cntMarker += Woodville.length; centerByArray(Tallahassee,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'); } }