function addMarkers() { mySelect = document.getElementById('selection'); Allakaket = [];Anderson = [];Nulato = [];Arctic_Village = [];Beaver = [];Bettles = [];Anvik = [];Cantwell = [];Circle = [];Nenana = [];Grayling = [];Healy = [];Koyukuk = [];Central = [];Fort_Yukon = [];Galena = [];Manley_Hot_Springs = [];Holy_Cross = [];Shageluk = [];Huslia = [];Venetie = [];Hughes = [];Kaltag = [];Lime_Village_mcgrath = [];Tanana = [];Mcgrath = [];Ruby = [];Minto = [];Stevens_Village = [];Takotna = [];Nikolai = [];Chalkyitsik = [];Wiseman_Village = [];mySelect.options[mySelect.options.length] = new Option("Allakaket schools",'all=Allakaket'); mySelect.options[mySelect.options.length] = new Option("Anderson schools",'all=Anderson'); mySelect.options[mySelect.options.length] = new Option("Anvik schools",'all=Anvik'); mySelect.options[mySelect.options.length] = new Option("Arctic Village schools",'all=Arctic_Village'); mySelect.options[mySelect.options.length] = new Option("Beaver schools",'all=Beaver'); mySelect.options[mySelect.options.length] = new Option("Bettles schools",'all=Bettles'); mySelect.options[mySelect.options.length] = new Option("Cantwell schools",'all=Cantwell'); mySelect.options[mySelect.options.length] = new Option("Central schools",'all=Central'); mySelect.options[mySelect.options.length] = new Option("Chalkyitsik schools",'all=Chalkyitsik'); mySelect.options[mySelect.options.length] = new Option("Circle schools",'all=Circle'); mySelect.options[mySelect.options.length] = new Option("Fort Yukon schools",'all=Fort_Yukon'); mySelect.options[mySelect.options.length] = new Option("Galena schools",'all=Galena'); mySelect.options[mySelect.options.length] = new Option("Grayling schools",'all=Grayling'); mySelect.options[mySelect.options.length] = new Option("Healy schools",'all=Healy'); mySelect.options[mySelect.options.length] = new Option("Holy Cross schools",'all=Holy_Cross'); mySelect.options[mySelect.options.length] = new Option("Hughes schools",'all=Hughes'); mySelect.options[mySelect.options.length] = new Option("Huslia schools",'all=Huslia'); mySelect.options[mySelect.options.length] = new Option("Kaltag schools",'all=Kaltag'); mySelect.options[mySelect.options.length] = new Option("Koyukuk schools",'all=Koyukuk'); mySelect.options[mySelect.options.length] = new Option("Lime Village mcgrath schools",'all=Lime_Village_mcgrath'); mySelect.options[mySelect.options.length] = new Option("Manley Hot Springs schools",'all=Manley_Hot_Springs'); mySelect.options[mySelect.options.length] = new Option("Mcgrath schools",'all=Mcgrath'); mySelect.options[mySelect.options.length] = new Option("Minto schools",'all=Minto'); mySelect.options[mySelect.options.length] = new Option("Nenana schools",'all=Nenana'); mySelect.options[mySelect.options.length] = new Option("Nikolai schools",'all=Nikolai'); mySelect.options[mySelect.options.length] = new Option("Nulato schools",'all=Nulato'); mySelect.options[mySelect.options.length] = new Option("Ruby schools",'all=Ruby'); mySelect.options[mySelect.options.length] = new Option("Shageluk schools",'all=Shageluk'); mySelect.options[mySelect.options.length] = new Option("Stevens Village schools",'all=Stevens_Village'); mySelect.options[mySelect.options.length] = new Option("Takotna schools",'all=Takotna'); mySelect.options[mySelect.options.length] = new Option("Tanana schools",'all=Tanana'); mySelect.options[mySelect.options.length] = new Option("Venetie schools",'all=Venetie'); mySelect.options[mySelect.options.length] = new Option("Wiseman Village schools",'all=Wiseman_Village'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Allakaket[Allakaket.length] = createMarker(new GPoint(-152.46429443,66.52989960),"
Allakaket School
Po Box 69
Allakaket, AK 99720

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Allakaket School",'Allakaket=' + Allakaket.length); Anderson[Anderson.length] = createMarker(new GPoint(-149.18530273,64.29540253),"
Anderson School
Box 3120
Anderson, AK 99744

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Anderson School",'Anderson=' + Anderson.length); Nulato[Nulato.length] = createMarker(new GPoint(-157.37640381,64.71330261),"
Andrew K. Demoski School
Po Box 65029
Nulato, AK 99765

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Andrew K. Demoski School",'Nulato=' + Nulato.length); Arctic_Village[Arctic_Village.length] = createMarker(new GPoint(-146.05960083,67.50319672),"
Arctic Village School
Po Box 22049
Arctic Village, AK 99722

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arctic Village School",'Arctic_Village=' + Arctic_Village.length); Beaver[Beaver.length] = createMarker(new GPoint(-147.55369568,66.62500000),"
Beaver School
Po Box 24050
Beaver, AK 99724

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Beaver School",'Beaver=' + Beaver.length); Bettles[Bettles.length] = createMarker(new GPoint(-150.83329773,67.03140259),"
Bettles School
Po Box 26070
Bettles, AK 99726

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bettles School",'Bettles=' + Bettles.length); Anvik[Anvik.length] = createMarker(new GPoint(-159.97639465,62.95000076),"
Blackwell School
Box 90
Anvik, AK 99558

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blackwell School",'Anvik=' + Anvik.length); Cantwell[Cantwell.length] = createMarker(new GPoint(-148.83540344,63.43149948),"
Cantwell School
Box 29
Cantwell, AK 99729

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cantwell School",'Cantwell=' + Cantwell.length); Circle[Circle.length] = createMarker(new GPoint(-144.06250000,65.82659149),"
Circle School
Po Box 49
Circle, AK 99733

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Circle School",'Circle=' + Circle.length); Nenana[Nenana.length] = createMarker(new GPoint(-149.09019470,64.54699707),"
Cyberlynx Correspondence Program
Po Box 599
Nenana, AK 99760

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cyberlynx Correspondence Program",'Nenana=' + Nenana.length); Grayling[Grayling.length] = createMarker(new GPoint(-159.68359375,64.07039642),"
David-louis School
Box 90
Grayling, AK 99590

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("David-louis School",'Grayling=' + Grayling.length); Healy[Healy.length] = createMarker(new GPoint(-149.00920105,64.08959961),"
Denali Correspondence School
Po Box 280
Healy, AK 99743

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Denali Correspondence School",'Healy=' + Healy.length); Koyukuk[Koyukuk.length] = createMarker(new GPoint(-157.70083618,64.88027954),"
Ella B. Vernetti School
Po Box 70
Koyukuk, AK 99754

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ella B. Vernetti School",'Koyukuk=' + Koyukuk.length); Central[Central.length] = createMarker(new GPoint(-144.80043030,65.57335663),"
Far North School
Po Box 30049
Central, AK 99730

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Far North School",'Central=' + Central.length); Fort_Yukon[Fort_Yukon.length] = createMarker(new GPoint(-145.51589966,66.35220337),"
Fort Yukon School
Po Box 129
Fort Yukon, AK 99740

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fort Yukon School",'Fort_Yukon=' + Fort_Yukon.length); Galena[Galena.length] = createMarker(new GPoint(-154.66740417,65.75450134),"
Galena Elementary School
Po Box 299
Galena, AK 99741

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Galena Elementary School",'Galena=' + Galena.length); Galena[Galena.length] = createMarker(new GPoint(-154.66740417,65.75450134),"
Galena Jr/sr High School
Po Box 299
Galena, AK 99741

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Galena Jr/sr High School",'Galena=' + Galena.length); Manley_Hot_Springs[Manley_Hot_Springs.length] = createMarker(new GPoint(-150.72950745,65.10230255),"
Gladys Dart School
Po Box 29
Manley Hot Springs, AK 99756

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gladys Dart School",'Manley_Hot_Springs=' + Manley_Hot_Springs.length); Holy_Cross[Holy_Cross.length] = createMarker(new GPoint(-159.60470581,62.21350098),"
Holy Cross School
Box 210
Holy Cross, AK 99602

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Cross School",'Holy_Cross=' + Holy_Cross.length); Shageluk[Shageluk.length] = createMarker(new GPoint(-159.39700317,62.58179855),"
Innoko River School
Box 53
Shageluk, AK 99665

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Innoko River School",'Shageluk=' + Shageluk.length); Huslia[Huslia.length] = createMarker(new GPoint(-156.40260315,65.69239807),"
Jimmy Huntington School
Po Box 110
Huslia, AK 99746

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jimmy Huntington School",'Huslia=' + Huslia.length); Venetie[Venetie.length] = createMarker(new GPoint(-146.15530396,66.94629669),"
John Fredson School
Po Box 39
Venetie, AK 99781

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("John Fredson School",'Venetie=' + Venetie.length); Hughes[Hughes.length] = createMarker(new GPoint(-154.26577759,66.04241943),"
Johnny Oldman School
Po Box 30
Hughes, AK 99745

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Johnny Oldman School",'Hughes=' + Hughes.length); Kaltag[Kaltag.length] = createMarker(new GPoint(-158.73150635,64.32559967),"
Kaltag School
Po Box 30
Kaltag, AK 99748

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kaltag School",'Kaltag=' + Kaltag.length); Lime_Village_mcgrath[Lime_Village_mcgrath.length] = createMarker(new GPoint(-151.64700317,65.28579712),"
Lime Village School
Box Lvd
Lime Village-mcgrath, AK 99627

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lime Village School",'Lime_Village_mcgrath=' + Lime_Village_mcgrath.length); Tanana[Tanana.length] = createMarker(new GPoint(-152.08111572,65.17144775),"
Maudrey J. Sommer School
Po Box 89
Tanana, AK 99777

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maudrey J. Sommer School",'Tanana=' + Tanana.length); Mcgrath[Mcgrath.length] = createMarker(new GPoint(-155.86129761,63.06060028),"
Mcgrath School
Box 290
Mcgrath, AK 99627

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mcgrath School",'Mcgrath=' + Mcgrath.length); Ruby[Ruby.length] = createMarker(new GPoint(-155.47659302,64.47820282),"
Merreline A Kangas School
Po Box 68110
Ruby, AK 99768

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Merreline A Kangas School",'Ruby=' + Ruby.length); Minto[Minto.length] = createMarker(new GPoint(-149.59899902,65.08679962),"
Minto School
Po Box 81
Minto, AK 99758

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Minto School",'Minto=' + Minto.length); Nenana[Nenana.length] = createMarker(new GPoint(-149.09019470,64.54699707),"
Nenana City School
Box 10
Nenana, AK 99760

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nenana City School",'Nenana=' + Nenana.length); Galena[Galena.length] = createMarker(new GPoint(-154.66740417,65.75450134),"
Project Education Residential School
Po Box 359
Galena, AK 99741

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Education Residential School",'Galena=' + Galena.length); Stevens_Village[Stevens_Village.length] = createMarker(new GPoint(-148.74630737,65.70099640),"
Stevens Village School
General Delivery
Stevens Village, AK 99774

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stevens Village School",'Stevens_Village=' + Stevens_Village.length); Takotna[Takotna.length] = createMarker(new GPoint(-155.86129761,63.06060028),"
Takotna School
Box 90
Takotna, AK 99675

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Takotna School",'Takotna=' + Takotna.length); Nikolai[Nikolai.length] = createMarker(new GPoint(-154.37500000,63.01332855),"
Top Of Kuskokwim School
Po Box 9190
Nikolai, AK 99691

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Top Of Kuskokwim School",'Nikolai=' + Nikolai.length); Healy[Healy.length] = createMarker(new GPoint(-148.98460388,64.05789948),"
Tri-valley School
Po Box 400
Healy, AK 99743

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tri-valley School",'Healy=' + Healy.length); Chalkyitsik[Chalkyitsik.length] = createMarker(new GPoint(-143.71719360,66.66359711),"
Tsuk Taih School
General Delivery
Chalkyitsik, AK 99788

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tsuk Taih School",'Chalkyitsik=' + Chalkyitsik.length); Wiseman_Village[Wiseman_Village.length] = createMarker(new GPoint(-151.64700317,65.28579712),"
Wiseman /coldfoot School
General Delivery
Wiseman Village, AK 99790

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wiseman /coldfoot School",'Wiseman_Village=' + Wiseman_Village.length); Tanana[Tanana.length] = createMarker(new GPoint(-149.56260681,61.56629944),"
Yukon River Academy Correspondence
Po Box 89
Tanana, AK 99777

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yukon River Academy Correspondence",'Tanana=' + Tanana.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(Allakaket); map.removeOverlays(Anderson); map.removeOverlays(Anvik); map.removeOverlays(Arctic_Village); map.removeOverlays(Beaver); map.removeOverlays(Bettles); map.removeOverlays(Cantwell); map.removeOverlays(Central); map.removeOverlays(Chalkyitsik); map.removeOverlays(Circle); map.removeOverlays(Fort_Yukon); map.removeOverlays(Galena); map.removeOverlays(Grayling); map.removeOverlays(Healy); map.removeOverlays(Holy_Cross); map.removeOverlays(Hughes); map.removeOverlays(Huslia); map.removeOverlays(Kaltag); map.removeOverlays(Koyukuk); map.removeOverlays(Lime_Village_mcgrath); map.removeOverlays(Manley_Hot_Springs); map.removeOverlays(Mcgrath); map.removeOverlays(Minto); map.removeOverlays(Nenana); map.removeOverlays(Nikolai); map.removeOverlays(Nulato); map.removeOverlays(Ruby); map.removeOverlays(Shageluk); map.removeOverlays(Stevens_Village); map.removeOverlays(Takotna); map.removeOverlays(Tanana); map.removeOverlays(Venetie); map.removeOverlays(Wiseman_Village); 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(Allakaket);map.removeOverlays(Allakaket); map.removeOverlays(Anderson); map.removeOverlays(Anvik); map.removeOverlays(Arctic_Village); map.removeOverlays(Beaver); map.removeOverlays(Bettles); map.removeOverlays(Cantwell); map.removeOverlays(Central); map.removeOverlays(Chalkyitsik); map.removeOverlays(Circle); map.removeOverlays(Fort_Yukon); map.removeOverlays(Galena); map.removeOverlays(Grayling); map.removeOverlays(Healy); map.removeOverlays(Holy_Cross); map.removeOverlays(Hughes); map.removeOverlays(Huslia); map.removeOverlays(Kaltag); map.removeOverlays(Koyukuk); map.removeOverlays(Lime_Village_mcgrath); map.removeOverlays(Manley_Hot_Springs); map.removeOverlays(Mcgrath); map.removeOverlays(Minto); map.removeOverlays(Nenana); map.removeOverlays(Nikolai); map.removeOverlays(Nulato); map.removeOverlays(Ruby); map.removeOverlays(Shageluk); map.removeOverlays(Stevens_Village); map.removeOverlays(Takotna); map.removeOverlays(Tanana); map.removeOverlays(Venetie); map.removeOverlays(Wiseman_Village); map.addOverlays(Allakaket); centerByArray(Allakaket, false, false); cntMarker += Allakaket.length; map.addOverlays(Anderson); centerByArray(Anderson, false, false); cntMarker += Anderson.length; map.addOverlays(Anvik); centerByArray(Anvik, false, false); cntMarker += Anvik.length; map.addOverlays(Arctic_Village); centerByArray(Arctic_Village, false, false); cntMarker += Arctic_Village.length; map.addOverlays(Beaver); centerByArray(Beaver, false, false); cntMarker += Beaver.length; map.addOverlays(Bettles); centerByArray(Bettles, false, false); cntMarker += Bettles.length; map.addOverlays(Cantwell); centerByArray(Cantwell, false, false); cntMarker += Cantwell.length; map.addOverlays(Central); centerByArray(Central, false, false); cntMarker += Central.length; map.addOverlays(Chalkyitsik); centerByArray(Chalkyitsik, false, false); cntMarker += Chalkyitsik.length; map.addOverlays(Circle); centerByArray(Circle, false, false); cntMarker += Circle.length; map.addOverlays(Fort_Yukon); centerByArray(Fort_Yukon, false, false); cntMarker += Fort_Yukon.length; map.addOverlays(Galena); centerByArray(Galena, false, false); cntMarker += Galena.length; map.addOverlays(Grayling); centerByArray(Grayling, false, false); cntMarker += Grayling.length; map.addOverlays(Healy); centerByArray(Healy, false, false); cntMarker += Healy.length; map.addOverlays(Holy_Cross); centerByArray(Holy_Cross, false, false); cntMarker += Holy_Cross.length; map.addOverlays(Hughes); centerByArray(Hughes, false, false); cntMarker += Hughes.length; map.addOverlays(Huslia); centerByArray(Huslia, false, false); cntMarker += Huslia.length; map.addOverlays(Kaltag); centerByArray(Kaltag, false, false); cntMarker += Kaltag.length; map.addOverlays(Koyukuk); centerByArray(Koyukuk, false, false); cntMarker += Koyukuk.length; map.addOverlays(Lime_Village_mcgrath); centerByArray(Lime_Village_mcgrath, false, false); cntMarker += Lime_Village_mcgrath.length; map.addOverlays(Manley_Hot_Springs); centerByArray(Manley_Hot_Springs, false, false); cntMarker += Manley_Hot_Springs.length; map.addOverlays(Mcgrath); centerByArray(Mcgrath, false, false); cntMarker += Mcgrath.length; map.addOverlays(Minto); centerByArray(Minto, false, false); cntMarker += Minto.length; map.addOverlays(Nenana); centerByArray(Nenana, false, false); cntMarker += Nenana.length; map.addOverlays(Nikolai); centerByArray(Nikolai, false, false); cntMarker += Nikolai.length; map.addOverlays(Nulato); centerByArray(Nulato, false, false); cntMarker += Nulato.length; map.addOverlays(Ruby); centerByArray(Ruby, false, false); cntMarker += Ruby.length; map.addOverlays(Shageluk); centerByArray(Shageluk, false, false); cntMarker += Shageluk.length; map.addOverlays(Stevens_Village); centerByArray(Stevens_Village, false, false); cntMarker += Stevens_Village.length; map.addOverlays(Takotna); centerByArray(Takotna, false, false); cntMarker += Takotna.length; map.addOverlays(Tanana); centerByArray(Tanana, false, false); cntMarker += Tanana.length; map.addOverlays(Venetie); centerByArray(Venetie, false, false); cntMarker += Venetie.length; map.addOverlays(Wiseman_Village); centerByArray(Wiseman_Village, false, false); cntMarker += Wiseman_Village.length; centerByArray(Allakaket,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'); } }