function addMarkers() { mySelect = document.getElementById('selection'); Greenland = [];Fayetteville = [];Springdale = [];Elkins = [];Farmington = [];Lincoln = [];Prairie_Grove = [];West_Fork = [];Winslow = [];mySelect.options[mySelect.options.length] = new Option("Elkins schools",'all=Elkins'); mySelect.options[mySelect.options.length] = new Option("Farmington schools",'all=Farmington'); mySelect.options[mySelect.options.length] = new Option("Fayetteville schools",'all=Fayetteville'); mySelect.options[mySelect.options.length] = new Option("Greenland schools",'all=Greenland'); mySelect.options[mySelect.options.length] = new Option("Lincoln schools",'all=Lincoln'); mySelect.options[mySelect.options.length] = new Option("Prairie Grove schools",'all=Prairie_Grove'); mySelect.options[mySelect.options.length] = new Option("Springdale schools",'all=Springdale'); mySelect.options[mySelect.options.length] = new Option("West Fork schools",'all=West_Fork'); mySelect.options[mySelect.options.length] = new Option("Winslow schools",'all=Winslow'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Greenland[Greenland.length] = createMarker(new GPoint(-94.17340088,35.99399948),"
Ar School For Info Sys & Technology
P.o. Box 57
Greenland, AR 72737

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ar School For Info Sys & Technology",'Greenland=' + Greenland.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.18843079,36.08204269),"
Asbell Elementary School
1500 N. Sang Ave.
Fayetteville, AR 72701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Asbell Elementary School",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.11096200,36.20577200),"
Bayyari Elementary School
2199 Scottsdale St
Springdale, AR 72764

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bayyari Elementary School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.20598602,36.18411636),"
Bernice Young Elementary School
301 Pippen Apple Cir
Springdale, AR 72762

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bernice Young Elementary School",'Springdale=' + Springdale.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.13339996,36.10598755),"
Butterfield Elementary School
3050 Old Missouri
Fayetteville, AR 72703

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Butterfield Elementary School",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.16166687,36.18908310),"
Central Junior High School
2811 W. Huntsville
Springdale, AR 72762

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Central Junior High School",'Springdale=' + Springdale.length); Elkins[Elkins.length] = createMarker(new GPoint(-94.01052900,36.00076000),"
Elkins Elem. Primary School
476 North Center
Elkins, AR 72727

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elkins Elem. Primary School",'Elkins=' + Elkins.length); Elkins[Elkins.length] = createMarker(new GPoint(-93.99199677,36.01720047),"
Elkins Elementary School
349 N Center
Elkins, AR 72727

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elkins Elementary School",'Elkins=' + Elkins.length); Elkins[Elkins.length] = createMarker(new GPoint(-93.99199677,36.01720047),"
Elkins High School
349 N Center
Elkins, AR 72727

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elkins High School",'Elkins=' + Elkins.length); Elkins[Elkins.length] = createMarker(new GPoint(-93.99199677,36.01720047),"
Elkins Middle School
349 N. Center
Elkins, AR 72727

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Elkins Middle School",'Elkins=' + Elkins.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.14756775,36.18951416),"
Elmdale Elementary School
420 N. West End
Springdale, AR 72764

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elmdale Elementary School",'Springdale=' + Springdale.length); Farmington[Farmington.length] = createMarker(new GPoint(-94.25316620,36.03976059),"
Farmington High School
278 W. Main
Farmington, AR 72730

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Farmington High School",'Farmington=' + Farmington.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.17372131,36.05931473),"
Fayetteville High School East
1001 W Stone
Fayetteville, AR 72701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fayetteville High School East",'Fayetteville=' + Fayetteville.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.19307709,36.05650330),"
Fayetteville High School West
2350 Old Farmington
Fayetteville, AR 72702

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fayetteville High School West",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.12616730,36.15986252),"
George Elementary School
2878 S. Powell
Springdale, AR 72764

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("George Elementary School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.12612300,36.15575600),"
George Junior High School
3200 S. Powell
Springdale, AR 72764

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("George Junior High School",'Springdale=' + Springdale.length); Farmington[Farmington.length] = createMarker(new GPoint(-94.25392914,36.03933716),"
George R. Ledbetter Elementary School
14 N. Dbl Springs Rd
Farmington, AR 72730

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("George R. Ledbetter Elementary School",'Farmington=' + Farmington.length); Greenland[Greenland.length] = createMarker(new GPoint(-94.17500305,35.99409866),"
Greenland Elementary School
P O Box 57
Greenland, AR 72737

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Greenland Elementary School",'Greenland=' + Greenland.length); Greenland[Greenland.length] = createMarker(new GPoint(-94.17500305,35.99409866),"
Greenland High School
P O Box 57
Greenland, AR 72737

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greenland High School",'Greenland=' + Greenland.length); Greenland[Greenland.length] = createMarker(new GPoint(-94.17304993,35.99460983),"
Greenland Middle School
55 N Sandy
Greenland, AR 72737

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Greenland Middle School",'Greenland=' + Greenland.length); Farmington[Farmington.length] = createMarker(new GPoint(-94.28921300,36.04332400),"
Haas Hall Academy
13370 Rheas Mill Rd
Farmington, AR 72730

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Haas Hall Academy",'Farmington=' + Farmington.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.13305664,36.05831146),"
Happy Hollow Elementary School
300 South Ray
Fayetteville, AR 72701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Happy Hollow Elementary School",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.21030700,36.18670600),"
Har-ber High School
300 Jones Road
Springdale, AR 72762

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Har-ber High School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.09476471,36.16006088),"
Harp Elementary School
2700 Butterfield Coa
Springdale, AR 72764

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harp Elementary School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.17536926,36.15556335),"
Helen Tyson Middle School
3304 S. 40th
Springdale, AR 72762

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Helen Tyson Middle School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.19605700,36.18631000),"
Hellstern Middle School
7771 Har-ber Avenue
Springdale, AR 72762

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hellstern Middle School",'Springdale=' + Springdale.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.20762634,36.10503769),"
Holcomb Elementary School
2900 N. Salem Rd.
Fayetteville, AR 72704

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Holcomb Elementary School",'Fayetteville=' + Fayetteville.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.21517181,36.09201813),"
Holt Middle School
2365 N Rupple Rd.
Fayetteville, AR 72704

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Holt Middle School",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.11048126,36.16666412),"
J. O. Kelly Middle School
1879 E. Robinson
Springdale, AR 72764

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("J. O. Kelly Middle School",'Springdale=' + Springdale.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.15795135,36.05607605),"
Jefferson Elementary School
612 South College
Fayetteville, AR 72702

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Fayetteville=' + Fayetteville.length); Farmington[Farmington.length] = createMarker(new GPoint(-94.23595300,36.05238100),"
Jerry Pop Williams Elementary School
322 N. Broyles St.
Farmington, AR 72730

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jerry Pop Williams Elementary School",'Farmington=' + Farmington.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.15625000,36.16384888),"
John Tyson Elementary School
1967 Chapman
Springdale, AR 72762

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John Tyson Elementary School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.12578583,36.17517471),"
Jones Elementary School
900 S. Powell
Springdale, AR 72764

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jones Elementary School",'Springdale=' + Springdale.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.17610168,36.07413864),"
Leverett Elementary School
1124 W. Cleveland
Fayetteville, AR 72702

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leverett Elementary School",'Fayetteville=' + Fayetteville.length); Lincoln[Lincoln.length] = createMarker(new GPoint(-94.37729645,35.93330002),"
Lincoln Elementary School
613 County Ave
Lincoln, AR 72744

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Lincoln=' + Lincoln.length); Lincoln[Lincoln.length] = createMarker(new GPoint(-94.37729645,35.93330002),"
Lincoln High School
201 E School St
Lincoln, AR 72744

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lincoln High School",'Lincoln=' + Lincoln.length); Lincoln[Lincoln.length] = createMarker(new GPoint(-94.37729645,35.93330002),"
Lincoln Middle School
107 E School St
Lincoln, AR 72744

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lincoln Middle School",'Lincoln=' + Lincoln.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.18946838,36.05805588),"
M. O. Ramey Junior High School
401 S. Sang Avenue
Fayetteville, AR 72701

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("M. O. Ramey Junior High School",'Fayetteville=' + Fayetteville.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.11801147,36.08787537),"
Mcnair Middle School
3030 E. Mission Blvd
Fayetteville, AR 72703

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcnair Middle School",'Fayetteville=' + Fayetteville.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.19287300,36.05632500),"
Nw Ark. Community Coll Regional Tech Ctr.
2350 Old Farmington
Fayetteville, AR 72701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nw Ark. Community Coll Regional Tech Ctr.",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.10638428,36.17188644),"
Parsons Hills Elementary School
2326 Cardinal Dr.
Springdale, AR 72764

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parsons Hills Elementary School",'Springdale=' + Springdale.length); Prairie_Grove[Prairie_Grove.length] = createMarker(new GPoint(-94.32212830,35.98503876),"
Prairie Grove Elementary School
300 Ed Staggs Dr.
Prairie Grove, AR 72753

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prairie Grove Elementary School",'Prairie_Grove=' + Prairie_Grove.length); Prairie_Grove[Prairie_Grove.length] = createMarker(new GPoint(-94.31732941,35.98435974),"
Prairie Grove High School
500 Cole
Prairie Grove, AR 72753

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Prairie Grove High School",'Prairie_Grove=' + Prairie_Grove.length); Prairie_Grove[Prairie_Grove.length] = createMarker(new GPoint(-94.31732941,35.98435974),"
Prairie Grove Junior High School
824 North Mock
Prairie Grove, AR 72753

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Prairie Grove Junior High School",'Prairie_Grove=' + Prairie_Grove.length); Prairie_Grove[Prairie_Grove.length] = createMarker(new GPoint(-94.32660675,35.98432922),"
Prairie Grove Upper Elementary School
801 Viney Grove
Prairie Grove, AR 72753

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Prairie Grove Upper Elementary School",'Prairie_Grove=' + Prairie_Grove.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.18946838,36.05805588),"
Ramay Junior High School
401 S. Sang Ave.
Fayetteville, AR 72701

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ramay Junior High School",'Fayetteville=' + Fayetteville.length); Farmington[Farmington.length] = createMarker(new GPoint(-94.25653076,36.04216385),"
Randall G. Lynch Middle School
359 W. Rheas Mill Rd
Farmington, AR 72730

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Randall G. Lynch Middle School",'Farmington=' + Farmington.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.13467407,36.17893600),"
Robert E. Lee Elementary School
400 Quandt
Springdale, AR 72764

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Robert E. Lee Elementary School",'Springdale=' + Springdale.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.14058685,36.08159637),"
Root Elementary School
1529 Mission Blvd.
Fayetteville, AR 72701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Root Elementary School",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.15035248,36.17093658),"
Southwest Junior High School
1807 Princeton Ave.
Springdale, AR 72762

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Southwest Junior High School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.14044189,36.18489075),"
Springdale High School
1103 W. Emma Ave.
Springdale, AR 72764

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Springdale High School",'Springdale=' + Springdale.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.17208862,36.20053864),"
Thurman G. Smith Elementary School
3600 Falcon
Springdale, AR 72762

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Thurman G. Smith Elementary School",'Springdale=' + Springdale.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.12171936,36.09436417),"
Vandergriff Elementary School
2975 East Township
Fayetteville, AR 72703

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vandergriff Elementary School",'Fayetteville=' + Fayetteville.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.17462921,36.16876221),"
Walker Elementary School
1701 S. 40th
Springdale, AR 72762

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walker Elementary School",'Springdale=' + Springdale.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-94.15670013,36.06267166),"
Washington Elementary School
425 N. Nighland Ave.
Fayetteville, AR 72701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Fayetteville=' + Fayetteville.length); West_Fork[West_Fork.length] = createMarker(new GPoint(-94.19139099,35.92282486),"
West Fork Elementary School
359 School Ave.
West Fork, AR 72774

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Fork Elementary School",'West_Fork=' + West_Fork.length); West_Fork[West_Fork.length] = createMarker(new GPoint(-94.19139099,35.92282486),"
West Fork High School
359 School Ave.
West Fork, AR 72774

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Fork High School",'West_Fork=' + West_Fork.length); West_Fork[West_Fork.length] = createMarker(new GPoint(-94.19139099,35.92282486),"
West Fork Middle School
359 School Ave.
West Fork, AR 72774

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("West Fork Middle School",'West_Fork=' + West_Fork.length); Springdale[Springdale.length] = createMarker(new GPoint(-94.15122986,36.18190002),"
Westwood Elementary School
1850 Mcray Ave.
Springdale, AR 72762

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westwood Elementary School",'Springdale=' + Springdale.length); Winslow[Winslow.length] = createMarker(new GPoint(-94.12829590,35.79868698),"
Winslow Elementary School
351 South Hwy 71
Winslow, AR 72959

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Winslow Elementary School",'Winslow=' + Winslow.length); Greenland[Greenland.length] = createMarker(new GPoint(-94.18898800,35.99486400),"
Winslow Elementary School
P.o. Box 57
Greenland, AR 72737

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Winslow Elementary School",'Greenland=' + Greenland.length); Winslow[Winslow.length] = createMarker(new GPoint(-94.12829590,35.79868698),"
Winslow High School
351 South Hwy 71
Winslow, AR 72959

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Winslow High School",'Winslow=' + Winslow.length); Greenland[Greenland.length] = createMarker(new GPoint(-94.18898800,35.99486400),"
Winslow High School
P.o. Box 57
Greenland, AR 72737

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Winslow High School",'Greenland=' + Greenland.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-116.74221802,47.40627670),"
Woodland Junior High School
1 East Poplar
Fayetteville, AR 72703

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Woodland Junior High School",'Fayetteville=' + Fayetteville.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(Elkins); map.removeOverlays(Farmington); map.removeOverlays(Fayetteville); map.removeOverlays(Greenland); map.removeOverlays(Lincoln); map.removeOverlays(Prairie_Grove); map.removeOverlays(Springdale); map.removeOverlays(West_Fork); map.removeOverlays(Winslow); 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(Greenland);map.removeOverlays(Elkins); map.removeOverlays(Farmington); map.removeOverlays(Fayetteville); map.removeOverlays(Greenland); map.removeOverlays(Lincoln); map.removeOverlays(Prairie_Grove); map.removeOverlays(Springdale); map.removeOverlays(West_Fork); map.removeOverlays(Winslow); map.addOverlays(Elkins); centerByArray(Elkins, false, false); cntMarker += Elkins.length; map.addOverlays(Farmington); centerByArray(Farmington, false, false); cntMarker += Farmington.length; map.addOverlays(Fayetteville); centerByArray(Fayetteville, false, false); cntMarker += Fayetteville.length; map.addOverlays(Greenland); centerByArray(Greenland, false, false); cntMarker += Greenland.length; map.addOverlays(Lincoln); centerByArray(Lincoln, false, false); cntMarker += Lincoln.length; map.addOverlays(Prairie_Grove); centerByArray(Prairie_Grove, false, false); cntMarker += Prairie_Grove.length; map.addOverlays(Springdale); centerByArray(Springdale, false, false); cntMarker += Springdale.length; map.addOverlays(West_Fork); centerByArray(West_Fork, false, false); cntMarker += West_Fork.length; map.addOverlays(Winslow); centerByArray(Winslow, false, false); cntMarker += Winslow.length; centerByArray(Greenland,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'); } }