function addMarkers() { mySelect = document.getElementById('selection'); Medford = [];Applegate = [];Phoenix = [];Ashland = [];Butte_Falls = [];Central_Point = [];Eagle_Point = [];Trail = [];Rogue_River = [];Gold_Hill = [];Jacksonville = [];White_City = [];Prospect = [];Shady_Cove = [];Talent = [];mySelect.options[mySelect.options.length] = new Option("Applegate schools",'all=Applegate'); mySelect.options[mySelect.options.length] = new Option("Ashland schools",'all=Ashland'); mySelect.options[mySelect.options.length] = new Option("Butte Falls schools",'all=Butte_Falls'); mySelect.options[mySelect.options.length] = new Option("Central Point schools",'all=Central_Point'); mySelect.options[mySelect.options.length] = new Option("Eagle Point schools",'all=Eagle_Point'); mySelect.options[mySelect.options.length] = new Option("Gold Hill schools",'all=Gold_Hill'); mySelect.options[mySelect.options.length] = new Option("Jacksonville schools",'all=Jacksonville'); mySelect.options[mySelect.options.length] = new Option("Medford schools",'all=Medford'); mySelect.options[mySelect.options.length] = new Option("Phoenix schools",'all=Phoenix'); mySelect.options[mySelect.options.length] = new Option("Prospect schools",'all=Prospect'); mySelect.options[mySelect.options.length] = new Option("Rogue River schools",'all=Rogue_River'); mySelect.options[mySelect.options.length] = new Option("Shady Cove schools",'all=Shady_Cove'); mySelect.options[mySelect.options.length] = new Option("Talent schools",'all=Talent'); mySelect.options[mySelect.options.length] = new Option("Trail schools",'all=Trail'); mySelect.options[mySelect.options.length] = new Option("White City schools",'all=White_City'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Medford[Medford.length] = createMarker(new GPoint(-122.83628845,42.36267471),"
Abraham Lincoln Elementary School
3101 Mcloughlin Dr
Medford, OR 97504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Abraham Lincoln Elementary School",'Medford=' + Medford.length); Applegate[Applegate.length] = createMarker(new GPoint(-123.15338898,42.25366211),"
Applegate Elementary School
14188 Hwy 238
Applegate, OR 97530

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Applegate Elementary School",'Applegate=' + Applegate.length); Phoenix[Phoenix.length] = createMarker(new GPoint(-122.81710052,42.27410126),"
Armadillo Technical Institute
Po Box 1560
Phoenix, OR 97535

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Armadillo Technical Institute",'Phoenix=' + Phoenix.length); Ashland[Ashland.length] = createMarker(new GPoint(-122.69948578,42.19025421),"
Ashland High School
201 S Mountain Ave
Ashland, OR 97520

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ashland High School",'Ashland=' + Ashland.length); Ashland[Ashland.length] = createMarker(new GPoint(-122.68801117,42.19096375),"
Ashland Middle School
100 Walker Ave
Ashland, OR 97520

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ashland Middle School",'Ashland=' + Ashland.length); Ashland[Ashland.length] = createMarker(new GPoint(-122.67131042,42.17590332),"
Bellview Elementary School
1070 Tolman Creek Rd
Ashland, OR 97520

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bellview Elementary School",'Ashland=' + Ashland.length); Butte_Falls[Butte_Falls.length] = createMarker(new GPoint(-122.49990082,42.57049942),"
Butte Falls Elementary School
Po Box 197
Butte Falls, OR 97522

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Butte Falls Elementary School",'Butte_Falls=' + Butte_Falls.length); Butte_Falls[Butte_Falls.length] = createMarker(new GPoint(-122.49990082,42.57049942),"
Butte Falls High School
Po Box 167
Butte Falls, OR 97522

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Butte Falls High School",'Butte_Falls=' + Butte_Falls.length); Central_Point[Central_Point.length] = createMarker(new GPoint(-122.91104889,42.37167358),"
Central Point Elementary School
450 S 4th St
Central Point, OR 97502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Central Point Elementary School",'Central_Point=' + Central_Point.length); Central_Point[Central_Point.length] = createMarker(new GPoint(-122.92675018,42.38298035),"
Crater High School
4410 Rogue Valley Blvd
Central Point, OR 97502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crater High School",'Central_Point=' + Central_Point.length); Eagle_Point[Eagle_Point.length] = createMarker(new GPoint(-122.77469635,42.47919846),"
Eagle Point High School
Po Box 198
Eagle Point, OR 97524

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eagle Point High School",'Eagle_Point=' + Eagle_Point.length); Eagle_Point[Eagle_Point.length] = createMarker(new GPoint(-122.77469635,42.47919846),"
Eagle Point Middle School
Po Box 218
Eagle Point, OR 97524

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Eagle Point Middle School",'Eagle_Point=' + Eagle_Point.length); Eagle_Point[Eagle_Point.length] = createMarker(new GPoint(-122.77469635,42.47919846),"
Eagle Rock Elementary School
Po Box 197
Eagle Point, OR 97524

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eagle Rock Elementary School",'Eagle_Point=' + Eagle_Point.length); Trail[Trail.length] = createMarker(new GPoint(-122.74624634,42.66740036),"
Elk Trail Elementary School
591 Elk Creek Rd
Trail, OR 97541

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elk Trail Elementary School",'Trail=' + Trail.length); Rogue_River[Rogue_River.length] = createMarker(new GPoint(-123.14119720,42.56359863),"
Evans Valley Elementary School
Po Box 1045
Rogue River, OR 97537

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Evans Valley Elementary School",'Rogue_River=' + Rogue_River.length); Medford[Medford.length] = createMarker(new GPoint(-122.90708160,42.29426956),"
Griffin Creek Elementary School
2430 Griffin Creek Rd
Medford, OR 97501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Griffin Creek Elementary School",'Medford=' + Medford.length); Gold_Hill[Gold_Hill.length] = createMarker(new GPoint(-123.05357361,42.43450546),"
Hanby Middle School
806 6th Ave
Gold Hill, OR 97525

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hanby Middle School",'Gold_Hill=' + Gold_Hill.length); Medford[Medford.length] = createMarker(new GPoint(-122.85320282,42.33123779),"
Hedrick Middle School
1501 E Jackson St
Medford, OR 97504

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hedrick Middle School",'Medford=' + Medford.length); Ashland[Ashland.length] = createMarker(new GPoint(-122.71228027,42.20985794),"
Helman Elementary School
705 Helman St
Ashland, OR 97520

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Helman Elementary School",'Ashland=' + Ashland.length); Medford[Medford.length] = createMarker(new GPoint(-122.84107208,42.32061768),"
Hoover Elementary School
2323 Siskiyou Blvd
Medford, OR 97504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hoover Elementary School",'Medford=' + Medford.length); Medford[Medford.length] = createMarker(new GPoint(-122.89034271,42.35814667),"
Howard Elementary School
286 Mace Rd
Medford, OR 97501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Howard Elementary School",'Medford=' + Medford.length); Medford[Medford.length] = createMarker(new GPoint(-122.88699341,42.33113861),"
Jackson Elementary School
630 W Jackson St
Medford, OR 97501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jackson Elementary School",'Medford=' + Medford.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-122.95895386,42.31648636),"
Jacksonville Elementary School
655 Hueners Ln
Jacksonville, OR 97530

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jacksonville Elementary School",'Jacksonville=' + Jacksonville.length); Medford[Medford.length] = createMarker(new GPoint(-122.86751556,42.30968475),"
Jefferson Elementary School
333 Holmes Ave
Medford, OR 97501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Medford=' + Medford.length); Central_Point[Central_Point.length] = createMarker(new GPoint(-122.91017151,42.37910080),"
Jewett Elementary School
1001 Manzanita St
Central Point, OR 97502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jewett Elementary School",'Central_Point=' + Central_Point.length); Medford[Medford.length] = createMarker(new GPoint(-122.85231018,42.35854721),"
Kennedy Elementary School
2860 N Keene Way Dr
Medford, OR 97504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kennedy Elementary School",'Medford=' + Medford.length); Eagle_Point[Eagle_Point.length] = createMarker(new GPoint(-122.63582611,42.42787552),"
Lake Creek Learning Center
391 Lake Creek Loop Rd
Eagle Point, OR 97524

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake Creek Learning Center",'Eagle_Point=' + Eagle_Point.length); Eagle_Point[Eagle_Point.length] = createMarker(new GPoint(-122.77469635,42.47919846),"
Little Butte School
Po Box 549
Eagle Point, OR 97524

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Little Butte School",'Eagle_Point=' + Eagle_Point.length); Medford[Medford.length] = createMarker(new GPoint(-122.83273315,42.34546280),"
Lone Pine Elementary School
3158 Lone Pine Rd
Medford, OR 97504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lone Pine Elementary School",'Medford=' + Medford.length); Medford[Medford.length] = createMarker(new GPoint(-122.88059998,42.32853699),"
Mcloughlin Middle School
320 W Second St
Medford, OR 97501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcloughlin Middle School",'Medford=' + Medford.length); Medford[Medford.length] = createMarker(new GPoint(-122.87198639,42.31763840),"
Medford Opportunity High School
500 Monroe St
Medford, OR 97501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Medford Opportunity High School",'Medford=' + Medford.length); White_City[White_City.length] = createMarker(new GPoint(-122.83718872,42.43107224),"
Mountain View Elementary School
7837 Hale Way
White City, OR 97503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'White_City=' + White_City.length); Medford[Medford.length] = createMarker(new GPoint(-122.85240936,42.34603882),"
North Medford High School
1900 N Keene Way Dr
Medford, OR 97504

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Medford High School",'Medford=' + Medford.length); Medford[Medford.length] = createMarker(new GPoint(-122.90947723,42.32393646),"
Oak Grove Elementary School
2838 W Main St
Medford, OR 97501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Grove Elementary School",'Medford=' + Medford.length); Medford[Medford.length] = createMarker(new GPoint(-122.83131409,42.30965042),"
Orchard Hill Elementary School
1011 Laloma Dr
Medford, OR 97504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Orchard Hill Elementary School",'Medford=' + Medford.length); Gold_Hill[Gold_Hill.length] = createMarker(new GPoint(-123.06290436,42.43338013),"
Patrick Elementary School
1500 2nd Ave
Gold Hill, OR 97525

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Patrick Elementary School",'Gold_Hill=' + Gold_Hill.length); Phoenix[Phoenix.length] = createMarker(new GPoint(-122.81710052,42.27410126),"
Phoenix Elementary School
Po Box 727
Phoenix, OR 97535

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Phoenix Elementary School",'Phoenix=' + Phoenix.length); Phoenix[Phoenix.length] = createMarker(new GPoint(-122.81710052,42.27410126),"
Phoenix High School
Po Box 697
Phoenix, OR 97535

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phoenix High School",'Phoenix=' + Phoenix.length); Ashland[Ashland.length] = createMarker(new GPoint(-122.39823914,42.10947800),"
Pinehurst Elementary School
15337 Hwy 66
Ashland, OR 97520

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pinehurst Elementary School",'Ashland=' + Ashland.length); Prospect[Prospect.length] = createMarker(new GPoint(-122.51921844,42.84857941),"
Prospect School
Po Box 40
Prospect, OR 97536

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Prospect School",'Prospect=' + Prospect.length); Central_Point[Central_Point.length] = createMarker(new GPoint(-122.92015839,42.37283707),"
Richardson Elementary School
200 W Pine St
Central Point, OR 97502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Richardson Elementary School",'Central_Point=' + Central_Point.length); Rogue_River[Rogue_River.length] = createMarker(new GPoint(-123.14119720,42.56359863),"
Rogue River Elementary School
Po Box 1045
Rogue River, OR 97537

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rogue River Elementary School",'Rogue_River=' + Rogue_River.length); Rogue_River[Rogue_River.length] = createMarker(new GPoint(-123.14119720,42.56359863),"
Rogue River High School
Po Box 1045
Rogue River, OR 97537

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rogue River High School",'Rogue_River=' + Rogue_River.length); Rogue_River[Rogue_River.length] = createMarker(new GPoint(-123.14119720,42.56359863),"
Rogue River Middle School
Po Box 1045
Rogue River, OR 97537

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rogue River Middle School",'Rogue_River=' + Rogue_River.length); Medford[Medford.length] = createMarker(new GPoint(-122.85771179,42.32968903),"
Roosevelt Elementary School
112 Lindley St
Medford, OR 97504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Medford=' + Medford.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-123.04270172,42.23505402),"
Ruch Elementary School
156 Upper Applegate Rd
Jacksonville, OR 97530

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ruch Elementary School",'Jacksonville=' + Jacksonville.length); Central_Point[Central_Point.length] = createMarker(new GPoint(-122.93518066,42.49429321),"
Sams Valley Elementary School
14235 Table Rock Rd
Central Point, OR 97502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sams Valley Elementary School",'Central_Point=' + Central_Point.length); Central_Point[Central_Point.length] = createMarker(new GPoint(-122.92411041,42.38845444),"
Scenic Middle School
1955 Scenic Ave
Central Point, OR 97502

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Scenic Middle School",'Central_Point=' + Central_Point.length); Shady_Cove[Shady_Cove.length] = createMarker(new GPoint(-122.81999969,42.61080170),"
Shady Cove School
Po Box 138
Shady Cove, OR 97539

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Shady Cove School",'Shady_Cove=' + Shady_Cove.length); Medford[Medford.length] = createMarker(new GPoint(-122.87426758,42.31604767),"
South Medford High School
815 S Oakdale Ave
Medford, OR 97501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Medford High School",'Medford=' + Medford.length); Ashland[Ashland.length] = createMarker(new GPoint(-122.68238068,42.18356323),"
Southern Oregon Cstc Elementary School
1836 Fremont St
Ashland, OR 97520

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southern Oregon Cstc Elementary School",'Ashland=' + Ashland.length); Talent[Talent.length] = createMarker(new GPoint(-122.78639984,42.23899841),"
Talent Elementary School
Po Box 296
Talent, OR 97540

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Talent Elementary School",'Talent=' + Talent.length); Talent[Talent.length] = createMarker(new GPoint(-122.78639984,42.23899841),"
Talent Middle School
Po Box 359
Talent, OR 97540

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Talent Middle School",'Talent=' + Talent.length); Ashland[Ashland.length] = createMarker(new GPoint(-122.68801117,42.18836212),"
Walker Elementary School
364 Walker Ave
Ashland, OR 97520

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walker Elementary School",'Ashland=' + Ashland.length); Medford[Medford.length] = createMarker(new GPoint(-122.88278198,42.31710815),"
Washington Elementary School
610 S Peach St
Medford, OR 97501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Medford=' + Medford.length); White_City[White_City.length] = createMarker(new GPoint(-122.83838900,42.43831500),"
White City Elementary School
2830 Maple Court Dr
White City, OR 97503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("White City Elementary School",'White_City=' + White_City.length); White_City[White_City.length] = createMarker(new GPoint(-122.85500336,42.33301926),"
White Mountain Middle School
550 Wilson Way
White City, OR 97503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("White Mountain Middle School",'White_City=' + White_City.length); Medford[Medford.length] = createMarker(new GPoint(-122.86730957,42.34556198),"
Wilson Elementary School
1400 Johnson St
Medford, OR 97504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wilson Elementary School",'Medford=' + Medford.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(Applegate); map.removeOverlays(Ashland); map.removeOverlays(Butte_Falls); map.removeOverlays(Central_Point); map.removeOverlays(Eagle_Point); map.removeOverlays(Gold_Hill); map.removeOverlays(Jacksonville); map.removeOverlays(Medford); map.removeOverlays(Phoenix); map.removeOverlays(Prospect); map.removeOverlays(Rogue_River); map.removeOverlays(Shady_Cove); map.removeOverlays(Talent); map.removeOverlays(Trail); map.removeOverlays(White_City); 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(Medford);map.removeOverlays(Applegate); map.removeOverlays(Ashland); map.removeOverlays(Butte_Falls); map.removeOverlays(Central_Point); map.removeOverlays(Eagle_Point); map.removeOverlays(Gold_Hill); map.removeOverlays(Jacksonville); map.removeOverlays(Medford); map.removeOverlays(Phoenix); map.removeOverlays(Prospect); map.removeOverlays(Rogue_River); map.removeOverlays(Shady_Cove); map.removeOverlays(Talent); map.removeOverlays(Trail); map.removeOverlays(White_City); map.addOverlays(Applegate); centerByArray(Applegate, false, false); cntMarker += Applegate.length; map.addOverlays(Ashland); centerByArray(Ashland, false, false); cntMarker += Ashland.length; map.addOverlays(Butte_Falls); centerByArray(Butte_Falls, false, false); cntMarker += Butte_Falls.length; map.addOverlays(Central_Point); centerByArray(Central_Point, false, false); cntMarker += Central_Point.length; map.addOverlays(Eagle_Point); centerByArray(Eagle_Point, false, false); cntMarker += Eagle_Point.length; map.addOverlays(Gold_Hill); centerByArray(Gold_Hill, false, false); cntMarker += Gold_Hill.length; map.addOverlays(Jacksonville); centerByArray(Jacksonville, false, false); cntMarker += Jacksonville.length; map.addOverlays(Medford); centerByArray(Medford, false, false); cntMarker += Medford.length; map.addOverlays(Phoenix); centerByArray(Phoenix, false, false); cntMarker += Phoenix.length; map.addOverlays(Prospect); centerByArray(Prospect, false, false); cntMarker += Prospect.length; map.addOverlays(Rogue_River); centerByArray(Rogue_River, false, false); cntMarker += Rogue_River.length; map.addOverlays(Shady_Cove); centerByArray(Shady_Cove, false, false); cntMarker += Shady_Cove.length; map.addOverlays(Talent); centerByArray(Talent, false, false); cntMarker += Talent.length; map.addOverlays(Trail); centerByArray(Trail, false, false); cntMarker += Trail.length; map.addOverlays(White_City); centerByArray(White_City, false, false); cntMarker += White_City.length; centerByArray(Medford,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'); } }