function addMarkers(){ mySelect = document.getElementById('selection'); Boise = [];Coeur_Dalene = [];Meridian = [];Mountain_Home = [];Sun_Valley = [];Sandpoint = [];Eagle = [];Clark_Fork = [];Kuna = [];Driggs = [];Idaho_Falls = [];Caldwell = [];Donnelly = [];Mccall = [];Bonners_Ferry = [];Lewiston = [];Burley = [];Arco = [];mySelect.options[mySelect.options.length] = new Option("Arco schools",'all=Arco'); mySelect.options[mySelect.options.length] = new Option("Boise schools",'all=Boise'); mySelect.options[mySelect.options.length] = new Option("Bonners Ferry schools",'all=Bonners_Ferry'); mySelect.options[mySelect.options.length] = new Option("Burley schools",'all=Burley'); mySelect.options[mySelect.options.length] = new Option("Caldwell schools",'all=Caldwell'); mySelect.options[mySelect.options.length] = new Option("Clark Fork schools",'all=Clark_Fork'); mySelect.options[mySelect.options.length] = new Option("Coeur Dalene schools",'all=Coeur_Dalene'); mySelect.options[mySelect.options.length] = new Option("Donnelly schools",'all=Donnelly'); mySelect.options[mySelect.options.length] = new Option("Driggs schools",'all=Driggs'); mySelect.options[mySelect.options.length] = new Option("Eagle schools",'all=Eagle'); mySelect.options[mySelect.options.length] = new Option("Idaho Falls schools",'all=Idaho_Falls'); mySelect.options[mySelect.options.length] = new Option("Kuna schools",'all=Kuna'); mySelect.options[mySelect.options.length] = new Option("Lewiston schools",'all=Lewiston'); mySelect.options[mySelect.options.length] = new Option("Mccall schools",'all=Mccall'); mySelect.options[mySelect.options.length] = new Option("Meridian schools",'all=Meridian'); mySelect.options[mySelect.options.length] = new Option("Mountain Home schools",'all=Mountain_Home'); mySelect.options[mySelect.options.length] = new Option("Sandpoint schools",'all=Sandpoint'); mySelect.options[mySelect.options.length] = new Option("Sun Valley schools",'all=Sun_Valley'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Boise[Boise.length] = createMarker(new GPoint(-116.22318200,43.64629300),"
A Learning Tree Inc
2908 N 28th Street
Boise, ID 83703
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Learning Tree Inc",'Boise=' + Boise.length); Coeur_Dalene[Coeur_Dalene.length] = createMarker(new GPoint(-116.78959500,47.68561300),"
Abcd Day Care Center
1124 N C Street
Coeur D''alene, ID 83814
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Abcd Day Care Center",'Coeur_Dalene=' + Coeur_Dalene.length); Boise[Boise.length] = createMarker(new GPoint(-116.18749200,43.60242900),"
Arrowrock International School
1017 E Park Blvd
Boise, ID 83712
Co-ed school, K-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arrowrock International School",'Boise=' + Boise.length); Boise[Boise.length] = createMarker(new GPoint(-116.25819200,43.65798400),"
Challenger School-Boise Bloom
5551 W Bloom St.
Boise, ID 83703
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Challenger School-Boise Bloom",'Boise=' + Boise.length); Meridian[Meridian.length] = createMarker(new GPoint(-116.41888100,43.66221400),"
Challenger School-Everest
2020 West Everest Lane
Meridian, ID 83646
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Challenger School-Everest",'Meridian=' + Meridian.length); Boise[Boise.length] = createMarker(new GPoint(-116.25819200,43.65798400),"
Challenger School—Boise
5551 W. Bloom Street
Boise, ID 83703
Co-ed school, NS-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Challenger School—Boise",'Boise=' + Boise.length); Meridian[Meridian.length] = createMarker(new GPoint(-116.41857700,43.66188600),"
Challenger School—Meridian
2020 W. Everest Lane
Meridian, ID 83646
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Challenger School—Meridian",'Meridian=' + Meridian.length); Mountain_Home[Mountain_Home.length] = createMarker(new GPoint(-115.68627500,43.13386100),"
Children S House Montessori
1134 American Legion Blvd
Mountain Home, ID 83647
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children S House Montessori",'Mountain_Home=' + Mountain_Home.length); Boise[Boise.length] = createMarker(new GPoint(-116.19775300,43.62325000),"
The Children's School Of Boise
1015 N 8th Street
Boise, ID 83702
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Children's School Of Boise",'Boise=' + Boise.length); Coeur_Dalene[Coeur_Dalene.length] = createMarker(new GPoint(-116.79043700,47.72023000),"
Children's Village Academy
1350 W Hanley Avenue
Coeur D''alene, ID 83815
Co-ed school, 3-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's Village Academy",'Coeur_Dalene=' + Coeur_Dalene.length); Coeur_Dalene[Coeur_Dalene.length] = createMarker(new GPoint(-116.80390900,47.72986300),"
Children's Village Inc
1350 W Hanley Ave
Coeur D'alene, ID 83815
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's Village Inc",'Coeur_Dalene=' + Coeur_Dalene.length); Mountain_Home[Mountain_Home.length] = createMarker(new GPoint(-115.68604500,43.13393700),"
Childrens House
1134 American Legion
Mountain Home, ID 83647
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens House",'Mountain_Home=' + Mountain_Home.length); Boise[Boise.length] = createMarker(new GPoint(-116.33544800,43.64466300),"
Cloverdale Montessori
12255 W Goldenrod Ave
Boise, ID 83713
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cloverdale Montessori",'Boise=' + Boise.length); Sun_Valley[Sun_Valley.length] = createMarker(new GPoint(-114.33428300,43.67955100),"
The Community School
Po Box 2118
Sun Valley, ID 83353
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Community School",'Sun_Valley=' + Sun_Valley.length); Boise[Boise.length] = createMarker(new GPoint(-116.24371400,43.60003400),"
Creative Childrens Center
419 S Orchard
Boise, ID 83705
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Creative Childrens Center",'Boise=' + Boise.length); Sandpoint[Sandpoint.length] = createMarker(new GPoint(-116.56006600,48.27196300),"
Cynthia S Preschool & Kindergarten
1007 W Lake Street
Sandpoint, ID 83864
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cynthia S Preschool & Kindergarten",'Sandpoint=' + Sandpoint.length); Eagle[Eagle.length] = createMarker(new GPoint(-116.35483200,43.68776300),"
Eagle Montessori Center
655 S Rivershore Lane
Eagle, ID 83616
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eagle Montessori Center",'Eagle=' + Eagle.length); Clark_Fork[Clark_Fork.length] = createMarker(new GPoint(-116.22560000,48.08430000),"
Elk Mountain Academy
Po Box 411
Clark Fork, ID 83811
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Elk Mountain Academy",'Clark_Fork=' + Clark_Fork.length); Boise[Boise.length] = createMarker(new GPoint(-116.20715600,43.61145900),"
Foothills School of Arts and Sciences
618 South 8th Street
Boise, ID 83702
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Foothills School of Arts and Sciences",'Boise=' + Boise.length); Boise[Boise.length] = createMarker(new GPoint(-116.23703900,43.65760700),"
Hillside Academy
3900 Hill Road
Boise, ID 83703
Co-ed school, 4-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hillside Academy",'Boise=' + Boise.length); Kuna[Kuna.length] = createMarker(new GPoint(-116.39522000,43.51745200),"
Independent Child Montessori School
102 W Hubbard Rd
Kuna, ID 83634
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Independent Child Montessori School",'Kuna=' + Kuna.length); Boise[Boise.length] = createMarker(new GPoint(-116.22108900,43.64013700),"
Keystone Montessori Center
2211 N 26th Street
Boise, ID 83702
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Keystone Montessori Center",'Boise=' + Boise.length); Boise[Boise.length] = createMarker(new GPoint(-116.20851000,43.58128500),"
Kids Connection Montessori
2310 Columbus Street
Boise, ID 83705
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Connection Montessori",'Boise=' + Boise.length); Coeur_Dalene[Coeur_Dalene.length] = createMarker(new GPoint(-116.79865100,47.69686700),"
Kootenai Academy
2301 N Ironwood Pl
Coeur D'alene, ID 83615
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kootenai Academy",'Coeur_Dalene=' + Coeur_Dalene.length); Driggs[Driggs.length] = createMarker(new GPoint(-111.11311100,43.72657300),"
The Learning Academy Of Teton Valley
Po Box 451
Driggs, ID 83422
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Learning Academy Of Teton Valley",'Driggs=' + Driggs.length); Idaho_Falls[Idaho_Falls.length] = createMarker(new GPoint(-112.03424500,43.49243500),"
Little Peoples Academy
543 North Ridge
Idaho Falls, ID 83402
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Peoples Academy",'Idaho_Falls=' + Idaho_Falls.length); Coeur_Dalene[Coeur_Dalene.length] = createMarker(new GPoint(-116.78337900,47.68256300),"
Montessori,messes&magic
218 Miller St.
Coeur D'alene, ID 83814
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori,messes&magic",'Coeur_Dalene=' + Coeur_Dalene.length); Caldwell[Caldwell.length] = createMarker(new GPoint(-116.69540900,43.65495600),"
New Horizon
1717 Arlington
Caldwell, ID 83605
Co-ed school, 7-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Horizon",'Caldwell=' + Caldwell.length); Boise[Boise.length] = createMarker(new GPoint(-116.18229300,43.58509100),"
New Horizon Child Care
155 E Boise Avenue
Boise, ID 83706
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Horizon Child Care",'Boise=' + Boise.length); Donnelly[Donnelly.length] = createMarker(new GPoint(-116.09874100,44.69414100),"
North Fork School
Po Box 897
Donnelly, ID 83615
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Fork School",'Donnelly=' + Donnelly.length); Mccall[Mccall.length] = createMarker(new GPoint(-116.04339000,44.87728000),"
North Fork School
Po Box 2127
Mccall, ID 83638
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Fork School",'Mccall=' + Mccall.length); Boise[Boise.length] = createMarker(new GPoint(-116.27805100,43.62681600),"
Northview Montessori School
7670 Northview Street
Boise, ID 83704
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northview Montessori School",'Boise=' + Boise.length); Bonners_Ferry[Bonners_Ferry.length] = createMarker(new GPoint(-116.47180000,48.75710000),"
Northwest Academy
Rr 1 Box 511
Bonners Ferry, ID 83805
Co-ed school, 12-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwest Academy",'Bonners_Ferry=' + Bonners_Ferry.length); Lewiston[Lewiston.length] = createMarker(new GPoint(-117.01427700,46.41423500),"
Northwest Children's Home Educ
602 13th Street
Lewiston, ID 83501
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwest Children's Home Educ",'Lewiston=' + Lewiston.length); Boise[Boise.length] = createMarker(new GPoint(-116.27913300,43.67355200),"
Ol Mcdonalds Montessori Plus Child Care Inc
5890 Gary Lane
Boise, ID 83714
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ol Mcdonalds Montessori Plus Child Care Inc",'Boise=' + Boise.length); Coeur_Dalene[Coeur_Dalene.length] = createMarker(new GPoint(-116.78000000,47.67000000),"
Project Y.e.s.
Po Box 1648
Coeur D''alene, ID 83816
Co-ed school, 8-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Y.e.s.",'Coeur_Dalene=' + Coeur_Dalene.length); Burley[Burley.length] = createMarker(new GPoint(-113.79739500,42.52676300),"
Reach Me Teach Me
401 West 21st Street
Burley, ID 83318
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Reach Me Teach Me",'Burley=' + Burley.length); Boise[Boise.length] = createMarker(new GPoint(-116.11600400,43.56620500),"
Riverstone International School
5493 Warm Springs Ave
Boise, ID 83716
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverstone International School",'Boise=' + Boise.length); Boise[Boise.length] = createMarker(new GPoint(-116.23880600,43.59856300),"
Rose Hill Montessori
4603 Albion Street
Boise, ID 83705
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rose Hill Montessori",'Boise=' + Boise.length); Sandpoint[Sandpoint.length] = createMarker(new GPoint(-116.47396900,48.45924700),"
Sandpoint Waldorf School
Po Box 95
Sandpoint, ID 83864
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sandpoint Waldorf School",'Sandpoint=' + Sandpoint.length); Sandpoint[Sandpoint.length] = createMarker(new GPoint(-116.60017300,48.27352500),"
Selkirk School
11014 West Pine Street
Sandpoint, ID 83864
Co-ed school, NS-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Selkirk School",'Sandpoint=' + Sandpoint.length); Boise[Boise.length] = createMarker(new GPoint(-116.22837900,43.59671500),"
Sheridan Academy
820 South Latah Street
Boise, ID 83705
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sheridan Academy",'Boise=' + Boise.length); Meridian[Meridian.length] = createMarker(new GPoint(-116.41998600,43.61936200),"
Smaller Scholar Montessori School
2150 W Cherry Lane
Meridian, ID 83642
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Smaller Scholar Montessori School",'Meridian=' + Meridian.length); Idaho_Falls[Idaho_Falls.length] = createMarker(new GPoint(-111.97684600,43.49626500),"
Snake River Montessori School
2970 1st Street
Idaho Falls, ID 83401
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Snake River Montessori School",'Idaho_Falls=' + Idaho_Falls.length); Coeur_Dalene[Coeur_Dalene.length] = createMarker(new GPoint(-116.79193000,47.67720000),"
Stepping Stones Learning Center
602 Garden Ave
Coeur D'alene, ID 83814
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stepping Stones Learning Center",'Coeur_Dalene=' + Coeur_Dalene.length); Arco[Arco.length] = createMarker(new GPoint(-113.28656100,43.58429000),"
Wisdom Ranch School
Po Box 166
Arco, ID 83213
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wisdom Ranch School",'Arco=' + Arco.length); map.removeOverlays(Arco); map.removeOverlays(Boise); map.removeOverlays(Bonners_Ferry); map.removeOverlays(Burley); map.removeOverlays(Caldwell); map.removeOverlays(Clark_Fork); map.removeOverlays(Coeur_Dalene); map.removeOverlays(Donnelly); map.removeOverlays(Driggs); map.removeOverlays(Eagle); map.removeOverlays(Idaho_Falls); map.removeOverlays(Kuna); map.removeOverlays(Lewiston); map.removeOverlays(Mccall); map.removeOverlays(Meridian); map.removeOverlays(Mountain_Home); map.removeOverlays(Sandpoint); map.removeOverlays(Sun_Valley); setTimeout(function(){map.addOverlays(Arco)},1000); setTimeout(function(){map.addOverlays(Boise)},1000); setTimeout(function(){map.addOverlays(Bonners_Ferry)},1000); setTimeout(function(){map.addOverlays(Burley)},1000); setTimeout(function(){map.addOverlays(Caldwell)},1000); setTimeout(function(){map.addOverlays(Clark_Fork)},1000); setTimeout(function(){map.addOverlays(Coeur_Dalene)},1000); setTimeout(function(){map.addOverlays(Donnelly)},1000); setTimeout(function(){map.addOverlays(Driggs)},1000); setTimeout(function(){map.addOverlays(Eagle)},1000); setTimeout(function(){map.addOverlays(Idaho_Falls)},1000); setTimeout(function(){map.addOverlays(Kuna)},1000); setTimeout(function(){map.addOverlays(Lewiston)},1000); setTimeout(function(){map.addOverlays(Mccall)},1000); setTimeout(function(){map.addOverlays(Meridian)},1000); setTimeout(function(){map.addOverlays(Mountain_Home)},1000); setTimeout(function(){map.addOverlays(Sandpoint)},1000); setTimeout(function(){map.addOverlays(Sun_Valley)},1000); maxLng = -111.11311100; maxLat = 48.75710000; minLng = -117.01427700; minLat = 42.52676300; reCenterMap(); } // 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,11); /* 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(Arco); map.removeOverlays(Boise); map.removeOverlays(Bonners_Ferry); map.removeOverlays(Burley); map.removeOverlays(Caldwell); map.removeOverlays(Clark_Fork); map.removeOverlays(Coeur_Dalene); map.removeOverlays(Donnelly); map.removeOverlays(Driggs); map.removeOverlays(Eagle); map.removeOverlays(Idaho_Falls); map.removeOverlays(Kuna); map.removeOverlays(Lewiston); map.removeOverlays(Mccall); map.removeOverlays(Meridian); map.removeOverlays(Mountain_Home); map.removeOverlays(Sandpoint); map.removeOverlays(Sun_Valley); 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(Boise);map.removeOverlays(Arco); map.removeOverlays(Boise); map.removeOverlays(Bonners_Ferry); map.removeOverlays(Burley); map.removeOverlays(Caldwell); map.removeOverlays(Clark_Fork); map.removeOverlays(Coeur_Dalene); map.removeOverlays(Donnelly); map.removeOverlays(Driggs); map.removeOverlays(Eagle); map.removeOverlays(Idaho_Falls); map.removeOverlays(Kuna); map.removeOverlays(Lewiston); map.removeOverlays(Mccall); map.removeOverlays(Meridian); map.removeOverlays(Mountain_Home); map.removeOverlays(Sandpoint); map.removeOverlays(Sun_Valley); map.addOverlays(Arco); centerByArray(Arco, false, false); cntMarker += Arco.length; map.addOverlays(Boise); centerByArray(Boise, false, false); cntMarker += Boise.length; map.addOverlays(Bonners_Ferry); centerByArray(Bonners_Ferry, false, false); cntMarker += Bonners_Ferry.length; map.addOverlays(Burley); centerByArray(Burley, false, false); cntMarker += Burley.length; map.addOverlays(Caldwell); centerByArray(Caldwell, false, false); cntMarker += Caldwell.length; map.addOverlays(Clark_Fork); centerByArray(Clark_Fork, false, false); cntMarker += Clark_Fork.length; map.addOverlays(Coeur_Dalene); centerByArray(Coeur_Dalene, false, false); cntMarker += Coeur_Dalene.length; map.addOverlays(Donnelly); centerByArray(Donnelly, false, false); cntMarker += Donnelly.length; map.addOverlays(Driggs); centerByArray(Driggs, false, false); cntMarker += Driggs.length; map.addOverlays(Eagle); centerByArray(Eagle, false, false); cntMarker += Eagle.length; map.addOverlays(Idaho_Falls); centerByArray(Idaho_Falls, false, false); cntMarker += Idaho_Falls.length; map.addOverlays(Kuna); centerByArray(Kuna, false, false); cntMarker += Kuna.length; map.addOverlays(Lewiston); centerByArray(Lewiston, false, false); cntMarker += Lewiston.length; map.addOverlays(Mccall); centerByArray(Mccall, false, false); cntMarker += Mccall.length; map.addOverlays(Meridian); centerByArray(Meridian, false, false); cntMarker += Meridian.length; map.addOverlays(Mountain_Home); centerByArray(Mountain_Home, false, false); cntMarker += Mountain_Home.length; map.addOverlays(Sandpoint); centerByArray(Sandpoint, false, false); cntMarker += Sandpoint.length; map.addOverlays(Sun_Valley); centerByArray(Sun_Valley, false, false); cntMarker += Sun_Valley.length; centerByArray(Boise,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///31177,31170,8277,8286,8278,8268,8238,8276,8225,8259,35635,8270,8302,31169,32346,36246,27785,8301,8229,8315,8242,31170,8319,8311,35022,31171,34749,8277,8324,8286,8323,8312,31175,8225,8259,8230,8299,35635,35557,8317,8322,8304,8318,8272,8270,36247,27784,31168,31174,8226,8316,8284,8285,8302,/all'); //window.open('/map.php?type=2&schools=31177,31170,8277,8286,8278,8268,8238,8276,8225,8259,35635,8270,8302,31169,32346,36246,27785,8301,8229,8315,8242,31170,8319,8311,35022,31171,34749,8277,8324,8286,8323,8312,31175,8225,8259,8230,8299,35635,35557,8317,8322,8304,8318,8272,8270,36247,27784,31168,31174,8226,8316,8284,8285,8302,&school_level=&radius=&zipcode=&school_type_search=&school_type_code='); } } function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }