function addMarkers(){ mySelect = document.getElementById('selection'); Monessen = [];Greensburg = [];Armbrust = [];Latrobe = [];Irwin = [];Vandergrift = [];Champion = [];Murrysville = [];Jeannette = [];North_Huntingdon = [];Belle_Vernon = [];Bradenville = [];New_Kensington = [];Derry = [];Hunker = [];Youngwood = [];Ligonier = [];Acme = [];Youngstown = [];Herminie = [];United = [];Scottdale = [];Delmont = [];Mount_Pleasant = [];mySelect.options[mySelect.options.length] = new Option("Acme schools",'all=Acme'); mySelect.options[mySelect.options.length] = new Option("Armbrust schools",'all=Armbrust'); mySelect.options[mySelect.options.length] = new Option("Belle Vernon schools",'all=Belle_Vernon'); mySelect.options[mySelect.options.length] = new Option("Bradenville schools",'all=Bradenville'); mySelect.options[mySelect.options.length] = new Option("Champion schools",'all=Champion'); mySelect.options[mySelect.options.length] = new Option("Delmont schools",'all=Delmont'); mySelect.options[mySelect.options.length] = new Option("Derry schools",'all=Derry'); mySelect.options[mySelect.options.length] = new Option("Greensburg schools",'all=Greensburg'); mySelect.options[mySelect.options.length] = new Option("Herminie schools",'all=Herminie'); mySelect.options[mySelect.options.length] = new Option("Hunker schools",'all=Hunker'); mySelect.options[mySelect.options.length] = new Option("Irwin schools",'all=Irwin'); mySelect.options[mySelect.options.length] = new Option("Jeannette schools",'all=Jeannette'); mySelect.options[mySelect.options.length] = new Option("Latrobe schools",'all=Latrobe'); mySelect.options[mySelect.options.length] = new Option("Ligonier schools",'all=Ligonier'); mySelect.options[mySelect.options.length] = new Option("Monessen schools",'all=Monessen'); mySelect.options[mySelect.options.length] = new Option("Mount Pleasant schools",'all=Mount_Pleasant'); mySelect.options[mySelect.options.length] = new Option("Murrysville schools",'all=Murrysville'); mySelect.options[mySelect.options.length] = new Option("New Kensington schools",'all=New_Kensington'); mySelect.options[mySelect.options.length] = new Option("North Huntingdon schools",'all=North_Huntingdon'); mySelect.options[mySelect.options.length] = new Option("Scottdale schools",'all=Scottdale'); mySelect.options[mySelect.options.length] = new Option("United schools",'all=United'); mySelect.options[mySelect.options.length] = new Option("Vandergrift schools",'all=Vandergrift'); mySelect.options[mySelect.options.length] = new Option("Youngstown schools",'all=Youngstown'); mySelect.options[mySelect.options.length] = new Option("Youngwood schools",'all=Youngwood'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Monessen[Monessen.length] = createMarker(new GPoint(-79.87041800,40.15942700),"
Agape Day Treatment Program
2nd Level - Eastgate 8
Monessen, PA 15062
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Agape Day Treatment Program",'Monessen=' + Monessen.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.54603400,40.30698200),"
Aquinas Academy
340 N Main Street
Greensburg, PA 15601
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Aquinas Academy",'Greensburg=' + Greensburg.length); Armbrust[Armbrust.length] = createMarker(new GPoint(-79.56950000,40.24120000),"
Armbrust Wesleyan Christian Academy
Po Box 115
Armbrust, PA 15616
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Armbrust Wesleyan Christian Academy",'Armbrust=' + Armbrust.length); Latrobe[Latrobe.length] = createMarker(new GPoint(-79.33691400,40.30076100),"
Bible Baptist Christian Academy
232 Route 217
Latrobe, PA 15650
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bible Baptist Christian Academy",'Latrobe=' + Latrobe.length); Irwin[Irwin.length] = createMarker(new GPoint(-79.68373500,40.31970800),"
Calvary Preschool Center
8653 Pennsylvania Avenue
Irwin, PA 15642
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Preschool Center",'Irwin=' + Irwin.length); Vandergrift[Vandergrift.length] = createMarker(new GPoint(-79.56458700,40.59998600),"
Cardinal Maida Academy
315 Franklin Avenue
Vandergrift, PA 15690
Co-ed school, K-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cardinal Maida Academy",'Vandergrift=' + Vandergrift.length); Champion[Champion.length] = createMarker(new GPoint(-79.38190400,40.02428900),"
Champion Christian School
2166 Indian Head Road
Champion, PA 15622
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Champion Christian School",'Champion=' + Champion.length); Murrysville[Murrysville.length] = createMarker(new GPoint(-79.67965100,40.42767400),"
Childrens Learning Ladder
4351 Old Wm Penn Highway
Murrysville, PA 15668
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens Learning Ladder",'Murrysville=' + Murrysville.length); Latrobe[Latrobe.length] = createMarker(new GPoint(-79.38209200,40.31496800),"
Christ The Divine Teacher School
323 Chestnut Street
Latrobe, PA 15650
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The Divine Teacher School",'Latrobe=' + Latrobe.length); Jeannette[Jeannette.length] = createMarker(new GPoint(-79.58707900,40.36618100),"
Christian Fellowship Academy
2005 Ridge Road
Jeannette, PA 15644
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Fellowship Academy",'Jeannette=' + Jeannette.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.51962000,40.35304000),"
Clelian Heights School For Exceptional Children
Rr 9 Box 607
Greensburg, PA 15601
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clelian Heights School For Exceptional Children",'Greensburg=' + Greensburg.length); North_Huntingdon[North_Huntingdon.length] = createMarker(new GPoint(-79.75081900,40.32806200),"
Creative Adventures Learning Center, Inc.
469 Colt Drive
North Huntingdon, PA 15642
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Creative Adventures Learning Center, Inc.",'North_Huntingdon=' + North_Huntingdon.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.45700000,40.29640000),"
Eliz Seton Montessori School
Rr 7 Box 268
Greensburg, PA 15601
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eliz Seton Montessori School",'Greensburg=' + Greensburg.length); Monessen[Monessen.length] = createMarker(new GPoint(-79.88885600,40.16155900),"
Epiphany Of Our Lord Catholic
701 Schoonmaker Ave
Monessen, PA 15062
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Epiphany Of Our Lord Catholic",'Monessen=' + Monessen.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.47860000,40.29420000),"
Free Methodist Childcare Center
1261 Toppers Road
Greensburg, PA 15601
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Free Methodist Childcare Center",'Greensburg=' + Greensburg.length); Belle_Vernon[Belle_Vernon.length] = createMarker(new GPoint(-79.85745900,40.17771500),"
Friendship Christian School
4399a State Route 51 N
Belle Vernon, PA 15012
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Friendship Christian School",'Belle_Vernon=' + Belle_Vernon.length); Bradenville[Bradenville.length] = createMarker(new GPoint(-79.33852400,40.31776200),"
Grace Bible Academy
128 Bradenville School Road
Bradenville, PA 15620
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Bible Academy",'Bradenville=' + Bradenville.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.50515300,40.27866000),"
The Growing Tree Child Care Learning Center, Inc.
100 Westpoint Drive
Greensburg, PA 15601
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Growing Tree Child Care Learning Center, Inc.",'Greensburg=' + Greensburg.length); Latrobe[Latrobe.length] = createMarker(new GPoint(-79.40079500,40.29138400),"
The Growing Tree-st. Vincent C
300 Fraser Purchase Rd
Latrobe, PA 15650
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Growing Tree-st. Vincent C",'Latrobe=' + Latrobe.length); New_Kensington[New_Kensington.length] = createMarker(new GPoint(-79.76259400,40.56581100),"
Harvest Baptist Academy
884 Kenneth Avenue
New Kensington, PA 15068
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harvest Baptist Academy",'New_Kensington=' + New_Kensington.length); Derry[Derry.length] = createMarker(new GPoint(-79.30665300,40.34771100),"
Harvest Christian Academy
224 Pittsburgh Street
Derry, PA 15627
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harvest Christian Academy",'Derry=' + Derry.length); Jeannette[Jeannette.length] = createMarker(new GPoint(-79.61786200,40.31766200),"
Heritage Baptist Academy
915 Lowry Avenue
Jeannette, PA 15644
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Baptist Academy",'Jeannette=' + Jeannette.length); Hunker[Hunker.length] = createMarker(new GPoint(-79.59970000,40.19640000),"
Hilltop Christian Academy
Rr 1 Box 551
Hunker, PA 15639
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hilltop Christian Academy",'Hunker=' + Hunker.length); Youngwood[Youngwood.length] = createMarker(new GPoint(-79.58209000,40.24126600),"
Holy Cross School
10 South 8th Street
Youngwood, PA 15697
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Cross School",'Youngwood=' + Youngwood.length); Ligonier[Ligonier.length] = createMarker(new GPoint(-79.24075000,40.24776500),"
Holy Trinity School
327 W Vincent Street
Ligonier, PA 15658
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Trinity School",'Ligonier=' + Ligonier.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.54640300,40.32563500),"
Kindercare Learning Center
980 N Main Street
Greensburg, PA 15601
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare Learning Center",'Greensburg=' + Greensburg.length); North_Huntingdon[North_Huntingdon.length] = createMarker(new GPoint(-79.69311500,40.31634600),"
Kindercare Learning Center 955
8895 Norwin Avenue
North Huntingdon, PA 15642
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare Learning Center 955",'North_Huntingdon=' + North_Huntingdon.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.53930200,40.28398500),"
Learning Tree Truxal Site
718 Rugh Street
Greensburg, PA 15601
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Learning Tree Truxal Site",'Greensburg=' + Greensburg.length); New_Kensington[New_Kensington.length] = createMarker(new GPoint(-79.76260700,40.56907100),"
Mary Queen Of Apostles School
1129 Leishman Avenue
New Kensington, PA 15068
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mary Queen Of Apostles School",'New_Kensington=' + New_Kensington.length); New_Kensington[New_Kensington.length] = createMarker(new GPoint(-79.76174700,40.56306000),"
Mary Queen Of Apostles-frs
100 Freeport Road
New Kensington, PA 15068
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mary Queen Of Apostles-frs",'New_Kensington=' + New_Kensington.length); Murrysville[Murrysville.length] = createMarker(new GPoint(-79.68414500,40.43092300),"
Mother Of Sorrows Elementary School
3264 Evergreen Drive
Murrysville, PA 15668
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mother Of Sorrows Elementary School",'Murrysville=' + Murrysville.length); Acme[Acme.length] = createMarker(new GPoint(-79.46668000,40.11546000),"
Mt Zion Christian Academy
159 Kreinbrook Hill Road
Acme, PA 15610
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt Zion Christian Academy",'Acme=' + Acme.length); Latrobe[Latrobe.length] = createMarker(new GPoint(-79.38840900,40.31956200),"
New Horizons School
310 Ligonier St
Latrobe, PA 15650
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Horizons School",'Latrobe=' + Latrobe.length); North_Huntingdon[North_Huntingdon.length] = createMarker(new GPoint(-79.71319400,40.32602300),"
Queen Of Angels Catholic School
One Main Street
North Huntingdon, PA 15642
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Queen Of Angels Catholic School",'North_Huntingdon=' + North_Huntingdon.length); North_Huntingdon[North_Huntingdon.length] = createMarker(new GPoint(-79.71325400,40.32596200),"
Queen Of Angels Regional Catholic School
1 Main Street
North Huntingdon, PA 15642
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Queen Of Angels Regional Catholic School",'North_Huntingdon=' + North_Huntingdon.length); Murrysville[Murrysville.length] = createMarker(new GPoint(-79.69511800,40.42629300),"
Rainbow Connection Ecdc
3089 Carson Avenue
Murrysville, PA 15668
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rainbow Connection Ecdc",'Murrysville=' + Murrysville.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-79.36560000,40.28030000),"
Sacred Heart School
Po Box 328 Main Street
Youngstown, PA 15696
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart School",'Youngstown=' + Youngstown.length); Herminie[Herminie.length] = createMarker(new GPoint(-79.71040000,40.25803400),"
St. Edward Elementary School
89 6th Street Extension
Herminie, PA 15637
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Edward Elementary School",'Herminie=' + Herminie.length); United[United.length] = createMarker(new GPoint(-79.48800000,40.21830000),"
St. Florian Elementary School
Po Box 188
United, PA 15689
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Florian Elementary School",'United=' + United.length); Scottdale[Scottdale.length] = createMarker(new GPoint(-79.59129600,40.09616500),"
St. John The Baptist School
504 S Broadway Street
Scottdale, PA 15683
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John The Baptist School",'Scottdale=' + Scottdale.length); Belle_Vernon[Belle_Vernon.length] = createMarker(new GPoint(-79.85978600,40.13228700),"
St. Sebastians School
815 Broad Avenue
Belle Vernon, PA 15012
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Sebastians School",'Belle_Vernon=' + Belle_Vernon.length); Delmont[Delmont.length] = createMarker(new GPoint(-79.57189200,40.41051700),"
Salem Crossroads Daycare School
77 Greensburg Street
Delmont, PA 15626
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Salem Crossroads Daycare School",'Delmont=' + Delmont.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.53250000,40.30590000),"
Seton Hill University Early Childhood Programs
Childhood Programs Box 471
Greensburg, PA 15601
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seton Hill University Early Childhood Programs",'Greensburg=' + Greensburg.length); Belle_Vernon[Belle_Vernon.length] = createMarker(new GPoint(-79.77934100,40.14704100),"
Small Creations
1590 Ridge Road
Belle Vernon, PA 15012
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Small Creations",'Belle_Vernon=' + Belle_Vernon.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.52453600,40.30206300),"
Todays Children Tomorrows Lead
770 E Pittsburg St
Greensburg, PA 15601
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Todays Children Tomorrows Lead",'Greensburg=' + Greensburg.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.52453600,40.30206300),"
Todays Children-tomorrows Lead
770 E Pittsburgh Street
Greensburg, PA 15601
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Todays Children-tomorrows Lead",'Greensburg=' + Greensburg.length); Ligonier[Ligonier.length] = createMarker(new GPoint(-79.22840000,40.24684200),"
Valley School Of Ligonier
Po Box 616
Ligonier, PA 15658
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Valley School Of Ligonier",'Ligonier=' + Ligonier.length); Mount_Pleasant[Mount_Pleasant.length] = createMarker(new GPoint(-79.54103500,40.09565600),"
Verna Montessori School
268 Prittstown Road
Mount Pleasant, PA 15666
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Verna Montessori School",'Mount_Pleasant=' + Mount_Pleasant.length); Greensburg[Greensburg.length] = createMarker(new GPoint(-79.54252900,40.28580200),"
Westmoreland Christian Academy
538 Rugh Street
Greensburg, PA 15601
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westmoreland Christian Academy",'Greensburg=' + Greensburg.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,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/////1/' + showArray); map.removeOverlays(Acme); map.removeOverlays(Armbrust); map.removeOverlays(Belle_Vernon); map.removeOverlays(Bradenville); map.removeOverlays(Champion); map.removeOverlays(Delmont); map.removeOverlays(Derry); map.removeOverlays(Greensburg); map.removeOverlays(Herminie); map.removeOverlays(Hunker); map.removeOverlays(Irwin); map.removeOverlays(Jeannette); map.removeOverlays(Latrobe); map.removeOverlays(Ligonier); map.removeOverlays(Monessen); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Murrysville); map.removeOverlays(New_Kensington); map.removeOverlays(North_Huntingdon); map.removeOverlays(Scottdale); map.removeOverlays(United); map.removeOverlays(Vandergrift); map.removeOverlays(Youngstown); map.removeOverlays(Youngwood); 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(Monessen);map.removeOverlays(Acme); map.removeOverlays(Armbrust); map.removeOverlays(Belle_Vernon); map.removeOverlays(Bradenville); map.removeOverlays(Champion); map.removeOverlays(Delmont); map.removeOverlays(Derry); map.removeOverlays(Greensburg); map.removeOverlays(Herminie); map.removeOverlays(Hunker); map.removeOverlays(Irwin); map.removeOverlays(Jeannette); map.removeOverlays(Latrobe); map.removeOverlays(Ligonier); map.removeOverlays(Monessen); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Murrysville); map.removeOverlays(New_Kensington); map.removeOverlays(North_Huntingdon); map.removeOverlays(Scottdale); map.removeOverlays(United); map.removeOverlays(Vandergrift); map.removeOverlays(Youngstown); map.removeOverlays(Youngwood); map.addOverlays(Acme); centerByArray(Acme, false, false); cntMarker += Acme.length; map.addOverlays(Armbrust); centerByArray(Armbrust, false, false); cntMarker += Armbrust.length; map.addOverlays(Belle_Vernon); centerByArray(Belle_Vernon, false, false); cntMarker += Belle_Vernon.length; map.addOverlays(Bradenville); centerByArray(Bradenville, false, false); cntMarker += Bradenville.length; map.addOverlays(Champion); centerByArray(Champion, false, false); cntMarker += Champion.length; map.addOverlays(Delmont); centerByArray(Delmont, false, false); cntMarker += Delmont.length; map.addOverlays(Derry); centerByArray(Derry, false, false); cntMarker += Derry.length; map.addOverlays(Greensburg); centerByArray(Greensburg, false, false); cntMarker += Greensburg.length; map.addOverlays(Herminie); centerByArray(Herminie, false, false); cntMarker += Herminie.length; map.addOverlays(Hunker); centerByArray(Hunker, false, false); cntMarker += Hunker.length; map.addOverlays(Irwin); centerByArray(Irwin, false, false); cntMarker += Irwin.length; map.addOverlays(Jeannette); centerByArray(Jeannette, false, false); cntMarker += Jeannette.length; map.addOverlays(Latrobe); centerByArray(Latrobe, false, false); cntMarker += Latrobe.length; map.addOverlays(Ligonier); centerByArray(Ligonier, false, false); cntMarker += Ligonier.length; map.addOverlays(Monessen); centerByArray(Monessen, false, false); cntMarker += Monessen.length; map.addOverlays(Mount_Pleasant); centerByArray(Mount_Pleasant, false, false); cntMarker += Mount_Pleasant.length; map.addOverlays(Murrysville); centerByArray(Murrysville, false, false); cntMarker += Murrysville.length; map.addOverlays(New_Kensington); centerByArray(New_Kensington, false, false); cntMarker += New_Kensington.length; map.addOverlays(North_Huntingdon); centerByArray(North_Huntingdon, false, false); cntMarker += North_Huntingdon.length; map.addOverlays(Scottdale); centerByArray(Scottdale, false, false); cntMarker += Scottdale.length; map.addOverlays(United); centerByArray(United, false, false); cntMarker += United.length; map.addOverlays(Vandergrift); centerByArray(Vandergrift, false, false); cntMarker += Vandergrift.length; map.addOverlays(Youngstown); centerByArray(Youngstown, false, false); cntMarker += Youngstown.length; map.addOverlays(Youngwood); centerByArray(Youngwood, false, false); cntMarker += Youngwood.length; centerByArray(Monessen,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'); //window.open('/map.php?type=1&schools=&school_level=1&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; }