function addMarkers(){ mySelect = document.getElementById('selection'); Englewood = [];Denver = [];Parker = [];Colorado_Springs = [];Broomfield = [];Westminster = [];Pueblo = [];Lakewood = [];Aurora = [];Boulder = [];Sterling = [];Edwards = [];Loveland = [];Greeley = [];Centennial = [];Durango = [];Longmont = [];Fort_Collins = [];Louisville = [];Monument = [];Wheat_Ridge = [];mySelect.options[mySelect.options.length] = new Option("Aurora schools",'all=Aurora'); mySelect.options[mySelect.options.length] = new Option("Boulder schools",'all=Boulder'); mySelect.options[mySelect.options.length] = new Option("Broomfield schools",'all=Broomfield'); mySelect.options[mySelect.options.length] = new Option("Centennial schools",'all=Centennial'); mySelect.options[mySelect.options.length] = new Option("Colorado Springs schools",'all=Colorado_Springs'); mySelect.options[mySelect.options.length] = new Option("Denver schools",'all=Denver'); mySelect.options[mySelect.options.length] = new Option("Durango schools",'all=Durango'); mySelect.options[mySelect.options.length] = new Option("Edwards schools",'all=Edwards'); mySelect.options[mySelect.options.length] = new Option("Englewood schools",'all=Englewood'); mySelect.options[mySelect.options.length] = new Option("Fort Collins schools",'all=Fort_Collins'); mySelect.options[mySelect.options.length] = new Option("Greeley schools",'all=Greeley'); mySelect.options[mySelect.options.length] = new Option("Lakewood schools",'all=Lakewood'); mySelect.options[mySelect.options.length] = new Option("Longmont schools",'all=Longmont'); mySelect.options[mySelect.options.length] = new Option("Louisville schools",'all=Louisville'); mySelect.options[mySelect.options.length] = new Option("Loveland schools",'all=Loveland'); mySelect.options[mySelect.options.length] = new Option("Monument schools",'all=Monument'); mySelect.options[mySelect.options.length] = new Option("Parker schools",'all=Parker'); mySelect.options[mySelect.options.length] = new Option("Pueblo schools",'all=Pueblo'); mySelect.options[mySelect.options.length] = new Option("Sterling schools",'all=Sterling'); mySelect.options[mySelect.options.length] = new Option("Westminster schools",'all=Westminster'); mySelect.options[mySelect.options.length] = new Option("Wheat Ridge schools",'all=Wheat_Ridge'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Englewood[Englewood.length] = createMarker(new GPoint(-104.98227700,39.62697100),"
All Souls School
4951 S Pennsylvania Street
Englewood, CO 80113
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("All Souls School",'Englewood=' + Englewood.length); Denver[Denver.length] = createMarker(new GPoint(-104.97072000,39.76627600),"
Annunciation
3536 Lafayette Street
Denver, CO 80205
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Annunciation",'Denver=' + Denver.length); Parker[Parker.length] = createMarker(new GPoint(-104.71706300,39.52011900),"
Ave Maria Catholic School
9056 East Parker Rd
Parker, CO 80138
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ave Maria Catholic School",'Parker=' + Parker.length); Denver[Denver.length] = createMarker(new GPoint(-104.89490000,39.72210000),"
Bishop Machebeuf Catholic High School
458 Uinta Way
Denver, CO 80230
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bishop Machebeuf Catholic High School",'Denver=' + Denver.length); Denver[Denver.length] = createMarker(new GPoint(-104.92997700,39.74686300),"
Blessed Sacrament Elementary School
1973 Elm Street
Denver, CO 80220
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blessed Sacrament Elementary School",'Denver=' + Denver.length); Denver[Denver.length] = createMarker(new GPoint(-104.92912100,39.73026300),"
Christ The King Roman Catholic School
860 Elm Street
Denver, CO 80220
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The King Roman Catholic School",'Denver=' + Denver.length); Colorado_Springs[Colorado_Springs.length] = createMarker(new GPoint(-104.82372700,38.86746000),"
Corpus Christi School
2410 N Cascade Avenue
Colorado Springs, CO 80907
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Corpus Christi School",'Colorado_Springs=' + Colorado_Springs.length); Colorado_Springs[Colorado_Springs.length] = createMarker(new GPoint(-104.79843700,38.84588400),"
Divine Redeemer Catholic School
901 N Logan Avenue
Colorado Springs, CO 80909
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Divine Redeemer Catholic School",'Colorado_Springs=' + Colorado_Springs.length); Broomfield[Broomfield.length] = createMarker(new GPoint(-105.05093200,39.95787600),"
Holy Family High School
5195 W 144th Ave
Broomfield, CO 80023
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family High School",'Broomfield=' + Broomfield.length); Westminster[Westminster.length] = createMarker(new GPoint(-105.02623200,39.83437600),"
Holy Trinity Catholic School
3050 W 76th Avenue
Westminster, CO 80030
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Trinity Catholic School",'Westminster=' + Westminster.length); Colorado_Springs[Colorado_Springs.length] = createMarker(new GPoint(-104.80124900,38.87586300),"
Holy Trinity Parish School
3115 Larkspur Drive
Colorado Springs, CO 80907
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Trinity Parish School",'Colorado_Springs=' + Colorado_Springs.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.62070600,38.22681700),"
John Neumann Preschool
2415 E Orman Avenue
Pueblo, CO 81004
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("John Neumann Preschool",'Pueblo=' + Pueblo.length); Denver[Denver.length] = createMarker(new GPoint(-104.96082000,39.75135600),"
Loyola Grade School
2350 Gaylord Street
Denver, CO 80205
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Loyola Grade School",'Denver=' + Denver.length); Denver[Denver.length] = createMarker(new GPoint(-104.94130000,39.67493700),"
Most Precious Blood School
3959 E Iliff Avenue
Denver, CO 80210
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Most Precious Blood School",'Denver=' + Denver.length); Denver[Denver.length] = createMarker(new GPoint(-105.03478800,39.65051700),"
Mullen High School
3601 S Lowell Blvd
Denver, CO 80236
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mullen High School",'Denver=' + Denver.length); Broomfield[Broomfield.length] = createMarker(new GPoint(-105.07898300,39.92359300),"
Nativity Of Our Lord School
900 W Midway Blvd
Broomfield, CO 80020
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nativity Of Our Lord School",'Broomfield=' + Broomfield.length); Denver[Denver.length] = createMarker(new GPoint(-105.05217700,39.67709400),"
Notre Dame School
2165 South Zenobia Street
Denver, CO 80219
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Notre Dame School",'Denver=' + Denver.length); Lakewood[Lakewood.length] = createMarker(new GPoint(-105.11572600,39.74724500),"
Our Lady Of Fatima School
10530 W 20th Avenue
Lakewood, CO 80215
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Fatima School",'Lakewood=' + Lakewood.length); Denver[Denver.length] = createMarker(new GPoint(-104.98266400,39.67570600),"
Our Lady Of Lourdes School
2256 S Logan Street
Denver, CO 80210
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Lourdes School",'Denver=' + Denver.length); Colorado_Springs[Colorado_Springs.length] = createMarker(new GPoint(-104.85587500,38.79068000),"
Pauline Memorial Catholic School
1601 Mesa Ave
Colorado Springs, CO 80906
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pauline Memorial Catholic School",'Colorado_Springs=' + Colorado_Springs.length); Denver[Denver.length] = createMarker(new GPoint(-105.03112100,39.72704100),"
Presentation Of Our Lady School
660 Julian Street
Denver, CO 80204
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Presentation Of Our Lady School",'Denver=' + Denver.length); Aurora[Aurora.length] = createMarker(new GPoint(-104.80253900,39.60096300),"
Regis Jesuit High School/boys Division
6400 S Lewiston Way
Aurora, CO 80016
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Regis Jesuit High School/boys Division",'Aurora=' + Aurora.length); Boulder[Boulder.length] = createMarker(new GPoint(-105.27941400,40.02140900),"
Sacred Heart Of Jesus
1317 Mapleton Avenue
Boulder, CO 80304
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Of Jesus",'Boulder=' + Boulder.length); Sterling[Sterling.length] = createMarker(new GPoint(-103.21021200,40.62113600),"
St. Anthony Catholic School
324 S 3rd Street
Sterling, CO 80751
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anthony Catholic School",'Sterling=' + Sterling.length); Lakewood[Lakewood.length] = createMarker(new GPoint(-105.07772100,39.73390500),"
St. Bernadette School
1100 Upham Street
Lakewood, CO 80214
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Bernadette School",'Lakewood=' + Lakewood.length); Edwards[Edwards.length] = createMarker(new GPoint(-106.59018000,39.64178000),"
St. Clare Of Assisi School
316227 Highway 6
Edwards, CO 81632
Co-ed school, KG-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Clare Of Assisi School",'Edwards=' + Edwards.length); Loveland[Loveland.length] = createMarker(new GPoint(-105.10001300,40.40526300),"
St. John The Evangelist Catholic School
1730 W 12th Street
Loveland, CO 80537
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John The Evangelist Catholic School",'Loveland=' + Loveland.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.62038300,38.25436300),"
St. John Neumann Catholic School
2415 E Orman Avenue
Pueblo, CO 81004
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John Neumann Catholic School",'Pueblo=' + Pueblo.length); Englewood[Englewood.length] = createMarker(new GPoint(-104.98537700,39.65664800),"
St. Louis Elementary School
3301 S Sherman Street
Englewood, CO 80113
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Louis Elementary School",'Englewood=' + Englewood.length); Englewood[Englewood.length] = createMarker(new GPoint(-104.95980400,39.63371600),"
St. Mary's Academy
4545 South University Boulevard
Englewood, CO 80113
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary's Academy",'Englewood=' + Englewood.length); Greeley[Greeley.length] = createMarker(new GPoint(-104.71476000,40.40071000),"
St. Mary's Catholic School
2351 22nd Avenue
Greeley, CO 80631
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary's Catholic School",'Greeley=' + Greeley.length); Colorado_Springs[Colorado_Springs.length] = createMarker(new GPoint(-104.78401300,38.84689800),"
St. Mary's High School
2501 E Yampa Street
Colorado Springs, CO 80909
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary's High School",'Colorado_Springs=' + Colorado_Springs.length); Aurora[Aurora.length] = createMarker(new GPoint(-104.82872900,39.73765700),"
St. Pius X Elementary School
13680 East 14th Place
Aurora, CO 80011
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Pius X Elementary School",'Aurora=' + Aurora.length); Aurora[Aurora.length] = createMarker(new GPoint(-104.85982300,39.73485600),"
St. Therese Elementary School
1200 Kenton Street
Aurora, CO 80010
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Therese Elementary School",'Aurora=' + Aurora.length); Centennial[Centennial.length] = createMarker(new GPoint(-104.90740600,39.56979400),"
Saint Thomas More Catholic School
7071 E Otero Avenue
Centennial, CO 80112
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Thomas More Catholic School",'Centennial=' + Centennial.length); Durango[Durango.length] = createMarker(new GPoint(-107.87502100,37.28297100),"
St Columba School
1801 E 3rd Avenue
Durango, CO 81301
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Columba School",'Durango=' + Durango.length); Denver[Denver.length] = createMarker(new GPoint(-104.98529600,39.71233100),"
St Francis De Sales Grade School
235 S Sherman Street
Denver, CO 80209
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Francis De Sales Grade School",'Denver=' + Denver.length); Longmont[Longmont.length] = createMarker(new GPoint(-105.09961900,40.16480800),"
St John The Baptist Catholic School
350 Emery Street
Longmont, CO 80501
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John The Baptist Catholic School",'Longmont=' + Longmont.length); Fort_Collins[Fort_Collins.length] = createMarker(new GPoint(-105.08088000,40.58768000),"
St Joseph Catholic School
127 North Howes Street
Fort Collins, CO 80521
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph Catholic School",'Fort_Collins=' + Fort_Collins.length); Louisville[Louisville.length] = createMarker(new GPoint(-105.13594500,39.97903100),"
St Louis Elementary School
925 Grant Avenue
Louisville, CO 80027
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Louis Elementary School",'Louisville=' + Louisville.length); Monument[Monument.length] = createMarker(new GPoint(-104.84494800,39.09641300),"
St Peter Catholic School
Po Box 827
Monument, CO 80132
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Peter Catholic School",'Monument=' + Monument.length); Denver[Denver.length] = createMarker(new GPoint(-105.00499600,39.70948500),"
St Rose Of Lima School
1345 West Dakota Avenue
Denver, CO 80223
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Rose Of Lima School",'Denver=' + Denver.length); Pueblo[Pueblo.length] = createMarker(new GPoint(-104.64243300,38.26387000),"
St Therese Catholic School
320 Goodnight Avenue
Pueblo, CO 81004
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Therese Catholic School",'Pueblo=' + Pueblo.length); Denver[Denver.length] = createMarker(new GPoint(-104.95797400,39.69545200),"
St Vincent De Paul School
1164 S Josephine Street
Denver, CO 80210
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Vincent De Paul School",'Denver=' + Denver.length); Wheat_Ridge[Wheat_Ridge.length] = createMarker(new GPoint(-105.07192000,39.77087200),"
Sts Peter & Paul
3920 Pierce Street
Wheat Ridge, CO 80033
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sts Peter & Paul",'Wheat_Ridge=' + Wheat_Ridge.length); map.removeOverlays(Aurora); map.removeOverlays(Boulder); map.removeOverlays(Broomfield); map.removeOverlays(Centennial); map.removeOverlays(Colorado_Springs); map.removeOverlays(Denver); map.removeOverlays(Durango); map.removeOverlays(Edwards); map.removeOverlays(Englewood); map.removeOverlays(Fort_Collins); map.removeOverlays(Greeley); map.removeOverlays(Lakewood); map.removeOverlays(Longmont); map.removeOverlays(Louisville); map.removeOverlays(Loveland); map.removeOverlays(Monument); map.removeOverlays(Parker); map.removeOverlays(Pueblo); map.removeOverlays(Sterling); map.removeOverlays(Westminster); map.removeOverlays(Wheat_Ridge); setTimeout(function(){map.addOverlays(Aurora)},1000); setTimeout(function(){map.addOverlays(Boulder)},1000); setTimeout(function(){map.addOverlays(Broomfield)},1000); setTimeout(function(){map.addOverlays(Centennial)},1000); setTimeout(function(){map.addOverlays(Colorado_Springs)},1000); setTimeout(function(){map.addOverlays(Denver)},1000); setTimeout(function(){map.addOverlays(Durango)},1000); setTimeout(function(){map.addOverlays(Edwards)},1000); setTimeout(function(){map.addOverlays(Englewood)},1000); setTimeout(function(){map.addOverlays(Fort_Collins)},1000); setTimeout(function(){map.addOverlays(Greeley)},1000); setTimeout(function(){map.addOverlays(Lakewood)},1000); setTimeout(function(){map.addOverlays(Longmont)},1000); setTimeout(function(){map.addOverlays(Louisville)},1000); setTimeout(function(){map.addOverlays(Loveland)},1000); setTimeout(function(){map.addOverlays(Monument)},1000); setTimeout(function(){map.addOverlays(Parker)},1000); setTimeout(function(){map.addOverlays(Pueblo)},1000); setTimeout(function(){map.addOverlays(Sterling)},1000); setTimeout(function(){map.addOverlays(Westminster)},1000); setTimeout(function(){map.addOverlays(Wheat_Ridge)},1000); maxLng = -103.21021200; maxLat = 40.62113600; minLng = -107.87502100; minLat = 37.28297100; 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(Aurora); map.removeOverlays(Boulder); map.removeOverlays(Broomfield); map.removeOverlays(Centennial); map.removeOverlays(Colorado_Springs); map.removeOverlays(Denver); map.removeOverlays(Durango); map.removeOverlays(Edwards); map.removeOverlays(Englewood); map.removeOverlays(Fort_Collins); map.removeOverlays(Greeley); map.removeOverlays(Lakewood); map.removeOverlays(Longmont); map.removeOverlays(Louisville); map.removeOverlays(Loveland); map.removeOverlays(Monument); map.removeOverlays(Parker); map.removeOverlays(Pueblo); map.removeOverlays(Sterling); map.removeOverlays(Westminster); map.removeOverlays(Wheat_Ridge); 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(Englewood);map.removeOverlays(Aurora); map.removeOverlays(Boulder); map.removeOverlays(Broomfield); map.removeOverlays(Centennial); map.removeOverlays(Colorado_Springs); map.removeOverlays(Denver); map.removeOverlays(Durango); map.removeOverlays(Edwards); map.removeOverlays(Englewood); map.removeOverlays(Fort_Collins); map.removeOverlays(Greeley); map.removeOverlays(Lakewood); map.removeOverlays(Longmont); map.removeOverlays(Louisville); map.removeOverlays(Loveland); map.removeOverlays(Monument); map.removeOverlays(Parker); map.removeOverlays(Pueblo); map.removeOverlays(Sterling); map.removeOverlays(Westminster); map.removeOverlays(Wheat_Ridge); map.addOverlays(Aurora); centerByArray(Aurora, false, false); cntMarker += Aurora.length; map.addOverlays(Boulder); centerByArray(Boulder, false, false); cntMarker += Boulder.length; map.addOverlays(Broomfield); centerByArray(Broomfield, false, false); cntMarker += Broomfield.length; map.addOverlays(Centennial); centerByArray(Centennial, false, false); cntMarker += Centennial.length; map.addOverlays(Colorado_Springs); centerByArray(Colorado_Springs, false, false); cntMarker += Colorado_Springs.length; map.addOverlays(Denver); centerByArray(Denver, false, false); cntMarker += Denver.length; map.addOverlays(Durango); centerByArray(Durango, false, false); cntMarker += Durango.length; map.addOverlays(Edwards); centerByArray(Edwards, false, false); cntMarker += Edwards.length; map.addOverlays(Englewood); centerByArray(Englewood, false, false); cntMarker += Englewood.length; map.addOverlays(Fort_Collins); centerByArray(Fort_Collins, false, false); cntMarker += Fort_Collins.length; map.addOverlays(Greeley); centerByArray(Greeley, false, false); cntMarker += Greeley.length; map.addOverlays(Lakewood); centerByArray(Lakewood, false, false); cntMarker += Lakewood.length; map.addOverlays(Longmont); centerByArray(Longmont, false, false); cntMarker += Longmont.length; map.addOverlays(Louisville); centerByArray(Louisville, false, false); cntMarker += Louisville.length; map.addOverlays(Loveland); centerByArray(Loveland, false, false); cntMarker += Loveland.length; map.addOverlays(Monument); centerByArray(Monument, false, false); cntMarker += Monument.length; map.addOverlays(Parker); centerByArray(Parker, false, false); cntMarker += Parker.length; map.addOverlays(Pueblo); centerByArray(Pueblo, false, false); cntMarker += Pueblo.length; map.addOverlays(Sterling); centerByArray(Sterling, false, false); cntMarker += Sterling.length; map.addOverlays(Westminster); centerByArray(Westminster, false, false); cntMarker += Westminster.length; map.addOverlays(Wheat_Ridge); centerByArray(Wheat_Ridge, false, false); cntMarker += Wheat_Ridge.length; centerByArray(Englewood,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///35858,5005,5167,4890,5086,5179,5160,5144,5151,5171,5175,5130,5087,5176,4942,4956,5009,5102,4875,4893,4917,5049,5080,5092,5096,5109,5155,5172,5177,5154,5178,4872,5162,5179,5160,5165,5095,5152,5157,5161,5158,34990,4881,34020,5023,5144,5151,5008,5168,/all'); //window.open('/map.php?type=2&schools=35858,5005,5167,4890,5086,5179,5160,5144,5151,5171,5175,5130,5087,5176,4942,4956,5009,5102,4875,4893,4917,5049,5080,5092,5096,5109,5155,5172,5177,5154,5178,4872,5162,5179,5160,5165,5095,5152,5157,5161,5158,34990,4881,34020,5023,5144,5151,5008,5168,&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; }