function addMarkers(){ mySelect = document.getElementById('selection'); Memphis = [];Nashville = [];Chattanooga = [];Germantown = [];Hendersonville = [];Knoxville = [];Lawrenceburg = [];Loretto = [];Bartlett = [];Cordova = [];Jackson = [];Oak_Ridge = [];Decherd = [];Kingsport = [];Gallatin = [];Madison = [];Clarksville = [];Johnson_City = [];Franklin = [];Mc_Ewen = [];Tullahoma = [];Murfreesboro = [];mySelect.options[mySelect.options.length] = new Option("Bartlett schools",'all=Bartlett'); mySelect.options[mySelect.options.length] = new Option("Chattanooga schools",'all=Chattanooga'); mySelect.options[mySelect.options.length] = new Option("Clarksville schools",'all=Clarksville'); mySelect.options[mySelect.options.length] = new Option("Cordova schools",'all=Cordova'); mySelect.options[mySelect.options.length] = new Option("Decherd schools",'all=Decherd'); mySelect.options[mySelect.options.length] = new Option("Franklin schools",'all=Franklin'); mySelect.options[mySelect.options.length] = new Option("Gallatin schools",'all=Gallatin'); mySelect.options[mySelect.options.length] = new Option("Germantown schools",'all=Germantown'); mySelect.options[mySelect.options.length] = new Option("Hendersonville schools",'all=Hendersonville'); mySelect.options[mySelect.options.length] = new Option("Jackson schools",'all=Jackson'); mySelect.options[mySelect.options.length] = new Option("Johnson City schools",'all=Johnson_City'); mySelect.options[mySelect.options.length] = new Option("Kingsport schools",'all=Kingsport'); mySelect.options[mySelect.options.length] = new Option("Knoxville schools",'all=Knoxville'); mySelect.options[mySelect.options.length] = new Option("Lawrenceburg schools",'all=Lawrenceburg'); mySelect.options[mySelect.options.length] = new Option("Loretto schools",'all=Loretto'); mySelect.options[mySelect.options.length] = new Option("Madison schools",'all=Madison'); mySelect.options[mySelect.options.length] = new Option("Mc Ewen schools",'all=Mc_Ewen'); mySelect.options[mySelect.options.length] = new Option("Memphis schools",'all=Memphis'); 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("Oak Ridge schools",'all=Oak_Ridge'); mySelect.options[mySelect.options.length] = new Option("Tullahoma schools",'all=Tullahoma'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Memphis[Memphis.length] = createMarker(new GPoint(-90.01468600,35.02086300),"
Bishop Byrne Middle High School
1475 East Shelby Drive
Memphis, TN 38116
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bishop Byrne Middle High School",'Memphis=' + Memphis.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.79684800,36.11815900),"
Christ The King School
3105 Belmont Blvd
Nashville, TN 37212
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The King School",'Nashville=' + Nashville.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.76836900,36.09923600),"
Father Ryan High School
700 Norwood Drive
Nashville, TN 37204
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Father Ryan High School",'Nashville=' + Nashville.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.00431100,35.12612400),"
Immaculate Comception Mid. - High School
1725 Central Avenue
Memphis, TN 38104
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Immaculate Comception Mid. - High School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.00666700,35.12616300),"
Immaculate Conception Elementa
1669 Central Avenue
Memphis, TN 38104
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immaculate Conception Elementa",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.99963300,35.13928000),"
Memphis Cath High School - Middle School
61 N Mclean Boulevard
Memphis, TN 38104
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Memphis Cath High School - Middle School",'Memphis=' + Memphis.length); Chattanooga[Chattanooga.length] = createMarker(new GPoint(-85.25971200,35.03718100),"
Notre Dame High School
2701 Vermont Avenue
Chattanooga, TN 37404
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Notre Dame High School",'Chattanooga=' + Chattanooga.length); Germantown[Germantown.length] = createMarker(new GPoint(-89.79179200,35.08434700),"
Our Lady Of Perpetual Help
8151 Poplar
Germantown, TN 38138
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Perpetual Help",'Germantown=' + Germantown.length); Chattanooga[Chattanooga.length] = createMarker(new GPoint(-85.23265000,35.00515000),"
Our Lady Of Perpetual Help School
505 South Moore Rd
Chattanooga, TN 37412
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Perpetual Help School",'Chattanooga=' + Chattanooga.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.02208400,35.22643300),"
Our Lady Of Sorrows Elementary School
3690 Thomas Street
Memphis, TN 38127
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Sorrows Elementary School",'Memphis=' + Memphis.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.83995800,36.12972200),"
Overbrook School
4210 Harding Road
Nashville, TN 37205
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Overbrook School",'Nashville=' + Nashville.length); Hendersonville[Hendersonville.length] = createMarker(new GPoint(-86.66716600,36.31668600),"
Pope John Paul II High School
117 Caldwell Drive
Hendersonville, TN 37075
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pope John Paul II High School",'Hendersonville=' + Hendersonville.length); Knoxville[Knoxville.length] = createMarker(new GPoint(-83.99948800,35.92625800),"
Sacred Heart Cathedral School
711 N Shore Drive
Knoxville, TN 37919
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Cathedral School",'Knoxville=' + Knoxville.length); Lawrenceburg[Lawrenceburg.length] = createMarker(new GPoint(-87.33510300,35.24603700),"
Sacred Heart Elementary School
220 Berger Street
Lawrenceburg, TN 38464
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Elementary School",'Lawrenceburg=' + Lawrenceburg.length); Loretto[Loretto.length] = createMarker(new GPoint(-87.42440000,35.07510000),"
Sacred Heart School
Po Box 277 307 Church Street
Loretto, TN 38469
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart School",'Loretto=' + Loretto.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.90123600,35.13107900),"
St. Agnes Academy-st Dominic School
4830 Walnut Grove Rd
Memphis, TN 38117
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Agnes Academy-st Dominic School",'Memphis=' + Memphis.length); Bartlett[Bartlett.length] = createMarker(new GPoint(-89.84557100,35.20456300),"
St. Ann Elementary School
6529 Stage Road
Bartlett, TN 38134
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Ann Elementary School",'Bartlett=' + Bartlett.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.94573600,35.11316700),"
St. Anne Catholic School, Highland
670 South Highland St
Memphis, TN 38111
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anne Catholic School, Highland",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.02341000,35.10676300),"
St. Augustine Catholic School
1169 Kerr Avenue
Memphis, TN 38106
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Augustine Catholic School",'Memphis=' + Memphis.length); Cordova[Cordova.length] = createMarker(new GPoint(-89.79058600,35.18760600),"
St. Benedict At Auburndale
8250 Varnavas Drive
Cordova, TN 38016
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Benedict At Auburndale",'Cordova=' + Cordova.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.80562000,36.13261600),"
St. Bernard Academy
2020 24th Avenue South
Nashville, TN 37212
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Bernard Academy",'Nashville=' + Nashville.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.90249900,35.13185100),"
St. Dominic School For Boys
30 Avon Road
Memphis, TN 38117
All-boys school, PK-8
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("St. Dominic School For Boys",'Memphis=' + Memphis.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.88650700,36.09188200),"
Saint Henry Catholic School
6401 Harding Pike
Nashville, TN 37205
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Henry Catholic School",'Nashville=' + Nashville.length); Chattanooga[Chattanooga.length] = createMarker(new GPoint(-85.26627700,35.11693100),"
St. Jude Elementary School
930 Ashland Ter
Chattanooga, TN 37415
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Jude Elementary School",'Chattanooga=' + Chattanooga.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.88855100,35.12420100),"
St. Louis Elementary School
5192 Shady Grove Road
Memphis, TN 38117
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Louis Elementary School",'Memphis=' + Memphis.length); Jackson[Jackson.length] = createMarker(new GPoint(-88.85269700,35.65177900),"
St. Marys School
1665 Hwy 45 By Pass
Jackson, TN 38305
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Marys School",'Jackson=' + Jackson.length); Oak_Ridge[Oak_Ridge.length] = createMarker(new GPoint(-84.25332500,36.01706700),"
St. Marys School
323 Vermont Avenue
Oak Ridge, TN 37830
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Marys School",'Oak_Ridge=' + Oak_Ridge.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.01646300,35.02078100),"
St. Paul Elementary School
1425 East Shelby Drive
Memphis, TN 38116
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Paul Elementary School",'Memphis=' + Memphis.length); Decherd[Decherd.length] = createMarker(new GPoint(-86.09457400,35.20800800),"
School Of The Good Shepherd
2037 Decherd Blvd
Decherd, TN 37324
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("School Of The Good Shepherd",'Decherd=' + Decherd.length); Kingsport[Kingsport.length] = createMarker(new GPoint(-82.53454500,36.53965500),"
St Dominic School
1474 E Center Street
Kingsport, TN 37664
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Dominic School",'Kingsport=' + Kingsport.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.73959700,36.11064700),"
St Edward Elementary School
190 Thompson Lane
Nashville, TN 37211
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Edward Elementary School",'Nashville=' + Nashville.length); Knoxville[Knoxville.length] = createMarker(new GPoint(-84.19267000,35.88546300),"
St John Neumann School
625 Saint John Court
Knoxville, TN 37934
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John Neumann School",'Knoxville=' + Knoxville.length); Gallatin[Gallatin.length] = createMarker(new GPoint(-86.44648500,36.39482200),"
St John Vianney Catholic School
449 N Water Avenue
Gallatin, TN 37066
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John Vianney Catholic School",'Gallatin=' + Gallatin.length); Knoxville[Knoxville.length] = createMarker(new GPoint(-83.94930500,36.02998500),"
St Joseph Elementary School
1810 Howard Drive
Knoxville, TN 37918
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph Elementary School",'Knoxville=' + Knoxville.length); Madison[Madison.length] = createMarker(new GPoint(-86.72131800,36.24620000),"
St Joseph School
1225 Gallatin Road S
Madison, TN 37115
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph School",'Madison=' + Madison.length); Clarksville[Clarksville.length] = createMarker(new GPoint(-87.30264700,36.51454400),"
St Mary S Catholic School
1901 Madison Street
Clarksville, TN 37043
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mary S Catholic School",'Clarksville=' + Clarksville.length); Johnson_City[Johnson_City.length] = createMarker(new GPoint(-82.35064700,36.35276600),"
St Mary School
2211 E Lakeview Drive
Johnson City, TN 37601
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mary School",'Johnson_City=' + Johnson_City.length); Franklin[Franklin.length] = createMarker(new GPoint(-86.95590900,36.03063000),"
St Matthew Catholic School
533 Sneed Road W
Franklin, TN 37069
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Matthew Catholic School",'Franklin=' + Franklin.length); Mc_Ewen[Mc_Ewen.length] = createMarker(new GPoint(-87.63749800,36.11001100),"
St Patrick Catholic School
175 Saint Patrick Street
Mc Ewen, TN 37101
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Patrick Catholic School",'Mc_Ewen=' + Mc_Ewen.length); Tullahoma[Tullahoma.length] = createMarker(new GPoint(-86.21560000,35.36406300),"
St Paul The Apostle School
306 West Grizzard Street
Tullahoma, TN 37388
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Paul The Apostle School",'Tullahoma=' + Tullahoma.length); Murfreesboro[Murfreesboro.length] = createMarker(new GPoint(-86.36931900,35.86467600),"
St Rose Of Lima Catholic School
1601 N Tennessee Blvd
Murfreesboro, TN 37130
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Rose Of Lima Catholic School",'Murfreesboro=' + Murfreesboro.length); Nashville[Nashville.length] = createMarker(new GPoint(-86.80529500,36.17207100),"
St Vincent School
1704 Heiman Street
Nashville, TN 37208
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Vincent School",'Nashville=' + Nashville.length); map.removeOverlays(Bartlett); map.removeOverlays(Chattanooga); map.removeOverlays(Clarksville); map.removeOverlays(Cordova); map.removeOverlays(Decherd); map.removeOverlays(Franklin); map.removeOverlays(Gallatin); map.removeOverlays(Germantown); map.removeOverlays(Hendersonville); map.removeOverlays(Jackson); map.removeOverlays(Johnson_City); map.removeOverlays(Kingsport); map.removeOverlays(Knoxville); map.removeOverlays(Lawrenceburg); map.removeOverlays(Loretto); map.removeOverlays(Madison); map.removeOverlays(Mc_Ewen); map.removeOverlays(Memphis); map.removeOverlays(Murfreesboro); map.removeOverlays(Nashville); map.removeOverlays(Oak_Ridge); map.removeOverlays(Tullahoma); setTimeout(function(){map.addOverlays(Bartlett)},1000); setTimeout(function(){map.addOverlays(Chattanooga)},1000); setTimeout(function(){map.addOverlays(Clarksville)},1000); setTimeout(function(){map.addOverlays(Cordova)},1000); setTimeout(function(){map.addOverlays(Decherd)},1000); setTimeout(function(){map.addOverlays(Franklin)},1000); setTimeout(function(){map.addOverlays(Gallatin)},1000); setTimeout(function(){map.addOverlays(Germantown)},1000); setTimeout(function(){map.addOverlays(Hendersonville)},1000); setTimeout(function(){map.addOverlays(Jackson)},1000); setTimeout(function(){map.addOverlays(Johnson_City)},1000); setTimeout(function(){map.addOverlays(Kingsport)},1000); setTimeout(function(){map.addOverlays(Knoxville)},1000); setTimeout(function(){map.addOverlays(Lawrenceburg)},1000); setTimeout(function(){map.addOverlays(Loretto)},1000); setTimeout(function(){map.addOverlays(Madison)},1000); setTimeout(function(){map.addOverlays(Mc_Ewen)},1000); setTimeout(function(){map.addOverlays(Memphis)},1000); setTimeout(function(){map.addOverlays(Murfreesboro)},1000); setTimeout(function(){map.addOverlays(Nashville)},1000); setTimeout(function(){map.addOverlays(Oak_Ridge)},1000); setTimeout(function(){map.addOverlays(Tullahoma)},1000); maxLng = -82.35064700; maxLat = 36.53965500; minLng = -90.02341000; minLat = 35.00515000; 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(Bartlett); map.removeOverlays(Chattanooga); map.removeOverlays(Clarksville); map.removeOverlays(Cordova); map.removeOverlays(Decherd); map.removeOverlays(Franklin); map.removeOverlays(Gallatin); map.removeOverlays(Germantown); map.removeOverlays(Hendersonville); map.removeOverlays(Jackson); map.removeOverlays(Johnson_City); map.removeOverlays(Kingsport); map.removeOverlays(Knoxville); map.removeOverlays(Lawrenceburg); map.removeOverlays(Loretto); map.removeOverlays(Madison); map.removeOverlays(Mc_Ewen); map.removeOverlays(Memphis); map.removeOverlays(Murfreesboro); map.removeOverlays(Nashville); map.removeOverlays(Oak_Ridge); map.removeOverlays(Tullahoma); 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(Memphis);map.removeOverlays(Bartlett); map.removeOverlays(Chattanooga); map.removeOverlays(Clarksville); map.removeOverlays(Cordova); map.removeOverlays(Decherd); map.removeOverlays(Franklin); map.removeOverlays(Gallatin); map.removeOverlays(Germantown); map.removeOverlays(Hendersonville); map.removeOverlays(Jackson); map.removeOverlays(Johnson_City); map.removeOverlays(Kingsport); map.removeOverlays(Knoxville); map.removeOverlays(Lawrenceburg); map.removeOverlays(Loretto); map.removeOverlays(Madison); map.removeOverlays(Mc_Ewen); map.removeOverlays(Memphis); map.removeOverlays(Murfreesboro); map.removeOverlays(Nashville); map.removeOverlays(Oak_Ridge); map.removeOverlays(Tullahoma); map.addOverlays(Bartlett); centerByArray(Bartlett, false, false); cntMarker += Bartlett.length; map.addOverlays(Chattanooga); centerByArray(Chattanooga, false, false); cntMarker += Chattanooga.length; map.addOverlays(Clarksville); centerByArray(Clarksville, false, false); cntMarker += Clarksville.length; map.addOverlays(Cordova); centerByArray(Cordova, false, false); cntMarker += Cordova.length; map.addOverlays(Decherd); centerByArray(Decherd, false, false); cntMarker += Decherd.length; map.addOverlays(Franklin); centerByArray(Franklin, false, false); cntMarker += Franklin.length; map.addOverlays(Gallatin); centerByArray(Gallatin, false, false); cntMarker += Gallatin.length; map.addOverlays(Germantown); centerByArray(Germantown, false, false); cntMarker += Germantown.length; map.addOverlays(Hendersonville); centerByArray(Hendersonville, false, false); cntMarker += Hendersonville.length; map.addOverlays(Jackson); centerByArray(Jackson, false, false); cntMarker += Jackson.length; map.addOverlays(Johnson_City); centerByArray(Johnson_City, false, false); cntMarker += Johnson_City.length; map.addOverlays(Kingsport); centerByArray(Kingsport, false, false); cntMarker += Kingsport.length; map.addOverlays(Knoxville); centerByArray(Knoxville, false, false); cntMarker += Knoxville.length; map.addOverlays(Lawrenceburg); centerByArray(Lawrenceburg, false, false); cntMarker += Lawrenceburg.length; map.addOverlays(Loretto); centerByArray(Loretto, false, false); cntMarker += Loretto.length; map.addOverlays(Madison); centerByArray(Madison, false, false); cntMarker += Madison.length; map.addOverlays(Mc_Ewen); centerByArray(Mc_Ewen, false, false); cntMarker += Mc_Ewen.length; map.addOverlays(Memphis); centerByArray(Memphis, false, false); cntMarker += Memphis.length; map.addOverlays(Murfreesboro); centerByArray(Murfreesboro, false, false); cntMarker += Murfreesboro.length; map.addOverlays(Nashville); centerByArray(Nashville, false, false); cntMarker += Nashville.length; map.addOverlays(Oak_Ridge); centerByArray(Oak_Ridge, false, false); cntMarker += Oak_Ridge.length; map.addOverlays(Tullahoma); centerByArray(Tullahoma, false, false); cntMarker += Tullahoma.length; centerByArray(Memphis,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///26227,26236,26290,35582,25939,26125,26181,26284,26047,26286,26236,26299,36092,26267,36093,34129,26234,26305,26302,26314,26260,26297,26298,26261,26262,26315,26316,26126,26235,26284,26288,26289,26293,26300,26308,34128,25982,26237,26291,26294,26296,26313,26304,26309,/all'); //window.open('/map.php?type=2&schools=26227,26236,26290,35582,25939,26125,26181,26284,26047,26286,26236,26299,36092,26267,36093,34129,26234,26305,26302,26314,26260,26297,26298,26261,26262,26315,26316,26126,26235,26284,26288,26289,26293,26300,26308,34128,25982,26237,26291,26294,26296,26313,26304,26309,&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; }