function addMarkers(){ mySelect = document.getElementById('selection'); Hixson = [];Murfreesboro = [];Kingston = [];Dayton = [];Chattanooga = [];Lafollette = [];Athens = [];Selmer = [];Jamestown = [];Millington = [];Memphis = [];Mckenzie = [];Newport = [];Savannah = [];Hendersonville = [];Tullahoma = [];Knoxville = [];Antioch = [];Arlington = [];Madison = [];Oliver_Springs = [];Whites_Creek = [];Pleasant_View = [];Seymour = [];Springfield = [];Powell = [];Gray = [];Bristol = [];Blountville = [];Dickson = [];Shelbyville = [];Nashville = [];mySelect.options[mySelect.options.length] = new Option("Antioch schools",'all=Antioch'); mySelect.options[mySelect.options.length] = new Option("Arlington schools",'all=Arlington'); mySelect.options[mySelect.options.length] = new Option("Athens schools",'all=Athens'); mySelect.options[mySelect.options.length] = new Option("Blountville schools",'all=Blountville'); mySelect.options[mySelect.options.length] = new Option("Bristol schools",'all=Bristol'); mySelect.options[mySelect.options.length] = new Option("Chattanooga schools",'all=Chattanooga'); mySelect.options[mySelect.options.length] = new Option("Dayton schools",'all=Dayton'); mySelect.options[mySelect.options.length] = new Option("Dickson schools",'all=Dickson'); mySelect.options[mySelect.options.length] = new Option("Gray schools",'all=Gray'); mySelect.options[mySelect.options.length] = new Option("Hendersonville schools",'all=Hendersonville'); mySelect.options[mySelect.options.length] = new Option("Hixson schools",'all=Hixson'); mySelect.options[mySelect.options.length] = new Option("Jamestown schools",'all=Jamestown'); mySelect.options[mySelect.options.length] = new Option("Kingston schools",'all=Kingston'); mySelect.options[mySelect.options.length] = new Option("Knoxville schools",'all=Knoxville'); mySelect.options[mySelect.options.length] = new Option("Lafollette schools",'all=Lafollette'); mySelect.options[mySelect.options.length] = new Option("Madison schools",'all=Madison'); mySelect.options[mySelect.options.length] = new Option("Mckenzie schools",'all=Mckenzie'); mySelect.options[mySelect.options.length] = new Option("Memphis schools",'all=Memphis'); mySelect.options[mySelect.options.length] = new Option("Millington schools",'all=Millington'); mySelect.options[mySelect.options.length] = new Option("Murfreesboro schools",'all=Murfreesboro'); mySelect.options[mySelect.options.length] = new Option("Nashville schools",'all=Nashville'); mySelect.options[mySelect.options.length] = new Option("Newport schools",'all=Newport'); mySelect.options[mySelect.options.length] = new Option("Oliver Springs schools",'all=Oliver_Springs'); mySelect.options[mySelect.options.length] = new Option("Pleasant View schools",'all=Pleasant_View'); mySelect.options[mySelect.options.length] = new Option("Powell schools",'all=Powell'); mySelect.options[mySelect.options.length] = new Option("Savannah schools",'all=Savannah'); mySelect.options[mySelect.options.length] = new Option("Selmer schools",'all=Selmer'); mySelect.options[mySelect.options.length] = new Option("Seymour schools",'all=Seymour'); mySelect.options[mySelect.options.length] = new Option("Shelbyville schools",'all=Shelbyville'); mySelect.options[mySelect.options.length] = new Option("Springfield schools",'all=Springfield'); mySelect.options[mySelect.options.length] = new Option("Tullahoma schools",'all=Tullahoma'); mySelect.options[mySelect.options.length] = new Option("Whites Creek schools",'all=Whites_Creek'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Hixson[Hixson.length] = createMarker(new GPoint(-85.25082200,35.14468300),"
Berean Academy
441 Berean Lane
Hixson, TN 37343
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Berean Academy",'Hixson=' + Hixson.length); Murfreesboro[Murfreesboro.length] = createMarker(new GPoint(-86.56279500,35.84527300),"
Bill Rice Christian Academy
627 Bill Rice Ranch Road
Murfreesboro, TN 37128
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bill Rice Christian Academy",'Murfreesboro=' + Murfreesboro.length); Kingston[Kingston.length] = createMarker(new GPoint(-84.50320000,35.84170000),"
Calvary Baptist School
Po Box 844
Kingston, TN 37763
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Baptist School",'Kingston=' + Kingston.length); Dayton[Dayton.length] = createMarker(new GPoint(-85.04593300,35.46160400),"
Calvary Baptist School
160 Dayco Drive
Dayton, TN 37321
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Baptist School",'Dayton=' + Dayton.length); Chattanooga[Chattanooga.length] = createMarker(new GPoint(-85.23443200,35.00789200),"
Calvary Christian School
4601 North Terrace
Chattanooga, TN 37411
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Christian School",'Chattanooga=' + Chattanooga.length); Lafollette[Lafollette.length] = createMarker(new GPoint(-84.06528600,36.40655400),"
Christian Academy Of Campbell County
2709 General Carl W Stiner Highway
Lafollette, TN 37766
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Academy Of Campbell County",'Lafollette=' + Lafollette.length); Athens[Athens.length] = createMarker(new GPoint(-84.55971700,35.45540200),"
Fairview Christian Academy
261 County Road 439
Athens, TN 37303
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fairview Christian Academy",'Athens=' + Athens.length); Selmer[Selmer.length] = createMarker(new GPoint(-88.60282900,35.19727600),"
Faith Baptist School
1301 Peach Street
Selmer, TN 38375
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Baptist School",'Selmer=' + Selmer.length); Jamestown[Jamestown.length] = createMarker(new GPoint(-84.92960000,36.40800000),"
Faith Christian Academy And Early Learning Center
Po Box 313
Jamestown, TN 38556
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Christian Academy And Early Learning Center",'Jamestown=' + Jamestown.length); Millington[Millington.length] = createMarker(new GPoint(-89.90180000,35.34100000),"
Faith Heritage Christian Academy
Po Box 157
Millington, TN 38083
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Heritage Christian Academy",'Millington=' + Millington.length); Murfreesboro[Murfreesboro.length] = createMarker(new GPoint(-86.45252900,35.84486500),"
Franklin Road Christian School
3124 Franklin Road
Murfreesboro, TN 37128
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Franklin Road Christian School",'Murfreesboro=' + Murfreesboro.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.00338100,35.22986400),"
Frayser Academy Of Christian Education
3820 North Watkins Street
Memphis, TN 38127
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Frayser Academy Of Christian Education",'Memphis=' + Memphis.length); Mckenzie[Mckenzie.length] = createMarker(new GPoint(-88.53001500,36.13561000),"
Grace Christian Academy
747 West Magnolia
Mckenzie, TN 38201
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Christian Academy",'Mckenzie=' + Mckenzie.length); Newport[Newport.length] = createMarker(new GPoint(-83.17783000,35.94428000),"
Grace Christian School
526 Highway 73
Newport, TN 37821
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Christian School",'Newport=' + Newport.length); Savannah[Savannah.length] = createMarker(new GPoint(-88.06349700,35.20965500),"
Harbert Hills Academy
3575 Lonesome Pine Road
Savannah, TN 38372
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harbert Hills Academy",'Savannah=' + Savannah.length); Hendersonville[Hendersonville.length] = createMarker(new GPoint(-86.62012900,36.32221800),"
Hendersonville Christian Academy
355 Old Shackle Island Rd
Hendersonville, TN 37075
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hendersonville Christian Academy",'Hendersonville=' + Hendersonville.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.92938900,35.17819500),"
Heritage Baptist Academy
Po Box 280709
Memphis, TN 38168
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Baptist Academy",'Memphis=' + Memphis.length); Tullahoma[Tullahoma.length] = createMarker(new GPoint(-86.22729100,35.35799000),"
Highland Rim Christian Academy
1115 Bel Aire Drive
Tullahoma, TN 37388
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Highland Rim Christian Academy",'Tullahoma=' + Tullahoma.length); Knoxville[Knoxville.length] = createMarker(new GPoint(-83.89845200,35.98462000),"
Knoxville Baptist Christian
2434 E 5th Avenue
Knoxville, TN 37917
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Knoxville Baptist Christian",'Knoxville=' + Knoxville.length); Antioch[Antioch.length] = createMarker(new GPoint(-86.67296500,36.05243900),"
Lighthouse Christian School
5100 Blue Hole Road
Antioch, TN 37013
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lighthouse Christian School",'Antioch=' + Antioch.length); Arlington[Arlington.length] = createMarker(new GPoint(-89.69454600,35.20669700),"
Macon Road Baptist School-east Campus
11017 Highway 64
Arlington, TN 38002
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Macon Road Baptist School-east Campus",'Arlington=' + Arlington.length); Madison[Madison.length] = createMarker(new GPoint(-86.69763600,36.25309400),"
Metro Christian Academy
730 Neely''s Bend Road
Madison, TN 37115
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Metro Christian Academy",'Madison=' + Madison.length); Oliver_Springs[Oliver_Springs.length] = createMarker(new GPoint(-84.39265300,36.00919600),"
Mt Pisgah Christian Academy
107 Old Hen Valley Road
Oliver Springs, TN 37840
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt Pisgah Christian Academy",'Oliver_Springs=' + Oliver_Springs.length); Whites_Creek[Whites_Creek.length] = createMarker(new GPoint(-86.77671600,36.29367400),"
Pioneer Christian Academy
4479 Jackson Road
Whites Creek, TN 37189
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pioneer Christian Academy",'Whites_Creek=' + Whites_Creek.length); Pleasant_View[Pleasant_View.length] = createMarker(new GPoint(-87.03707300,36.38576700),"
Pleasant View Christian School
160 Hicks Edgen Road
Pleasant View, TN 37146
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant View Christian School",'Pleasant_View=' + Pleasant_View.length); Seymour[Seymour.length] = createMarker(new GPoint(-83.74810000,35.86570000),"
Seymour Community Christian Academy
Po Box 849
Seymour, TN 37865
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seymour Community Christian Academy",'Seymour=' + Seymour.length); Springfield[Springfield.length] = createMarker(new GPoint(-86.85470900,36.47691500),"
South Haven Christian School
112 Academy Drive
Springfield, TN 37172
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Haven Christian School",'Springfield=' + Springfield.length); Powell[Powell.length] = createMarker(new GPoint(-84.02040500,36.02690500),"
Temple Baptist Academy
1700 W Beaver Creek Drive
Powell, TN 37849
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Temple Baptist Academy",'Powell=' + Powell.length); Gray[Gray.length] = createMarker(new GPoint(-82.47510400,36.41849300),"
Tri Cities Christian School
2102 Maple Drive
Gray, TN 37615
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tri Cities Christian School",'Gray=' + Gray.length); Bristol[Bristol.length] = createMarker(new GPoint(-82.20476100,36.59208000),"
Tri-Cities Christian School
2031 Broad Street
Bristol, TN 37620
Co-ed school, NS-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tri-Cities Christian School",'Bristol=' + Bristol.length); Blountville[Blountville.length] = createMarker(new GPoint(-82.38868100,36.50922000),"
Tri-cities Christian Schools
1500 Highway 75
Blountville, TN 37617
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tri-cities Christian Schools",'Blountville=' + Blountville.length); Dickson[Dickson.length] = createMarker(new GPoint(-87.36388200,36.04952200),"
United Christian Academy
784 Highway 46 S
Dickson, TN 37055
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("United Christian Academy",'Dickson=' + Dickson.length); Shelbyville[Shelbyville.length] = createMarker(new GPoint(-86.48410000,35.47160000),"
Victory Baptist Academy
Po Box 1030
Shelbyville, TN 37162
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Victory Baptist Academy",'Shelbyville=' + Shelbyville.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.74226700,36.12491500),"
Woodbine Christian Academy
2204 Foster Avenue
Nashville, TN 37210
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodbine Christian Academy",'Nashville=' + Nashville.length); map.removeOverlays(Antioch); map.removeOverlays(Arlington); map.removeOverlays(Athens); map.removeOverlays(Blountville); map.removeOverlays(Bristol); map.removeOverlays(Chattanooga); map.removeOverlays(Dayton); map.removeOverlays(Dickson); map.removeOverlays(Gray); map.removeOverlays(Hendersonville); map.removeOverlays(Hixson); map.removeOverlays(Jamestown); map.removeOverlays(Kingston); map.removeOverlays(Knoxville); map.removeOverlays(Lafollette); map.removeOverlays(Madison); map.removeOverlays(Mckenzie); map.removeOverlays(Memphis); map.removeOverlays(Millington); map.removeOverlays(Murfreesboro); map.removeOverlays(Nashville); map.removeOverlays(Newport); map.removeOverlays(Oliver_Springs); map.removeOverlays(Pleasant_View); map.removeOverlays(Powell); map.removeOverlays(Savannah); map.removeOverlays(Selmer); map.removeOverlays(Seymour); map.removeOverlays(Shelbyville); map.removeOverlays(Springfield); map.removeOverlays(Tullahoma); map.removeOverlays(Whites_Creek); setTimeout(function(){map.addOverlays(Antioch)},1000); setTimeout(function(){map.addOverlays(Arlington)},1000); setTimeout(function(){map.addOverlays(Athens)},1000); setTimeout(function(){map.addOverlays(Blountville)},1000); setTimeout(function(){map.addOverlays(Bristol)},1000); setTimeout(function(){map.addOverlays(Chattanooga)},1000); setTimeout(function(){map.addOverlays(Dayton)},1000); setTimeout(function(){map.addOverlays(Dickson)},1000); setTimeout(function(){map.addOverlays(Gray)},1000); setTimeout(function(){map.addOverlays(Hendersonville)},1000); setTimeout(function(){map.addOverlays(Hixson)},1000); setTimeout(function(){map.addOverlays(Jamestown)},1000); setTimeout(function(){map.addOverlays(Kingston)},1000); setTimeout(function(){map.addOverlays(Knoxville)},1000); setTimeout(function(){map.addOverlays(Lafollette)},1000); setTimeout(function(){map.addOverlays(Madison)},1000); setTimeout(function(){map.addOverlays(Mckenzie)},1000); setTimeout(function(){map.addOverlays(Memphis)},1000); setTimeout(function(){map.addOverlays(Millington)},1000); setTimeout(function(){map.addOverlays(Murfreesboro)},1000); setTimeout(function(){map.addOverlays(Nashville)},1000); setTimeout(function(){map.addOverlays(Newport)},1000); setTimeout(function(){map.addOverlays(Oliver_Springs)},1000); setTimeout(function(){map.addOverlays(Pleasant_View)},1000); setTimeout(function(){map.addOverlays(Powell)},1000); setTimeout(function(){map.addOverlays(Savannah)},1000); setTimeout(function(){map.addOverlays(Selmer)},1000); setTimeout(function(){map.addOverlays(Seymour)},1000); setTimeout(function(){map.addOverlays(Shelbyville)},1000); setTimeout(function(){map.addOverlays(Springfield)},1000); setTimeout(function(){map.addOverlays(Tullahoma)},1000); setTimeout(function(){map.addOverlays(Whites_Creek)},1000); maxLng = -82.20476100; maxLat = 36.59208000; minLng = -90.00338100; minLat = 35.00789200; reCenterMap(); } // End addStateMarkers JavaScript Function // Takes an array of markers and centers/zooms map based on marker range function centerByArray(myArray, recenter, newMaxMin) { if (newMaxMin == true) reMaxMin(myArray); for (var i = 0; i < myArray.length; i++) { var markLng = myArray[i].getPoint().x; var markLat = myArray[i].getPoint().y; if (markLat > maxLat) maxLat = markLat; if (markLng > maxLng) maxLng = markLng; if (markLat < minLat) minLat = markLat; if (markLng < minLng) minLng = markLng; } if (recenter) reCenterMap(); } // Reinit max/mins function reMaxMin(myArray) { maxLng = myArray[0].getPoint().x; maxLat = myArray[0].getPoint().y; minLng = myArray[0].getPoint().x; minLat = myArray[0].getPoint().y; } // Recenter map based on global max/mins function reCenterMap() { var bounds = new GLatLngBounds(); bounds.extend(new GLatLng(minLat, minLng)); bounds.extend(new GLatLng(maxLat, maxLng)); var center_lat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) / 2.0; var center_lng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) / 2.0; var center = new GLatLng(center_lat, center_lng); var zoom = map.getBoundsZoomLevel(bounds); map.setCenter(center,zoom); //map.setCenter(center,11); /* var center = new GPoint( (maxLng + minLng)/2, (maxLat+minLat)/2 ); var delta = new GSize(maxLng - minLng, maxLat - minLat); var minZoom = map.spec.getLowestZoomLevel(center, delta, map.viewSize); if (minZoom < 4) minZoom = 4; // Lowest possible zoom is 4 map.centerAndZoom(center, minZoom); */ } // Fires when drop down list of schools changes function selectChange(selection) { var myVal = selection.options[selection.selectedIndex].value; map.closeInfoWindow(); // Add entire array based on variable type if (myVal.indexOf('all') != -1 && myVal != 'all') { var temp = myVal.split('='); var showArray = temp[1]; // If Array is > X amount of markers, then open in a new page if (eval(showArray).length > 20) // New window depends on whether or not we're on the search page if (location.href.indexOf('nearby_schools.php') == -1) window.open(location.href + '/map/' + showArray); else window.open('/search//////' + showArray); map.removeOverlays(Antioch); map.removeOverlays(Arlington); map.removeOverlays(Athens); map.removeOverlays(Blountville); map.removeOverlays(Bristol); map.removeOverlays(Chattanooga); map.removeOverlays(Dayton); map.removeOverlays(Dickson); map.removeOverlays(Gray); map.removeOverlays(Hendersonville); map.removeOverlays(Hixson); map.removeOverlays(Jamestown); map.removeOverlays(Kingston); map.removeOverlays(Knoxville); map.removeOverlays(Lafollette); map.removeOverlays(Madison); map.removeOverlays(Mckenzie); map.removeOverlays(Memphis); map.removeOverlays(Millington); map.removeOverlays(Murfreesboro); map.removeOverlays(Nashville); map.removeOverlays(Newport); map.removeOverlays(Oliver_Springs); map.removeOverlays(Pleasant_View); map.removeOverlays(Powell); map.removeOverlays(Savannah); map.removeOverlays(Selmer); map.removeOverlays(Seymour); map.removeOverlays(Shelbyville); map.removeOverlays(Springfield); map.removeOverlays(Tullahoma); map.removeOverlays(Whites_Creek); 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(Hixson);map.removeOverlays(Antioch); map.removeOverlays(Arlington); map.removeOverlays(Athens); map.removeOverlays(Blountville); map.removeOverlays(Bristol); map.removeOverlays(Chattanooga); map.removeOverlays(Dayton); map.removeOverlays(Dickson); map.removeOverlays(Gray); map.removeOverlays(Hendersonville); map.removeOverlays(Hixson); map.removeOverlays(Jamestown); map.removeOverlays(Kingston); map.removeOverlays(Knoxville); map.removeOverlays(Lafollette); map.removeOverlays(Madison); map.removeOverlays(Mckenzie); map.removeOverlays(Memphis); map.removeOverlays(Millington); map.removeOverlays(Murfreesboro); map.removeOverlays(Nashville); map.removeOverlays(Newport); map.removeOverlays(Oliver_Springs); map.removeOverlays(Pleasant_View); map.removeOverlays(Powell); map.removeOverlays(Savannah); map.removeOverlays(Selmer); map.removeOverlays(Seymour); map.removeOverlays(Shelbyville); map.removeOverlays(Springfield); map.removeOverlays(Tullahoma); map.removeOverlays(Whites_Creek); map.addOverlays(Antioch); centerByArray(Antioch, false, false); cntMarker += Antioch.length; map.addOverlays(Arlington); centerByArray(Arlington, false, false); cntMarker += Arlington.length; map.addOverlays(Athens); centerByArray(Athens, false, false); cntMarker += Athens.length; map.addOverlays(Blountville); centerByArray(Blountville, false, false); cntMarker += Blountville.length; map.addOverlays(Bristol); centerByArray(Bristol, false, false); cntMarker += Bristol.length; map.addOverlays(Chattanooga); centerByArray(Chattanooga, false, false); cntMarker += Chattanooga.length; map.addOverlays(Dayton); centerByArray(Dayton, false, false); cntMarker += Dayton.length; map.addOverlays(Dickson); centerByArray(Dickson, false, false); cntMarker += Dickson.length; map.addOverlays(Gray); centerByArray(Gray, false, false); cntMarker += Gray.length; map.addOverlays(Hendersonville); centerByArray(Hendersonville, false, false); cntMarker += Hendersonville.length; map.addOverlays(Hixson); centerByArray(Hixson, false, false); cntMarker += Hixson.length; map.addOverlays(Jamestown); centerByArray(Jamestown, false, false); cntMarker += Jamestown.length; map.addOverlays(Kingston); centerByArray(Kingston, false, false); cntMarker += Kingston.length; map.addOverlays(Knoxville); centerByArray(Knoxville, false, false); cntMarker += Knoxville.length; map.addOverlays(Lafollette); centerByArray(Lafollette, false, false); cntMarker += Lafollette.length; map.addOverlays(Madison); centerByArray(Madison, false, false); cntMarker += Madison.length; map.addOverlays(Mckenzie); centerByArray(Mckenzie, false, false); cntMarker += Mckenzie.length; map.addOverlays(Memphis); centerByArray(Memphis, false, false); cntMarker += Memphis.length; map.addOverlays(Millington); centerByArray(Millington, false, false); cntMarker += Millington.length; map.addOverlays(Murfreesboro); centerByArray(Murfreesboro, false, false); cntMarker += Murfreesboro.length; map.addOverlays(Nashville); centerByArray(Nashville, false, false); cntMarker += Nashville.length; map.addOverlays(Newport); centerByArray(Newport, false, false); cntMarker += Newport.length; map.addOverlays(Oliver_Springs); centerByArray(Oliver_Springs, false, false); cntMarker += Oliver_Springs.length; map.addOverlays(Pleasant_View); centerByArray(Pleasant_View, false, false); cntMarker += Pleasant_View.length; map.addOverlays(Powell); centerByArray(Powell, false, false); cntMarker += Powell.length; map.addOverlays(Savannah); centerByArray(Savannah, false, false); cntMarker += Savannah.length; map.addOverlays(Selmer); centerByArray(Selmer, false, false); cntMarker += Selmer.length; map.addOverlays(Seymour); centerByArray(Seymour, false, false); cntMarker += Seymour.length; map.addOverlays(Shelbyville); centerByArray(Shelbyville, false, false); cntMarker += Shelbyville.length; map.addOverlays(Springfield); centerByArray(Springfield, false, false); cntMarker += Springfield.length; map.addOverlays(Tullahoma); centerByArray(Tullahoma, false, false); cntMarker += Tullahoma.length; map.addOverlays(Whites_Creek); centerByArray(Whites_Creek, false, false); cntMarker += Whites_Creek.length; centerByArray(Hixson,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///26165,26039,26350,25959,25955,34480,26108,25932,25956,26145,26187,26058,26344,26045,34476,33316,26209,26246,26323,26084,26040,26271,26368,26281,33317,26244,26165,33704,26039,26352,25959,25955,34480,26399,26108,25932,26025,25956,26145,25985,26187,26071,26058,26344,26045,25938,34476,26385,33316,26209,26246,26323,26084,26040,26271,26368,26281,33317,26244,/all'); //window.open('/map.php?type=2&schools=26165,26039,26350,25959,25955,34480,26108,25932,25956,26145,26187,26058,26344,26045,34476,33316,26209,26246,26323,26084,26040,26271,26368,26281,33317,26244,26165,33704,26039,26352,25959,25955,34480,26399,26108,25932,26025,25956,26145,25985,26187,26071,26058,26344,26045,25938,34476,26385,33316,26209,26246,26323,26084,26040,26271,26368,26281,33317,26244,&school_level=&radius=&zipcode=&school_type_search=&school_type_code='); } } function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }