function addMarkers() { mySelect = document.getElementById('selection'); Decatur = [];Argenta = [];Oreana = [];Forsyth = [];Harristown = [];Maroa = [];Mount_Zion = [];Blue_Mound = [];Macon = [];Niantic = [];Warrensburg = [];mySelect.options[mySelect.options.length] = new Option("Argenta schools",'all=Argenta'); mySelect.options[mySelect.options.length] = new Option("Blue Mound schools",'all=Blue_Mound'); mySelect.options[mySelect.options.length] = new Option("Decatur schools",'all=Decatur'); mySelect.options[mySelect.options.length] = new Option("Forsyth schools",'all=Forsyth'); mySelect.options[mySelect.options.length] = new Option("Harristown schools",'all=Harristown'); mySelect.options[mySelect.options.length] = new Option("Macon schools",'all=Macon'); mySelect.options[mySelect.options.length] = new Option("Maroa schools",'all=Maroa'); mySelect.options[mySelect.options.length] = new Option("Mount Zion schools",'all=Mount_Zion'); mySelect.options[mySelect.options.length] = new Option("Niantic schools",'all=Niantic'); mySelect.options[mySelect.options.length] = new Option("Oreana schools",'all=Oreana'); mySelect.options[mySelect.options.length] = new Option("Warrensburg schools",'all=Warrensburg'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Decatur[Decatur.length] = createMarker(new GPoint(-88.95468140,39.84426117),"
Adult Teen Ged Academy
363 N Water
Decatur, IL 62523

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adult Teen Ged Academy",'Decatur=' + Decatur.length); Argenta[Argenta.length] = createMarker(new GPoint(-88.81140137,39.96929932),"
Argenta-oreana Early Learning Center
Po Box 470
Argenta, IL 62501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Argenta-oreana Early Learning Center",'Argenta=' + Argenta.length); Oreana[Oreana.length] = createMarker(new GPoint(-88.87024689,39.93753815),"
Argenta-oreana Elementary School
400 W South St
Oreana, IL 62554

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Argenta-oreana Elementary School",'Oreana=' + Oreana.length); Argenta[Argenta.length] = createMarker(new GPoint(-88.81140137,39.96929932),"
Argenta-oreana High School
Po Box 469
Argenta, IL 62501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Argenta-oreana High School",'Argenta=' + Argenta.length); Argenta[Argenta.length] = createMarker(new GPoint(-88.81140137,39.96929932),"
Argenta-oreana Junior High School
Po Box 439
Argenta, IL 62501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Argenta-oreana Junior High School",'Argenta=' + Argenta.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.98812103,39.86834717),"
Benjamin Franklin Elementary School
2440 N Summit Ave
Decatur, IL 62526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Benjamin Franklin Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95314026,39.83917618),"
Bivens Whitten Juvenile Det Center
333 S Franklin St
Decatur, IL 62523

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bivens Whitten Juvenile Det Center",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.89804077,39.85245514),"
Brush College Elementary School
575 Brush College Rd
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brush College Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95313600,39.84582000),"
Decatur Area Technical Academy
300 E Eldorado
Decatur, IL 62523

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Decatur Area Technical Academy",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.96420288,39.90449905),"
Decatur Correctional Center
Po Box 3066
Decatur, IL 62524

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Decatur Correctional Center",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.98181915,39.84096146),"
Dennis Elementary School
1499 W Main St
Decatur, IL 62522

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dennis Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.97037506,39.85483551),"
Durfee Elementary School
1000 W Grand Ave
Decatur, IL 62522

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Durfee Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.93531799,39.82970047),"
Eisenhower High School
1200 S 16th St
Decatur, IL 62521

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eisenhower High School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.98197937,39.81649017),"
Enterprise Elementary School
2115 S Taylor Rd
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Enterprise Elementary School",'Decatur=' + Decatur.length); Forsyth[Forsyth.length] = createMarker(new GPoint(-88.95243835,39.93457031),"
Forsyth Grade School
137 Grant St
Forsyth, IL 62535

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forsyth Grade School",'Forsyth=' + Forsyth.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95353699,39.84373856),"
Futures Unlimited High School
250 E William St
Decatur, IL 62523

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Futures Unlimited High School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95867920,39.81556320),"
Garfield Montessori School
300 Meadow Terrace
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Garfield Montessori School",'Decatur=' + Decatur.length); Harristown[Harristown.length] = createMarker(new GPoint(-89.08380127,39.85380173),"
Harristown Elementary School
Po Box 79
Harristown, IL 62537

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harristown Elementary School",'Harristown=' + Harristown.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95426941,39.84022903),"
Heartland Region Efe/dual Credit
300 E Eldorado Rm117
Decatur, IL 62523

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heartland Region Efe/dual Credit",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.94223500,39.85147900),"
Hope Academy
955 N Illinois
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hope Academy",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.94430542,39.83793640),"
Johns Hill Magnet School
1025 E Johns Ave
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Johns Hill Magnet School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.97777557,39.85274124),"
Macarthur High School
1155 N Fairview Ave
Decatur, IL 62526

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Macarthur High School",'Decatur=' + Decatur.length); Maroa[Maroa.length] = createMarker(new GPoint(-88.95469666,40.02959824),"
Maroa Grade School
Po Box 738
Maroa, IL 61756

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Maroa Grade School",'Maroa=' + Maroa.length); Maroa[Maroa.length] = createMarker(new GPoint(-88.95469666,40.02959824),"
Maroa-forsyth Junior High School
Po Box 738
Maroa, IL 61756

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Maroa-forsyth Junior High School",'Maroa=' + Maroa.length); Maroa[Maroa.length] = createMarker(new GPoint(-88.95469666,40.02959824),"
Maroa-forsyth Senior High School
Po Box 738
Maroa, IL 61756

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maroa-forsyth Senior High School",'Maroa=' + Maroa.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.96222687,39.84041595),"
Mary W French Academy
520 W Wood St
Decatur, IL 62522

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mary W French Academy",'Decatur=' + Decatur.length); Mount_Zion[Mount_Zion.length] = createMarker(new GPoint(-88.88914490,39.77723694),"
Mcgaughey Elementary School
1320 W Main St
Mount Zion, IL 62549

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcgaughey Elementary School",'Mount_Zion=' + Mount_Zion.length); Blue_Mound[Blue_Mound.length] = createMarker(new GPoint(-89.13159943,39.70700073),"
Meridian Intermediate School
Po Box 350
Blue Mound, IL 62513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meridian Intermediate School",'Blue_Mound=' + Blue_Mound.length); Blue_Mound[Blue_Mound.length] = createMarker(new GPoint(-89.13159943,39.70700073),"
Meridian Middle School
Po Box 320
Blue Mound, IL 62513

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Meridian Middle School",'Blue_Mound=' + Blue_Mound.length); Macon[Macon.length] = createMarker(new GPoint(-88.98069763,39.70429993),"
Meridian Primary School
Po Box 198
Macon, IL 62544

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meridian Primary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-88.98069763,39.70429993),"
Meridian Senior High School
Po Box 380
Macon, IL 62544

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Meridian Senior High School",'Macon=' + Macon.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.89297485,39.83435059),"
Michael E Baum Elementary School
801 S Lake Ridge Ave
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Michael E Baum Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95468140,39.84426117),"
Milligan Academy Rssp
432 N Water St
Decatur, IL 62523

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Milligan Academy Rssp",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95537567,39.89108658),"
Mound Middle School
3789 N Water St
Decatur, IL 62526

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mound Middle School",'Decatur=' + Decatur.length); Mount_Zion[Mount_Zion.length] = createMarker(new GPoint(-88.87924194,39.77415848),"
Mt Zion Elementary School
725 W Main St
Mount Zion, IL 62549

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mt Zion Elementary School",'Mount_Zion=' + Mount_Zion.length); Mount_Zion[Mount_Zion.length] = createMarker(new GPoint(-88.87519073,39.76746750),"
Mt Zion High School
305 S Henderson St
Mount Zion, IL 62549

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt Zion High School",'Mount_Zion=' + Mount_Zion.length); Mount_Zion[Mount_Zion.length] = createMarker(new GPoint(-88.87484741,39.76726151),"
Mt Zion Intermediate School
310 S Henderson St
Mount Zion, IL 62549

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mt Zion Intermediate School",'Mount_Zion=' + Mount_Zion.length); Mount_Zion[Mount_Zion.length] = createMarker(new GPoint(-88.87521362,39.76707458),"
Mt Zion Junior High School
315 S Henderson St
Mount Zion, IL 62549

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mt Zion Junior High School",'Mount_Zion=' + Mount_Zion.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.90661621,39.82904053),"
Muffley Elementary School
88 S Country Club Rd
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Muffley Elementary School",'Decatur=' + Decatur.length); Niantic[Niantic.length] = createMarker(new GPoint(-89.16790009,39.85440063),"
Niantic-harristown High School
Po Box 200
Niantic, IL 62551

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Niantic-harristown High School",'Niantic=' + Niantic.length); Niantic[Niantic.length] = createMarker(new GPoint(-89.16790009,39.85440063),"
Niantic-harristown Junior High School
Po Box 200
Niantic, IL 62551

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Niantic-harristown Junior High School",'Niantic=' + Niantic.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.99084473,39.85607910),"
Oak Grove Accelerated School
2160 W Center St
Decatur, IL 62526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Grove Accelerated School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.96467590,39.88726425),"
Parsons Accelerated School
3591 N Macarthur Rd
Decatur, IL 62526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parsons Accelerated School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.97521973,39.87489700),"
Pershing Early Learning Center
2912 N University
Decatur, IL 62526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pershing Early Learning Center",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.93739319,39.84533691),"
Robertson Charter School
1454 E North St
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Robertson Charter School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.94339752,39.86740112),"
Salem Elementary School
2610 Salem Sch Rd
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Salem Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95221710,39.81060791),"
South Shores Elementary School
2500 S Franklin St
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Shores Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.92942047,39.83223724),"
Southeast Elementary School
1900 E Cleveland Ave
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southeast Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.93247223,39.82653809),"
St Marys Adolescent Ed Program
1800 E Lakeshore Dr
Decatur, IL 62521

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Marys Adolescent Ed Program",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.94100189,39.88708878),"
Stephen Decatur Middle School
1 Educational Park
Decatur, IL 62526

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Stephen Decatur Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.94571686,39.89945984),"
Stevenson Accelerated School
3900 N Neely Ave
Decatur, IL 62526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stevenson Accelerated School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.95843506,39.89106369),"
Sunnyside School
303 W Mound Rd
Decatur, IL 62526

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunnyside School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.88278198,39.83440018),"
Thomas Jefferson Middle School
4735 E Cantrell St
Decatur, IL 62521

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson Middle School",'Decatur=' + Decatur.length); Warrensburg[Warrensburg.length] = createMarker(new GPoint(-89.06719971,39.93289948),"
Warrensburg-latham Elem/middle Elementary School
100 West St
Warrensburg, IL 62573

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Warrensburg-latham Elem/middle Elementary School",'Warrensburg=' + Warrensburg.length); Warrensburg[Warrensburg.length] = createMarker(new GPoint(-89.06845856,39.93296432),"
Warrensburg-latham High School
425 W North St
Warrensburg, IL 62573

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Warrensburg-latham High School",'Warrensburg=' + Warrensburg.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.94471741,39.83796310),"
Washington Elementary School
400 S Maffit St
Decatur, IL 62521

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-88.94966888,39.86243820),"
William Harris Elementary School
620 E Garfield Ave
Decatur, IL 62526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("William Harris Elementary School",'Decatur=' + Decatur.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(Argenta); map.removeOverlays(Blue_Mound); map.removeOverlays(Decatur); map.removeOverlays(Forsyth); map.removeOverlays(Harristown); map.removeOverlays(Macon); map.removeOverlays(Maroa); map.removeOverlays(Mount_Zion); map.removeOverlays(Niantic); map.removeOverlays(Oreana); map.removeOverlays(Warrensburg); 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(Decatur);map.removeOverlays(Argenta); map.removeOverlays(Blue_Mound); map.removeOverlays(Decatur); map.removeOverlays(Forsyth); map.removeOverlays(Harristown); map.removeOverlays(Macon); map.removeOverlays(Maroa); map.removeOverlays(Mount_Zion); map.removeOverlays(Niantic); map.removeOverlays(Oreana); map.removeOverlays(Warrensburg); map.addOverlays(Argenta); centerByArray(Argenta, false, false); cntMarker += Argenta.length; map.addOverlays(Blue_Mound); centerByArray(Blue_Mound, false, false); cntMarker += Blue_Mound.length; map.addOverlays(Decatur); centerByArray(Decatur, false, false); cntMarker += Decatur.length; map.addOverlays(Forsyth); centerByArray(Forsyth, false, false); cntMarker += Forsyth.length; map.addOverlays(Harristown); centerByArray(Harristown, false, false); cntMarker += Harristown.length; map.addOverlays(Macon); centerByArray(Macon, false, false); cntMarker += Macon.length; map.addOverlays(Maroa); centerByArray(Maroa, false, false); cntMarker += Maroa.length; map.addOverlays(Mount_Zion); centerByArray(Mount_Zion, false, false); cntMarker += Mount_Zion.length; map.addOverlays(Niantic); centerByArray(Niantic, false, false); cntMarker += Niantic.length; map.addOverlays(Oreana); centerByArray(Oreana, false, false); cntMarker += Oreana.length; map.addOverlays(Warrensburg); centerByArray(Warrensburg, false, false); cntMarker += Warrensburg.length; centerByArray(Decatur,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'); } }