function addMarkers() { mySelect = document.getElementById('selection'); Akiachak = [];Akiak = [];Kasigluk = [];Aniak = [];Nunapitchuk = [];Platinum = [];Bethel = [];Newtok = [];Chefornak = [];Kipnuk = [];Chuathbaluk = [];Kongiganak = [];Eek = [];Kalskag = [];Red_Devil = [];Stony_River = [];Sleetmute = [];Atmautluak = [];Crooked_Creek = [];Kwethluk = [];Quinhagak = [];Kwigillingok = [];Tuntutuliak = [];Toksook_Bay = [];Nightmute = [];Mekoryuk = [];Tununak = [];Napaskiak = [];Goodnews_Bay = [];Tuluksak = [];Napakiak = [];Lower_Kalskag = [];mySelect.options[mySelect.options.length] = new Option("Akiachak schools",'all=Akiachak'); mySelect.options[mySelect.options.length] = new Option("Akiak schools",'all=Akiak'); mySelect.options[mySelect.options.length] = new Option("Aniak schools",'all=Aniak'); mySelect.options[mySelect.options.length] = new Option("Atmautluak schools",'all=Atmautluak'); mySelect.options[mySelect.options.length] = new Option("Bethel schools",'all=Bethel'); mySelect.options[mySelect.options.length] = new Option("Chefornak schools",'all=Chefornak'); mySelect.options[mySelect.options.length] = new Option("Chuathbaluk schools",'all=Chuathbaluk'); mySelect.options[mySelect.options.length] = new Option("Crooked Creek schools",'all=Crooked_Creek'); mySelect.options[mySelect.options.length] = new Option("Eek schools",'all=Eek'); mySelect.options[mySelect.options.length] = new Option("Goodnews Bay schools",'all=Goodnews_Bay'); mySelect.options[mySelect.options.length] = new Option("Kalskag schools",'all=Kalskag'); mySelect.options[mySelect.options.length] = new Option("Kasigluk schools",'all=Kasigluk'); mySelect.options[mySelect.options.length] = new Option("Kipnuk schools",'all=Kipnuk'); mySelect.options[mySelect.options.length] = new Option("Kongiganak schools",'all=Kongiganak'); mySelect.options[mySelect.options.length] = new Option("Kwethluk schools",'all=Kwethluk'); mySelect.options[mySelect.options.length] = new Option("Kwigillingok schools",'all=Kwigillingok'); mySelect.options[mySelect.options.length] = new Option("Lower Kalskag schools",'all=Lower_Kalskag'); mySelect.options[mySelect.options.length] = new Option("Mekoryuk schools",'all=Mekoryuk'); mySelect.options[mySelect.options.length] = new Option("Napakiak schools",'all=Napakiak'); mySelect.options[mySelect.options.length] = new Option("Napaskiak schools",'all=Napaskiak'); mySelect.options[mySelect.options.length] = new Option("Newtok schools",'all=Newtok'); mySelect.options[mySelect.options.length] = new Option("Nightmute schools",'all=Nightmute'); mySelect.options[mySelect.options.length] = new Option("Nunapitchuk schools",'all=Nunapitchuk'); mySelect.options[mySelect.options.length] = new Option("Platinum schools",'all=Platinum'); mySelect.options[mySelect.options.length] = new Option("Quinhagak schools",'all=Quinhagak'); mySelect.options[mySelect.options.length] = new Option("Red Devil schools",'all=Red_Devil'); mySelect.options[mySelect.options.length] = new Option("Sleetmute schools",'all=Sleetmute'); mySelect.options[mySelect.options.length] = new Option("Stony River schools",'all=Stony_River'); mySelect.options[mySelect.options.length] = new Option("Toksook Bay schools",'all=Toksook_Bay'); mySelect.options[mySelect.options.length] = new Option("Tuluksak schools",'all=Tuluksak'); mySelect.options[mySelect.options.length] = new Option("Tuntutuliak schools",'all=Tuntutuliak'); mySelect.options[mySelect.options.length] = new Option("Tununak schools",'all=Tununak'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Akiachak[Akiachak.length] = createMarker(new GPoint(-161.39230347,60.88980103),"
Akiachak School
Po Box 51190
Akiachak, AK 99551

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Akiachak School",'Akiachak=' + Akiachak.length); Akiak[Akiak.length] = createMarker(new GPoint(-161.21435547,60.91102600),"
Akiak School
Box 49
Akiak, AK 99552

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Akiak School",'Akiak=' + Akiak.length); Kasigluk[Kasigluk.length] = createMarker(new GPoint(-161.63720703,60.84379959),"
Akiuk Memorial School
General Delivery
Kasigluk, AK 99609

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Akiuk Memorial School",'Kasigluk=' + Kasigluk.length); Kasigluk[Kasigluk.length] = createMarker(new GPoint(-161.63720703,60.84379959),"
Akula Elitnaurvik School
Box 79
Kasigluk, AK 99609

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Akula Elitnaurvik School",'Kasigluk=' + Kasigluk.length); Aniak[Aniak.length] = createMarker(new GPoint(-157.38079834,61.74179840),"
Aniak High School
Po Box 29
Aniak, AK 99557

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Aniak High School",'Aniak=' + Aniak.length); Aniak[Aniak.length] = createMarker(new GPoint(-157.38079834,61.74179840),"
Aniak Middle School
Box 29
Aniak, AK 99557

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Aniak Middle School",'Aniak=' + Aniak.length); Nunapitchuk[Nunapitchuk.length] = createMarker(new GPoint(-161.63720703,60.84379959),"
Anna Tobeluk Memorial School
Po Box 150
Nunapitchuk, AK 99641

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Anna Tobeluk Memorial School",'Nunapitchuk=' + Nunapitchuk.length); Platinum[Platinum.length] = createMarker(new GPoint(-161.76040649,58.94459915),"
Arviq School
Po Box 28
Platinum, AK 99651

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arviq School",'Platinum=' + Platinum.length); Aniak[Aniak.length] = createMarker(new GPoint(-157.38079834,61.74179840),"
Auntie Mary Nicoli Elementary School
Po Box 29
Aniak, AK 99557

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Auntie Mary Nicoli Elementary School",'Aniak=' + Aniak.length); Bethel[Bethel.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Ayaprun Elitnaurvik Yup’ik Immersion Elementary School
Po Box 1468
Bethel, AK 99559

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ayaprun Elitnaurvik Yup’ik Immersion Elementary School",'Bethel=' + Bethel.length); Newtok[Newtok.length] = createMarker(new GPoint(-164.62944031,60.94277954),"
Ayaprun School
Po Box Wwt
Newtok, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ayaprun School",'Newtok=' + Newtok.length); Bethel[Bethel.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Bethel Alternative Boarding School
Box 1949
Bethel, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Alternative Boarding School",'Bethel=' + Bethel.length); Bethel[Bethel.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Bethel Regional High School
Po Box 700
Bethel, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Regional High School",'Bethel=' + Bethel.length); Bethel[Bethel.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Bethel Youth Facility
Po Box 1989
Bethel, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Youth Facility",'Bethel=' + Bethel.length); Chefornak[Chefornak.length] = createMarker(new GPoint(-164.19419861,60.16849899),"
Chaptnguak School
Po Box 50
Chefornak, AK 99561

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chaptnguak School",'Chefornak=' + Chefornak.length); Kipnuk[Kipnuk.length] = createMarker(new GPoint(-164.05209351,59.93230057),"
Chief Paul Memorial School
Po Box 19
Kipnuk, AK 99614

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chief Paul Memorial School",'Kipnuk=' + Kipnuk.length); Chuathbaluk[Chuathbaluk.length] = createMarker(new GPoint(-157.38079834,61.74179840),"
Crow Village Sam School
Po Box Chu
Chuathbaluk, AK 99557

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crow Village Sam School",'Chuathbaluk=' + Chuathbaluk.length); Kongiganak[Kongiganak.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Dick R Kiunya Memorial School
Po Box 5109
Kongiganak, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dick R Kiunya Memorial School",'Kongiganak=' + Kongiganak.length); Eek[Eek.length] = createMarker(new GPoint(-161.91720581,59.74980164),"
Eek School
Po Box 50
Eek, AK 99578

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eek School",'Eek=' + Eek.length); Kalskag[Kalskag.length] = createMarker(new GPoint(-160.32260132,61.53889847),"
George Morgan Senior High School
General Delivery
Kalskag, AK 99607

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("George Morgan Senior High School",'Kalskag=' + Kalskag.length); Red_Devil[Red_Devil.length] = createMarker(new GPoint(-157.16870117,61.70309830),"
George Willis Sr. School
General Delivery
Red Devil, AK 99656

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("George Willis Sr. School",'Red_Devil=' + Red_Devil.length); Stony_River[Stony_River.length] = createMarker(new GPoint(-157.38079834,61.74179840),"
Gusty Michael School
General Delivery
Stony River, AK 99557

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gusty Michael School",'Stony_River=' + Stony_River.length); Sleetmute[Sleetmute.length] = createMarker(new GPoint(-157.01339722,61.54589844),"
Jack Egnaty Sr. School
General Delivery
Sleetmute, AK 99668

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jack Egnaty Sr. School",'Sleetmute=' + Sleetmute.length); Atmautluak[Atmautluak.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Joann A. Alexie Memorial School
Po Box Att
Atmautluak, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Joann A. Alexie Memorial School",'Atmautluak=' + Atmautluak.length); Crooked_Creek[Crooked_Creek.length] = createMarker(new GPoint(-157.93699646,61.80649948),"
Johnnie John Sr. School
General Delivery
Crooked Creek, AK 99575

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Johnnie John Sr. School",'Crooked_Creek=' + Crooked_Creek.length); Kalskag[Kalskag.length] = createMarker(new GPoint(-160.32260132,61.53889847),"
Joseph S. & Olinga Gregory Elementary School
General Delivery
Kalskag, AK 99607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Joseph S. & Olinga Gregory Elementary School",'Kalskag=' + Kalskag.length); Kwethluk[Kwethluk.length] = createMarker(new GPoint(-10.00000000,10.00000000),"
Ket'acik/aapalluk Memorial School
4general Delivery
Kwethluk, AK 99621

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ket'acik/aapalluk Memorial School",'Kwethluk=' + Kwethluk.length); Bethel[Bethel.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Kilbuck Elementary School
Po Box 800
Bethel, AK 99559

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kilbuck Elementary School",'Bethel=' + Bethel.length); Quinhagak[Quinhagak.length] = createMarker(new GPoint(-161.76159668,59.64099884),"
Kuinerrarmiut Elitnaurviat
General Delivery
Quinhagak, AK 99655

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kuinerrarmiut Elitnaurviat",'Quinhagak=' + Quinhagak.length); Kwigillingok[Kwigillingok.length] = createMarker(new GPoint(-163.10409546,59.87490082),"
Kwigillingok School
General Delivery
Kwigillingok, AK 99622

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kwigillingok School",'Kwigillingok=' + Kwigillingok.length); Tuntutuliak[Tuntutuliak.length] = createMarker(new GPoint(-161.63720703,60.84379959),"
Lewis Angapak Memorial School
General Delivery
Tuntutuliak, AK 99680

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lewis Angapak Memorial School",'Tuntutuliak=' + Tuntutuliak.length); Bethel[Bethel.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Mikelnguut Elitnaurviat Elementary School
Po Box 900
Bethel, AK 99559

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mikelnguut Elitnaurviat Elementary School",'Bethel=' + Bethel.length); Toksook_Bay[Toksook_Bay.length] = createMarker(new GPoint(-165.09700012,60.53699875),"
Nelson Island Area School
General Delivery
Toksook Bay, AK 99637

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nelson Island Area School",'Toksook_Bay=' + Toksook_Bay.length); Nightmute[Nightmute.length] = createMarker(new GPoint(-161.63720703,60.84379959),"
Nightmute School
General Delivery
Nightmute, AK 99690

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nightmute School",'Nightmute=' + Nightmute.length); Mekoryuk[Mekoryuk.length] = createMarker(new GPoint(-166.00860596,60.19340134),"
Nuniwaarmiut School
Po Box 49
Mekoryuk, AK 99630

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nuniwaarmiut School",'Mekoryuk=' + Mekoryuk.length); Tununak[Tununak.length] = createMarker(new GPoint(-165.11680603,60.54610062),"
Paul T. Albert Memorial School
Po Box 49
Tununak, AK 99681

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Paul T. Albert Memorial School",'Tununak=' + Tununak.length); Napaskiak[Napaskiak.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Qugcuun Memorial School
Po Box 6199
Napaskiak, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Qugcuun Memorial School",'Napaskiak=' + Napaskiak.length); Goodnews_Bay[Goodnews_Bay.length] = createMarker(new GPoint(-161.56489563,59.11420059),"
Rocky Mountain School
Po Box 153
Goodnews Bay, AK 99589

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rocky Mountain School",'Goodnews_Bay=' + Goodnews_Bay.length); Tuluksak[Tuluksak.length] = createMarker(new GPoint(-160.95889282,61.09889984),"
Tuluksak School
Po Box 115
Tuluksak, AK 99679

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tuluksak School",'Tuluksak=' + Tuluksak.length); Napakiak[Napakiak.length] = createMarker(new GPoint(-161.76069641,60.66680145),"
William Miller Memorial School
General Delivery
Napakiak, AK 99634

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("William Miller Memorial School",'Napakiak=' + Napakiak.length); Napaskiak[Napaskiak.length] = createMarker(new GPoint(-161.41059875,60.85309982),"
Z. John Williams Memorial School
Po Box 6089
Napaskiak, AK 99559

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Z. John Williams Memorial School",'Napaskiak=' + Napaskiak.length); Lower_Kalskag[Lower_Kalskag.length] = createMarker(new GPoint(-160.35690308,61.51509857),"
Zackar Levi Elementary School
General Delivery
Lower Kalskag, AK 99626

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Zackar Levi Elementary School",'Lower_Kalskag=' + Lower_Kalskag.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(Akiachak); map.removeOverlays(Akiak); map.removeOverlays(Aniak); map.removeOverlays(Atmautluak); map.removeOverlays(Bethel); map.removeOverlays(Chefornak); map.removeOverlays(Chuathbaluk); map.removeOverlays(Crooked_Creek); map.removeOverlays(Eek); map.removeOverlays(Goodnews_Bay); map.removeOverlays(Kalskag); map.removeOverlays(Kasigluk); map.removeOverlays(Kipnuk); map.removeOverlays(Kongiganak); map.removeOverlays(Kwethluk); map.removeOverlays(Kwigillingok); map.removeOverlays(Lower_Kalskag); map.removeOverlays(Mekoryuk); map.removeOverlays(Napakiak); map.removeOverlays(Napaskiak); map.removeOverlays(Newtok); map.removeOverlays(Nightmute); map.removeOverlays(Nunapitchuk); map.removeOverlays(Platinum); map.removeOverlays(Quinhagak); map.removeOverlays(Red_Devil); map.removeOverlays(Sleetmute); map.removeOverlays(Stony_River); map.removeOverlays(Toksook_Bay); map.removeOverlays(Tuluksak); map.removeOverlays(Tuntutuliak); map.removeOverlays(Tununak); 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(Akiachak);map.removeOverlays(Akiachak); map.removeOverlays(Akiak); map.removeOverlays(Aniak); map.removeOverlays(Atmautluak); map.removeOverlays(Bethel); map.removeOverlays(Chefornak); map.removeOverlays(Chuathbaluk); map.removeOverlays(Crooked_Creek); map.removeOverlays(Eek); map.removeOverlays(Goodnews_Bay); map.removeOverlays(Kalskag); map.removeOverlays(Kasigluk); map.removeOverlays(Kipnuk); map.removeOverlays(Kongiganak); map.removeOverlays(Kwethluk); map.removeOverlays(Kwigillingok); map.removeOverlays(Lower_Kalskag); map.removeOverlays(Mekoryuk); map.removeOverlays(Napakiak); map.removeOverlays(Napaskiak); map.removeOverlays(Newtok); map.removeOverlays(Nightmute); map.removeOverlays(Nunapitchuk); map.removeOverlays(Platinum); map.removeOverlays(Quinhagak); map.removeOverlays(Red_Devil); map.removeOverlays(Sleetmute); map.removeOverlays(Stony_River); map.removeOverlays(Toksook_Bay); map.removeOverlays(Tuluksak); map.removeOverlays(Tuntutuliak); map.removeOverlays(Tununak); map.addOverlays(Akiachak); centerByArray(Akiachak, false, false); cntMarker += Akiachak.length; map.addOverlays(Akiak); centerByArray(Akiak, false, false); cntMarker += Akiak.length; map.addOverlays(Aniak); centerByArray(Aniak, false, false); cntMarker += Aniak.length; map.addOverlays(Atmautluak); centerByArray(Atmautluak, false, false); cntMarker += Atmautluak.length; map.addOverlays(Bethel); centerByArray(Bethel, false, false); cntMarker += Bethel.length; map.addOverlays(Chefornak); centerByArray(Chefornak, false, false); cntMarker += Chefornak.length; map.addOverlays(Chuathbaluk); centerByArray(Chuathbaluk, false, false); cntMarker += Chuathbaluk.length; map.addOverlays(Crooked_Creek); centerByArray(Crooked_Creek, false, false); cntMarker += Crooked_Creek.length; map.addOverlays(Eek); centerByArray(Eek, false, false); cntMarker += Eek.length; map.addOverlays(Goodnews_Bay); centerByArray(Goodnews_Bay, false, false); cntMarker += Goodnews_Bay.length; map.addOverlays(Kalskag); centerByArray(Kalskag, false, false); cntMarker += Kalskag.length; map.addOverlays(Kasigluk); centerByArray(Kasigluk, false, false); cntMarker += Kasigluk.length; map.addOverlays(Kipnuk); centerByArray(Kipnuk, false, false); cntMarker += Kipnuk.length; map.addOverlays(Kongiganak); centerByArray(Kongiganak, false, false); cntMarker += Kongiganak.length; map.addOverlays(Kwethluk); centerByArray(Kwethluk, false, false); cntMarker += Kwethluk.length; map.addOverlays(Kwigillingok); centerByArray(Kwigillingok, false, false); cntMarker += Kwigillingok.length; map.addOverlays(Lower_Kalskag); centerByArray(Lower_Kalskag, false, false); cntMarker += Lower_Kalskag.length; map.addOverlays(Mekoryuk); centerByArray(Mekoryuk, false, false); cntMarker += Mekoryuk.length; map.addOverlays(Napakiak); centerByArray(Napakiak, false, false); cntMarker += Napakiak.length; map.addOverlays(Napaskiak); centerByArray(Napaskiak, false, false); cntMarker += Napaskiak.length; map.addOverlays(Newtok); centerByArray(Newtok, false, false); cntMarker += Newtok.length; map.addOverlays(Nightmute); centerByArray(Nightmute, false, false); cntMarker += Nightmute.length; map.addOverlays(Nunapitchuk); centerByArray(Nunapitchuk, false, false); cntMarker += Nunapitchuk.length; map.addOverlays(Platinum); centerByArray(Platinum, false, false); cntMarker += Platinum.length; map.addOverlays(Quinhagak); centerByArray(Quinhagak, false, false); cntMarker += Quinhagak.length; map.addOverlays(Red_Devil); centerByArray(Red_Devil, false, false); cntMarker += Red_Devil.length; map.addOverlays(Sleetmute); centerByArray(Sleetmute, false, false); cntMarker += Sleetmute.length; map.addOverlays(Stony_River); centerByArray(Stony_River, false, false); cntMarker += Stony_River.length; map.addOverlays(Toksook_Bay); centerByArray(Toksook_Bay, false, false); cntMarker += Toksook_Bay.length; map.addOverlays(Tuluksak); centerByArray(Tuluksak, false, false); cntMarker += Tuluksak.length; map.addOverlays(Tuntutuliak); centerByArray(Tuntutuliak, false, false); cntMarker += Tuntutuliak.length; map.addOverlays(Tununak); centerByArray(Tununak, false, false); cntMarker += Tununak.length; centerByArray(Akiachak,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'); } }