function addMarkers() { mySelect = document.getElementById('selection'); Rex = [];Conley = [];Jonesboro = [];Forest_Park = [];Riverdale = [];Lovejoy = [];Ellenwood = [];Hampton = [];Morrow = [];Lake_City = [];College_Park = [];Fayetteville = [];mySelect.options[mySelect.options.length] = new Option("College Park schools",'all=College_Park'); mySelect.options[mySelect.options.length] = new Option("Conley schools",'all=Conley'); mySelect.options[mySelect.options.length] = new Option("Ellenwood schools",'all=Ellenwood'); mySelect.options[mySelect.options.length] = new Option("Fayetteville schools",'all=Fayetteville'); mySelect.options[mySelect.options.length] = new Option("Forest Park schools",'all=Forest_Park'); mySelect.options[mySelect.options.length] = new Option("Hampton schools",'all=Hampton'); mySelect.options[mySelect.options.length] = new Option("Jonesboro schools",'all=Jonesboro'); mySelect.options[mySelect.options.length] = new Option("Lake City schools",'all=Lake_City'); mySelect.options[mySelect.options.length] = new Option("Lovejoy schools",'all=Lovejoy'); mySelect.options[mySelect.options.length] = new Option("Morrow schools",'all=Morrow'); mySelect.options[mySelect.options.length] = new Option("Rex schools",'all=Rex'); mySelect.options[mySelect.options.length] = new Option("Riverdale schools",'all=Riverdale'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Rex[Rex.length] = createMarker(new GPoint(-84.28647614,33.59046173),"
Adamson Middle School
3187 Rex Road
Rex, GA 30273

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Adamson Middle School",'Rex=' + Rex.length); Conley[Conley.length] = createMarker(new GPoint(-84.33364868,33.63992310),"
Anderson Elementary School
4199 Old Rockcut Road
Conley, GA 30288

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Anderson Elementary School",'Conley=' + Conley.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.34564972,33.52685547),"
Arnold Elementary School
216 Stockbridge Road
Jonesboro, GA 30236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Arnold Elementary School",'Jonesboro=' + Jonesboro.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.34947968,33.60287476),"
Babb Middle School
5500 Reynolds Road
Forest Park, GA 30297

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Babb Middle School",'Forest_Park=' + Forest_Park.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.36395264,33.49353790),"
Brown Elementary School
9771 Poston Road
Jonesboro, GA 30236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brown Elementary School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.39403534,33.53493118),"
Callaway Elementary School
120 Oriole Dr.
Jonesboro, GA 30238

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Callaway Elementary School",'Jonesboro=' + Jonesboro.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.41711426,33.56362152),"
Church Street Elementary School
7013 Church Street
Riverdale, GA 30274

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Church Street Elementary School",'Riverdale=' + Riverdale.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.41883850,33.51424026),"
Clayton County Alternative Center
1098 Fifth Street
Jonesboro, GA 30236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clayton County Alternative Center",'Jonesboro=' + Jonesboro.length); Lovejoy[Lovejoy.length] = createMarker(new GPoint(-84.30527300,33.43371600),"
Clayton Regional Youth Detention Center
11850 Hastings Bridge Road
Lovejoy, GA 30250

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clayton Regional Youth Detention Center",'Lovejoy=' + Lovejoy.length); Ellenwood[Ellenwood.length] = createMarker(new GPoint(-84.30024719,33.61260986),"
East Clayton Elementary School
2750 Ellenwood Road
Ellenwood, GA 30049

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("East Clayton Elementary School",'Ellenwood=' + Ellenwood.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.34854889,33.63246536),"
Edmonds Elementary School
4495 Simpson Road
Forest Park, GA 30297

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edmonds Elementary School",'Forest_Park=' + Forest_Park.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.41883850,33.51424026),"
Flint River School
9540 Tara Boulevard
Jonesboro, GA 30236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Flint River School",'Jonesboro=' + Jonesboro.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.35710144,33.61806107),"
Forest Park High School
5452 Phillips Drive
Forest Park, GA 30297

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Forest Park High School",'Forest_Park=' + Forest_Park.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.35983276,33.62143707),"
Forest Park Middle School
930 Finley Drive
Forest Park, GA 30297

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Forest Park Middle School",'Forest_Park=' + Forest_Park.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.37251282,33.61228180),"
Fountain Elementary School
5215 West Street
Forest Park, GA 30297

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fountain Elementary School",'Forest_Park=' + Forest_Park.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.39168549,33.56462479),"
Harper Elementary School
93 Valley Hill Rd Sw
Riverdale, GA 30274

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harper Elementary School",'Riverdale=' + Riverdale.length); Hampton[Hampton.length] = createMarker(new GPoint(-84.36758423,33.46258545),"
Hawthorne Elementary School
10750 English Road
Hampton, GA 30228

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hawthorne Elementary School",'Hampton=' + Hampton.length); Morrow[Morrow.length] = createMarker(new GPoint(-84.35199738,33.58641052),"
Haynie Elementary School
1169 Morrow Road
Morrow, GA 30260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Haynie Elementary School",'Morrow=' + Morrow.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.37066650,33.63256454),"
Hendrix Drive Elementary School
4475 Hendrix Drive
Forest Park, GA 30297

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hendrix Drive Elementary School",'Forest_Park=' + Forest_Park.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.34882355,33.63834763),"
Huie Elementary School
1260 Rock Cut Road
Forest Park, GA 30297

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Huie Elementary School",'Forest_Park=' + Forest_Park.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.41883850,33.51424026),"
James Jackson Elementary School
7711 Mt Zion Blvd
Jonesboro, GA 30236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("James Jackson Elementary School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.34015656,33.54444122),"
Jonesboro High School
7728 Mount Zion Boulevard
Jonesboro, GA 30236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jonesboro High School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.35826111,33.52493668),"
Jonesboro Middle School
1308 Arnold St
Jonesboro, GA 30236

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Jonesboro Middle School",'Jonesboro=' + Jonesboro.length); Hampton[Hampton.length] = createMarker(new GPoint(-84.35833740,33.45591736),"
Kemp Elementary School
10990 Folsom Road
Hampton, GA 30228

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kemp Elementary School",'Hampton=' + Hampton.length); Hampton[Hampton.length] = createMarker(new GPoint(-84.35854600,33.45251800),"
Kemp Primary
1090 Mcdonough Rd
Hampton, GA 30228

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kemp Primary",'Hampton=' + Hampton.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.38581848,33.53977966),"
Kendrick Middle School
7791 Kendrick Road
Jonesboro, GA 30238

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Kendrick Middle School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.35876465,33.54843521),"
Kilpatrick Elementary School
7534 Tara Road
Jonesboro, GA 30236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kilpatrick Elementary School",'Jonesboro=' + Jonesboro.length); Lake_City[Lake_City.length] = createMarker(new GPoint(-84.35667419,33.60807037),"
Lake City Elementary School
5354 Phillips Drive
Lake City, GA 30260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake City Elementary School",'Lake_City=' + Lake_City.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.41644287,33.54219818),"
Lake Ridge Elementary School
7900 Lake Ridge Circle
Riverdale, GA 30274

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake Ridge Elementary School",'Riverdale=' + Riverdale.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.35691833,33.52478409),"
Lee Street Elementary School
178 Lee Street
Jonesboro, GA 30236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lee Street Elementary School",'Jonesboro=' + Jonesboro.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.41523900,33.58106500),"
Lewis Academy Of Excellence
6390 Church Street
Riverdale, GA 30274

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lewis Academy Of Excellence",'Riverdale=' + Riverdale.length); Lovejoy[Lovejoy.length] = createMarker(new GPoint(-84.34004974,33.44886398),"
Lovejoy High School
1587 Mcdonough Road
Lovejoy, GA 30250

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lovejoy High School",'Lovejoy=' + Lovejoy.length); Lovejoy[Lovejoy.length] = createMarker(new GPoint(-84.34005737,33.44170380),"
Lovejoy Middle School
1588 Lovejoy Road
Lovejoy, GA 30250

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lovejoy Middle School",'Lovejoy=' + Lovejoy.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.32925415,33.52443314),"
M. D. Roberts Middle School
1905 Walt Stephens Road
Jonesboro, GA 30236

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("M. D. Roberts Middle School",'Jonesboro=' + Jonesboro.length); College_Park[College_Park.length] = createMarker(new GPoint(-84.41250100,33.59411200),"
Martin Luther King, Jr. Elementary School
5745 West Lee''s Mill Rd
College Park, GA 30349

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Martin Luther King, Jr. Elementary School",'College_Park=' + College_Park.length); Morrow[Morrow.length] = createMarker(new GPoint(-84.34067535,33.58841324),"
Morrow Elementary School
6115 Reynolds Road
Morrow, GA 30260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Morrow Elementary School",'Morrow=' + Morrow.length); Morrow[Morrow.length] = createMarker(new GPoint(-84.31346893,33.59551620),"
Morrow High School
2299 Old Rex Morrow Road
Morrow, GA 30260

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Morrow High School",'Morrow=' + Morrow.length); Morrow[Morrow.length] = createMarker(new GPoint(-84.31576538,33.59222412),"
Morrow Middle School
5968 Maddox Road
Morrow, GA 30260

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Morrow Middle School",'Morrow=' + Morrow.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.29494476,33.55524826),"
Mount Zion Elementary School
2984 Mount Zion Road
Jonesboro, GA 30236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mount Zion Elementary School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.30761719,33.55410385),"
Mount Zion High School
2535 Mount Zion Parkway
Jonesboro, GA 30236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Zion High School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-114.30248400,42.52863000),"
Mundy's Mill High School
09652 Fayetteville Rd.
Jonesboro, GA 30238

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mundy's Mill High School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-116.47494200,43.86461500),"
Mundy's Mill Middle School
01251 Mundy''s Mill Road
Jonesboro, GA 30238

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mundy's Mill Middle School",'Jonesboro=' + Jonesboro.length); College_Park[College_Park.length] = createMarker(new GPoint(-84.43926239,33.60826111),"
North Clayton High School
1525 Norman Drive
College Park, GA 30349

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Clayton High School",'College_Park=' + College_Park.length); College_Park[College_Park.length] = createMarker(new GPoint(-84.44655609,33.60371780),"
North Clayton Middle School
5517 West Fayetteville Road
College Park, GA 30349

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("North Clayton Middle School",'College_Park=' + College_Park.length); College_Park[College_Park.length] = createMarker(new GPoint(-84.44660950,33.60530472),"
Northcutt Elementary School
5451 West Fayetteville Road
College Park, GA 30349

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northcutt Elementary School",'College_Park=' + College_Park.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.44670868,33.57749939),"
Oliver Elementary School
1725 Cheryl Leigh Drive
Riverdale, GA 30296

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oliver Elementary School",'Riverdale=' + Riverdale.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.41481018,33.52217102),"
Pointe South Elementary School
631 Flint River Road, Sw
Riverdale, GA 30274

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pointe South Elementary School",'Riverdale=' + Riverdale.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.37294769,33.51777649),"
Pointe South Middle School
626 Flint River Road, Sw
Jonesboro, GA 30238

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pointe South Middle School",'Jonesboro=' + Jonesboro.length); Fayetteville[Fayetteville.length] = createMarker(new GPoint(-111.73213900,42.40748500),"
River's Edge Elementary School
0205 North Bridge Road
Fayetteville, GA 30215

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("River's Edge Elementary School",'Fayetteville=' + Fayetteville.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.40856934,33.57329941),"
Riverdale Elementary School
6630 Camp Street
Riverdale, GA 30274

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Riverdale Elementary School",'Riverdale=' + Riverdale.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.40106964,33.55714417),"
Riverdale High School
160 Roberts Drive
Riverdale, GA 30274

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverdale High School",'Riverdale=' + Riverdale.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.40730100,33.56389200),"
Riverdale Middle School
400 Roberts Drive
Riverdale, GA 30274

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Riverdale Middle School",'Riverdale=' + Riverdale.length); Rex[Rex.length] = createMarker(new GPoint(-84.29078674,33.58136749),"
Roberta T. Smith Elementary School
6340 Highway 42 South
Rex, GA 30273

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roberta T. Smith Elementary School",'Rex=' + Rex.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-84.39169300,33.56446000),"
Sequoyah Middle School
95 Valley Hill Road Sw
Riverdale, GA 30274

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sequoyah Middle School",'Riverdale=' + Riverdale.length); Forest_Park[Forest_Park.length] = createMarker(new GPoint(-84.36419200,33.61023900),"
South Metro Psychoeducational Program
5277 Ash Street
Forest Park, GA 30297

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Metro Psychoeducational Program",'Forest_Park=' + Forest_Park.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.34534454,33.51424789),"
Suder Elementary School
1400 Lake Jodeco Road
Jonesboro, GA 30236

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Suder Elementary School",'Jonesboro=' + Jonesboro.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.37408447,33.53580093),"
Swint Elementary School
500 Highway 138
Jonesboro, GA 30238

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Swint Elementary School",'Jonesboro=' + Jonesboro.length); Morrow[Morrow.length] = createMarker(new GPoint(-84.36116400,33.57144800),"
Tara Elementary School
937 Mount Zion Road
Morrow, GA 30260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tara Elementary School",'Morrow=' + Morrow.length); Morrow[Morrow.length] = createMarker(new GPoint(-84.31900700,33.59339800),"
Thurgood Marshall Elementary School
5885 Maddox Rd
Morrow, GA 30260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Thurgood Marshall Elementary School",'Morrow=' + Morrow.length); College_Park[College_Park.length] = createMarker(new GPoint(-84.43196106,33.60312653),"
West Clayton Elementary School
5580 Riverdale Road
College Park, GA 30349

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Clayton Elementary School",'College_Park=' + College_Park.length); Morrow[Morrow.length] = createMarker(new GPoint(-84.31834412,33.58286285),"
William M. Mcgarrah Elementary School
2201 Lake Harbin Road
Morrow, GA 30260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("William M. Mcgarrah Elementary School",'Morrow=' + Morrow.length); Jonesboro[Jonesboro.length] = createMarker(new GPoint(-84.41883850,33.51424026),"
Worktec
221 Stockbridge Road
Jonesboro, GA 30236

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Worktec",'Jonesboro=' + Jonesboro.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(College_Park); map.removeOverlays(Conley); map.removeOverlays(Ellenwood); map.removeOverlays(Fayetteville); map.removeOverlays(Forest_Park); map.removeOverlays(Hampton); map.removeOverlays(Jonesboro); map.removeOverlays(Lake_City); map.removeOverlays(Lovejoy); map.removeOverlays(Morrow); map.removeOverlays(Rex); map.removeOverlays(Riverdale); 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(Rex);map.removeOverlays(College_Park); map.removeOverlays(Conley); map.removeOverlays(Ellenwood); map.removeOverlays(Fayetteville); map.removeOverlays(Forest_Park); map.removeOverlays(Hampton); map.removeOverlays(Jonesboro); map.removeOverlays(Lake_City); map.removeOverlays(Lovejoy); map.removeOverlays(Morrow); map.removeOverlays(Rex); map.removeOverlays(Riverdale); map.addOverlays(College_Park); centerByArray(College_Park, false, false); cntMarker += College_Park.length; map.addOverlays(Conley); centerByArray(Conley, false, false); cntMarker += Conley.length; map.addOverlays(Ellenwood); centerByArray(Ellenwood, false, false); cntMarker += Ellenwood.length; map.addOverlays(Fayetteville); centerByArray(Fayetteville, false, false); cntMarker += Fayetteville.length; map.addOverlays(Forest_Park); centerByArray(Forest_Park, false, false); cntMarker += Forest_Park.length; map.addOverlays(Hampton); centerByArray(Hampton, false, false); cntMarker += Hampton.length; map.addOverlays(Jonesboro); centerByArray(Jonesboro, false, false); cntMarker += Jonesboro.length; map.addOverlays(Lake_City); centerByArray(Lake_City, false, false); cntMarker += Lake_City.length; map.addOverlays(Lovejoy); centerByArray(Lovejoy, false, false); cntMarker += Lovejoy.length; map.addOverlays(Morrow); centerByArray(Morrow, false, false); cntMarker += Morrow.length; map.addOverlays(Rex); centerByArray(Rex, false, false); cntMarker += Rex.length; map.addOverlays(Riverdale); centerByArray(Riverdale, false, false); cntMarker += Riverdale.length; centerByArray(Rex,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'); } }