function addMarkers() { mySelect = document.getElementById('selection'); Winston = [];Camas_Valley = [];Canyonville = [];Myrtle_Creek = [];Days_Creek = [];Sutherlin = [];Roseburg = [];Elkton = [];Glendale = [];Glide = [];Reedsport = [];Oakland = [];Drain = [];Riddle = [];Tenmile = [];Tiller = [];Idleyld_Park = [];Gardiner = [];Winchester = [];Yoncalla = [];mySelect.options[mySelect.options.length] = new Option("Camas Valley schools",'all=Camas_Valley'); mySelect.options[mySelect.options.length] = new Option("Canyonville schools",'all=Canyonville'); mySelect.options[mySelect.options.length] = new Option("Days Creek schools",'all=Days_Creek'); mySelect.options[mySelect.options.length] = new Option("Drain schools",'all=Drain'); mySelect.options[mySelect.options.length] = new Option("Elkton schools",'all=Elkton'); mySelect.options[mySelect.options.length] = new Option("Gardiner schools",'all=Gardiner'); mySelect.options[mySelect.options.length] = new Option("Glendale schools",'all=Glendale'); mySelect.options[mySelect.options.length] = new Option("Glide schools",'all=Glide'); mySelect.options[mySelect.options.length] = new Option("Idleyld Park schools",'all=Idleyld_Park'); mySelect.options[mySelect.options.length] = new Option("Myrtle Creek schools",'all=Myrtle_Creek'); mySelect.options[mySelect.options.length] = new Option("Oakland schools",'all=Oakland'); mySelect.options[mySelect.options.length] = new Option("Reedsport schools",'all=Reedsport'); mySelect.options[mySelect.options.length] = new Option("Riddle schools",'all=Riddle'); mySelect.options[mySelect.options.length] = new Option("Roseburg schools",'all=Roseburg'); mySelect.options[mySelect.options.length] = new Option("Sutherlin schools",'all=Sutherlin'); mySelect.options[mySelect.options.length] = new Option("Tenmile schools",'all=Tenmile'); mySelect.options[mySelect.options.length] = new Option("Tiller schools",'all=Tiller'); mySelect.options[mySelect.options.length] = new Option("Winchester schools",'all=Winchester'); mySelect.options[mySelect.options.length] = new Option("Winston schools",'all=Winston'); mySelect.options[mySelect.options.length] = new Option("Yoncalla schools",'all=Yoncalla'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Winston[Winston.length] = createMarker(new GPoint(-123.45030212,43.07979965),"
Brockway Elementary School
2520 Nw Brockway Rd
Winston, OR 97496

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brockway Elementary School",'Winston=' + Winston.length); Camas_Valley[Camas_Valley.length] = createMarker(new GPoint(-123.70240021,43.02009964),"
Camas Valley School
Po Box 57
Camas Valley, OR 97416

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Camas Valley School",'Camas_Valley=' + Camas_Valley.length); Canyonville[Canyonville.length] = createMarker(new GPoint(-123.27159882,42.93600082),"
Canyonville School
Po Box 745
Canyonville, OR 97417

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Canyonville School",'Canyonville=' + Canyonville.length); Myrtle_Creek[Myrtle_Creek.length] = createMarker(new GPoint(-123.28163147,43.02874756),"
Coffenberry Middle School
591 Ne Rice
Myrtle Creek, OR 97457

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Coffenberry Middle School",'Myrtle_Creek=' + Myrtle_Creek.length); Days_Creek[Days_Creek.length] = createMarker(new GPoint(-123.10669708,42.97700119),"
Days Creek School
Po Box 10
Days Creek, OR 97429

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Days Creek School",'Days_Creek=' + Days_Creek.length); Winston[Winston.length] = createMarker(new GPoint(-123.44155884,43.11256409),"
Douglas High School
1381 Nw Douglas
Winston, OR 97496

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Douglas High School",'Winston=' + Winston.length); Sutherlin[Sutherlin.length] = createMarker(new GPoint(-123.30986023,43.39324570),"
East Sutherlin Primary School
323 E Third Ave
Sutherlin, OR 97479

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("East Sutherlin Primary School",'Sutherlin=' + Sutherlin.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.31990814,43.20734787),"
Eastwood Elementary School
2550 Se Waldon Ave
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eastwood Elementary School",'Roseburg=' + Roseburg.length); Elkton[Elkton.length] = createMarker(new GPoint(-123.59040070,43.64690018),"
Elkton Elementary School
Po Box 390
Elkton, OR 97436

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elkton Elementary School",'Elkton=' + Elkton.length); Elkton[Elkton.length] = createMarker(new GPoint(-123.59040070,43.64690018),"
Elkton High School
Po Box 390
Elkton, OR 97436

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elkton High School",'Elkton=' + Elkton.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.36444092,43.21433640),"
Fir Grove Elementary School
1360 W Harvard Ave
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fir Grove Elementary School",'Roseburg=' + Roseburg.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.38170624,43.21683884),"
Fullerton Iv Elementary School
2560 W Bradford Ave
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fullerton Iv Elementary School",'Roseburg=' + Roseburg.length); Glendale[Glendale.length] = createMarker(new GPoint(-123.49849701,42.80599976),"
Glendale Elementary School
Po Box E
Glendale, OR 97442

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Glendale Elementary School",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-123.49849701,42.80599976),"
Glendale High School
Po Box E
Glendale, OR 97442

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Glendale High School",'Glendale=' + Glendale.length); Glide[Glide.length] = createMarker(new GPoint(-123.08921051,43.30813217),"
Glide Elementary School
1477 Glide Loop Dr
Glide, OR 97443

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Glide Elementary School",'Glide=' + Glide.length); Glide[Glide.length] = createMarker(new GPoint(-123.09638214,43.29917145),"
Glide High School
18990 N Umpqua Hwy
Glide, OR 97443

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Glide High School",'Glide=' + Glide.length); Glide[Glide.length] = createMarker(new GPoint(-123.10101318,43.29978943),"
Glide Middle School
301 Glide Loop Dr
Glide, OR 97443

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Glide Middle School",'Glide=' + Glide.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.38131714,43.14824295),"
Green Primary School
4498 Sw Carnes Rd
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Green Primary School",'Roseburg=' + Roseburg.length); Reedsport[Reedsport.length] = createMarker(new GPoint(-124.12763977,43.69226456),"
Highland Elementary School
2605 Longwood Dr
Reedsport, OR 97467

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Highland Elementary School",'Reedsport=' + Reedsport.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.38048553,43.23058319),"
Hucrest Elementary School
1810 Nw Kline St
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hucrest Elementary School",'Roseburg=' + Roseburg.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.37088776,43.21205521),"
John C Fremont Middle School
850 W Keady Ct
Roseburg, OR 97470

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("John C Fremont Middle School",'Roseburg=' + Roseburg.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.34711456,43.23610687),"
Joseph Lane Middle School
2153 Ne Vine St
Roseburg, OR 97470

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Joseph Lane Middle School",'Roseburg=' + Roseburg.length); Oakland[Oakland.length] = createMarker(new GPoint(-123.35970306,43.47219849),"
Lincoln Middle School
Po Box 420
Oakland, OR 97462

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lincoln Middle School",'Oakland=' + Oakland.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.48608398,43.17770004),"
Lookingglass Elementary School
7421 Lookingglass Rd
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lookingglass Elementary School",'Roseburg=' + Roseburg.length); Winston[Winston.length] = createMarker(new GPoint(-123.42205048,43.12106705),"
Mcgovern Elementary School
600 Nw Elwood
Winston, OR 97496

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcgovern Elementary School",'Winston=' + Winston.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.44562531,43.24391556),"
Melrose Elementary School
2960 Melrose Rd
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Melrose Elementary School",'Roseburg=' + Roseburg.length); Myrtle_Creek[Myrtle_Creek.length] = createMarker(new GPoint(-123.27964783,43.02736282),"
Myrtle Creek Elementary School
651 Ne Division
Myrtle Creek, OR 97457

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Myrtle Creek Elementary School",'Myrtle_Creek=' + Myrtle_Creek.length); Drain[Drain.length] = createMarker(new GPoint(-123.38649750,43.70819855),"
North Douglas Elementary School
Po Box 338
Drain, OR 97435

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Douglas Elementary School",'Drain=' + Drain.length); Drain[Drain.length] = createMarker(new GPoint(-123.38649750,43.70819855),"
North Douglas High School
Po Box 488
Drain, OR 97435

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Douglas High School",'Drain=' + Drain.length); Oakland[Oakland.length] = createMarker(new GPoint(-123.35970306,43.47219849),"
Oakland Elementary School
Po Box 90
Oakland, OR 97462

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakland Elementary School",'Oakland=' + Oakland.length); Oakland[Oakland.length] = createMarker(new GPoint(-123.35970306,43.47219849),"
Oakland High School
Po Box 479
Oakland, OR 97462

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oakland High School",'Oakland=' + Oakland.length); Reedsport[Reedsport.length] = createMarker(new GPoint(-124.12470245,43.69400024),"
Reedsport Junior/high School
2260 Longwood Dr
Reedsport, OR 97467

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Reedsport Junior/high School",'Reedsport=' + Reedsport.length); Riddle[Riddle.length] = createMarker(new GPoint(-123.36706300,42.95179000),"
Riddle Education Center
Po Box 45
Riddle, OR 97469

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riddle Education Center",'Riddle=' + Riddle.length); Riddle[Riddle.length] = createMarker(new GPoint(-123.36093903,42.95241165),"
Riddle Elementary School
Fifth Park Sts
Riddle, OR 97469

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Riddle Elementary School",'Riddle=' + Riddle.length); Riddle[Riddle.length] = createMarker(new GPoint(-123.36093903,42.95241165),"
Riddle High School
Po Box 45
Riddle, OR 97469

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riddle High School",'Riddle=' + Riddle.length); Winston[Winston.length] = createMarker(new GPoint(-123.44740295,43.09209824),"
Riverside Adtc
Po Box 2033
Winston, OR 97496

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverside Adtc",'Winston=' + Winston.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.37682343,43.12319946),"
Rose Elementary School
948 Se Roberts Ave
Roseburg, OR 97470

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rose Elementary School",'Roseburg=' + Roseburg.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.35282135,43.21522522),"
Roseburg Senior High School
400 Harvard Ave
Roseburg, OR 97470

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Roseburg Senior High School",'Roseburg=' + Roseburg.length); Myrtle_Creek[Myrtle_Creek.length] = createMarker(new GPoint(-123.32883453,42.98580551),"
South Umpqua High School
501 Nw Chadwick Ln
Myrtle Creek, OR 97457

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Umpqua High School",'Myrtle_Creek=' + Myrtle_Creek.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.39019012,43.15423584),"
Sunnyslope Intermediate
2230 Sw Cannon Rd
Roseburg, OR 97470

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sunnyslope Intermediate",'Roseburg=' + Roseburg.length); Sutherlin[Sutherlin.length] = createMarker(new GPoint(-123.30747986,43.39446259),"
Sutherlin High School
500 E Fourth St
Sutherlin, OR 97479

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sutherlin High School",'Sutherlin=' + Sutherlin.length); Sutherlin[Sutherlin.length] = createMarker(new GPoint(-123.30466461,43.39519501),"
Sutherlin Middle School
649 E Fourth St
Sutherlin, OR 97479

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sutherlin Middle School",'Sutherlin=' + Sutherlin.length); Tenmile[Tenmile.length] = createMarker(new GPoint(-123.56043243,43.10438156),"
Tenmile Elementary School
2079 Tenmile Valley Rd
Tenmile, OR 97481

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tenmile Elementary School",'Tenmile=' + Tenmile.length); Tiller[Tiller.length] = createMarker(new GPoint(-122.73490143,43.01910019),"
Tiller Elementary School
Po Box 189
Tiller, OR 97484

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tiller Elementary School",'Tiller=' + Tiller.length); Idleyld_Park[Idleyld_Park.length] = createMarker(new GPoint(-122.47893524,43.29439163),"
Toketee Falls Elementary School
100 Toketee School Rd
Idleyld Park, OR 97447

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Toketee Falls Elementary School",'Idleyld_Park=' + Idleyld_Park.length); Myrtle_Creek[Myrtle_Creek.length] = createMarker(new GPoint(-123.32957458,42.98556137),"
Tri City Elementary School
546 Sw Chadwick Ln
Myrtle Creek, OR 97457

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tri City Elementary School",'Myrtle_Creek=' + Myrtle_Creek.length); Gardiner[Gardiner.length] = createMarker(new GPoint(-124.12079620,43.82500076),"
W. F. Jewett Middle School
Po Box 10
Gardiner, OR 97441

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("W. F. Jewett Middle School",'Gardiner=' + Gardiner.length); Sutherlin[Sutherlin.length] = createMarker(new GPoint(-123.30986023,43.39324570),"
West Sutherlin Intermediate
531 N Comstock Rd
Sutherlin, OR 97479

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("West Sutherlin Intermediate",'Sutherlin=' + Sutherlin.length); Winchester[Winchester.length] = createMarker(new GPoint(-123.35250092,43.28020096),"
Winchester Elementary School
Po Box 778
Winchester, OR 97495

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Winchester Elementary School",'Winchester=' + Winchester.length); Winston[Winston.length] = createMarker(new GPoint(-123.40842438,43.11543655),"
Winston Middle School
330 Se Thompson
Winston, OR 97496

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Winston Middle School",'Winston=' + Winston.length); Yoncalla[Yoncalla.length] = createMarker(new GPoint(-123.26239777,43.59500122),"
Yoncalla Elementary School
Po Box 568
Yoncalla, OR 97499

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Yoncalla Elementary School",'Yoncalla=' + Yoncalla.length); Yoncalla[Yoncalla.length] = createMarker(new GPoint(-123.26239777,43.59500122),"
Yoncalla High School
Po Box 568
Yoncalla, OR 97499

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yoncalla High School",'Yoncalla=' + Yoncalla.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(Camas_Valley); map.removeOverlays(Canyonville); map.removeOverlays(Days_Creek); map.removeOverlays(Drain); map.removeOverlays(Elkton); map.removeOverlays(Gardiner); map.removeOverlays(Glendale); map.removeOverlays(Glide); map.removeOverlays(Idleyld_Park); map.removeOverlays(Myrtle_Creek); map.removeOverlays(Oakland); map.removeOverlays(Reedsport); map.removeOverlays(Riddle); map.removeOverlays(Roseburg); map.removeOverlays(Sutherlin); map.removeOverlays(Tenmile); map.removeOverlays(Tiller); map.removeOverlays(Winchester); map.removeOverlays(Winston); map.removeOverlays(Yoncalla); 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(Winston);map.removeOverlays(Camas_Valley); map.removeOverlays(Canyonville); map.removeOverlays(Days_Creek); map.removeOverlays(Drain); map.removeOverlays(Elkton); map.removeOverlays(Gardiner); map.removeOverlays(Glendale); map.removeOverlays(Glide); map.removeOverlays(Idleyld_Park); map.removeOverlays(Myrtle_Creek); map.removeOverlays(Oakland); map.removeOverlays(Reedsport); map.removeOverlays(Riddle); map.removeOverlays(Roseburg); map.removeOverlays(Sutherlin); map.removeOverlays(Tenmile); map.removeOverlays(Tiller); map.removeOverlays(Winchester); map.removeOverlays(Winston); map.removeOverlays(Yoncalla); map.addOverlays(Camas_Valley); centerByArray(Camas_Valley, false, false); cntMarker += Camas_Valley.length; map.addOverlays(Canyonville); centerByArray(Canyonville, false, false); cntMarker += Canyonville.length; map.addOverlays(Days_Creek); centerByArray(Days_Creek, false, false); cntMarker += Days_Creek.length; map.addOverlays(Drain); centerByArray(Drain, false, false); cntMarker += Drain.length; map.addOverlays(Elkton); centerByArray(Elkton, false, false); cntMarker += Elkton.length; map.addOverlays(Gardiner); centerByArray(Gardiner, false, false); cntMarker += Gardiner.length; map.addOverlays(Glendale); centerByArray(Glendale, false, false); cntMarker += Glendale.length; map.addOverlays(Glide); centerByArray(Glide, false, false); cntMarker += Glide.length; map.addOverlays(Idleyld_Park); centerByArray(Idleyld_Park, false, false); cntMarker += Idleyld_Park.length; map.addOverlays(Myrtle_Creek); centerByArray(Myrtle_Creek, false, false); cntMarker += Myrtle_Creek.length; map.addOverlays(Oakland); centerByArray(Oakland, false, false); cntMarker += Oakland.length; map.addOverlays(Reedsport); centerByArray(Reedsport, false, false); cntMarker += Reedsport.length; map.addOverlays(Riddle); centerByArray(Riddle, false, false); cntMarker += Riddle.length; map.addOverlays(Roseburg); centerByArray(Roseburg, false, false); cntMarker += Roseburg.length; map.addOverlays(Sutherlin); centerByArray(Sutherlin, false, false); cntMarker += Sutherlin.length; map.addOverlays(Tenmile); centerByArray(Tenmile, false, false); cntMarker += Tenmile.length; map.addOverlays(Tiller); centerByArray(Tiller, false, false); cntMarker += Tiller.length; map.addOverlays(Winchester); centerByArray(Winchester, false, false); cntMarker += Winchester.length; map.addOverlays(Winston); centerByArray(Winston, false, false); cntMarker += Winston.length; map.addOverlays(Yoncalla); centerByArray(Yoncalla, false, false); cntMarker += Yoncalla.length; centerByArray(Winston,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'); } }