function addMarkers(){ mySelect = document.getElementById('selection'); Sybertsville = [];Mountain_Top = [];Sweet_Valley = [];Dallas = [];Plymouth = [];Wilkes_Barre = [];Hazleton = [];Duryea = [];Pittston = [];Hanover_Township = [];Kingston = [];Nanticoke = [];Shickshinny = [];Plains = [];Wyoming = [];Freeland = [];Hunlock_Creek = [];Swoyersville = [];Forty_Fort = [];Luzerne = [];Dupont = [];Avoca = [];West_Hazleton = [];Exeter = [];mySelect.options[mySelect.options.length] = new Option("Avoca schools",'all=Avoca'); mySelect.options[mySelect.options.length] = new Option("Dallas schools",'all=Dallas'); mySelect.options[mySelect.options.length] = new Option("Dupont schools",'all=Dupont'); mySelect.options[mySelect.options.length] = new Option("Duryea schools",'all=Duryea'); mySelect.options[mySelect.options.length] = new Option("Exeter schools",'all=Exeter'); mySelect.options[mySelect.options.length] = new Option("Forty Fort schools",'all=Forty_Fort'); mySelect.options[mySelect.options.length] = new Option("Freeland schools",'all=Freeland'); mySelect.options[mySelect.options.length] = new Option("Hanover Township schools",'all=Hanover_Township'); mySelect.options[mySelect.options.length] = new Option("Hazleton schools",'all=Hazleton'); mySelect.options[mySelect.options.length] = new Option("Hunlock Creek schools",'all=Hunlock_Creek'); mySelect.options[mySelect.options.length] = new Option("Kingston schools",'all=Kingston'); mySelect.options[mySelect.options.length] = new Option("Luzerne schools",'all=Luzerne'); mySelect.options[mySelect.options.length] = new Option("Mountain Top schools",'all=Mountain_Top'); mySelect.options[mySelect.options.length] = new Option("Nanticoke schools",'all=Nanticoke'); mySelect.options[mySelect.options.length] = new Option("Pittston schools",'all=Pittston'); mySelect.options[mySelect.options.length] = new Option("Plains schools",'all=Plains'); mySelect.options[mySelect.options.length] = new Option("Plymouth schools",'all=Plymouth'); mySelect.options[mySelect.options.length] = new Option("Shickshinny schools",'all=Shickshinny'); mySelect.options[mySelect.options.length] = new Option("Sweet Valley schools",'all=Sweet_Valley'); mySelect.options[mySelect.options.length] = new Option("Swoyersville schools",'all=Swoyersville'); mySelect.options[mySelect.options.length] = new Option("Sybertsville schools",'all=Sybertsville'); mySelect.options[mySelect.options.length] = new Option("West Hazleton schools",'all=West_Hazleton'); mySelect.options[mySelect.options.length] = new Option("Wilkes Barre schools",'all=Wilkes_Barre'); mySelect.options[mySelect.options.length] = new Option("Wyoming schools",'all=Wyoming'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Sybertsville[Sybertsville.length] = createMarker(new GPoint(-76.07660000,41.00130000),"
Anne Mclaughlin's Child Care
Po Box 44
Sybertsville, PA 18251
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Anne Mclaughlin's Child Care",'Sybertsville=' + Sybertsville.length); Mountain_Top[Mountain_Top.length] = createMarker(new GPoint(-75.93750000,41.13250000),"
The Childrens Ark
175 S Main Rd Po Box 300
Mountain Top, PA 18707
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Childrens Ark",'Mountain_Top=' + Mountain_Top.length); Sweet_Valley[Sweet_Valley.length] = createMarker(new GPoint(-76.14187700,41.28440300),"
The Christian Academy Of Commu
5390 Main Rd.
Sweet Valley, PA 18656
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Christian Academy Of Commu",'Sweet_Valley=' + Sweet_Valley.length); Sweet_Valley[Sweet_Valley.length] = createMarker(new GPoint(-76.14193200,41.28439400),"
The Christian Of Community Bible Church
5390 Main Road
Sweet Valley, PA 18656
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Christian Of Community Bible Church",'Sweet_Valley=' + Sweet_Valley.length); Dallas[Dallas.length] = createMarker(new GPoint(-75.96281600,41.33280000),"
Dallas Little People Day Care School Inc.
96 Huntsville Road
Dallas, PA 18612
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dallas Little People Day Care School Inc.",'Dallas=' + Dallas.length); Plymouth[Plymouth.length] = createMarker(new GPoint(-75.95200000,41.24310000),"
Ebenezer Faith Christian School
39 Gaylord Ave Po Box 99
Plymouth, PA 18651
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ebenezer Faith Christian School",'Plymouth=' + Plymouth.length); Dallas[Dallas.length] = createMarker(new GPoint(-75.96504000,41.33525600),"
Gate Of Heaven School
40 Machell Avenue
Dallas, PA 18612
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gate Of Heaven School",'Dallas=' + Dallas.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.89222700,41.23516300),"
Genesis School
149 Dana St
Wilkes Barre, PA 18702
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Genesis School",'Wilkes_Barre=' + Wilkes_Barre.length); Hazleton[Hazleton.length] = createMarker(new GPoint(-75.97582700,40.95739500),"
Hazleton Trinity Nursery & Kindergarten School
100 N Church Street
Hazleton, PA 18201
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hazleton Trinity Nursery & Kindergarten School",'Hazleton=' + Hazleton.length); Duryea[Duryea.length] = createMarker(new GPoint(-75.76487800,41.35279300),"
Holy Rosary Elementary School
125 Stephenson Street
Duryea, PA 18642
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Rosary Elementary School",'Duryea=' + Duryea.length); Hazleton[Hazleton.length] = createMarker(new GPoint(-75.96732400,40.96365800),"
Holy Spirit Academy-hazleton Catholic School
225 E 4th Street
Hazleton, PA 18201
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Spirit Academy-hazleton Catholic School",'Hazleton=' + Hazleton.length); Hazleton[Hazleton.length] = createMarker(new GPoint(-75.97639600,40.95568000),"
Holy Trinity School
35 N Church St
Hazleton, PA 18201
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Trinity School",'Hazleton=' + Hazleton.length); Pittston[Pittston.length] = createMarker(new GPoint(-75.77977100,41.33545300),"
Humpty Dumpty Kollege
107 New Street
Pittston, PA 18640
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Humpty Dumpty Kollege",'Pittston=' + Pittston.length); Dallas[Dallas.length] = createMarker(new GPoint(-75.97540000,41.35420000),"
Im Big Now Learning Center
Rr 5 Box 132 N Memorial Hy
Dallas, PA 18612
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Im Big Now Learning Center",'Dallas=' + Dallas.length); Hazleton[Hazleton.length] = createMarker(new GPoint(-75.98089800,40.96542400),"
Immanuel Christian School
725 N Locust Street
Hazleton, PA 18201
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immanuel Christian School",'Hazleton=' + Hazleton.length); Hanover_Township[Hanover_Township.length] = createMarker(new GPoint(-75.92375700,41.22651700),"
Its A Small World Day Care School
95 W Saint Marys Road
Hanover Township, PA 18706
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Its A Small World Day Care School",'Hanover_Township=' + Hanover_Township.length); Kingston[Kingston.length] = createMarker(new GPoint(-75.88294900,41.27059300),"
Jenny Lynn Ferraro Academy
131 E Vaughn Street
Kingston, PA 18704
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jenny Lynn Ferraro Academy",'Kingston=' + Kingston.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.84350000,41.28700000),"
Kings Kids Christian School
489 N Main St
Wilkes Barre, PA 18702
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kings Kids Christian School",'Wilkes_Barre=' + Wilkes_Barre.length); Nanticoke[Nanticoke.length] = createMarker(new GPoint(-76.01191500,41.19260400),"
The Learning Station
133 Alden Road
Nanticoke, PA 18634
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Learning Station",'Nanticoke=' + Nanticoke.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.91035900,41.23922000),"
Little People Day Care School
280 Hanover Street
Wilkes Barre, PA 18702
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little People Day Care School",'Wilkes_Barre=' + Wilkes_Barre.length); Kingston[Kingston.length] = createMarker(new GPoint(-75.88554100,41.25671500),"
Little People Day Care School
154 3rd Avenue
Kingston, PA 18704
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little People Day Care School",'Kingston=' + Kingston.length); Shickshinny[Shickshinny.length] = createMarker(new GPoint(-76.24039100,41.21565400),"
Living Word Baptist Academy
1170 Hunlock Harveyville Road
Shickshinny, PA 18655
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Living Word Baptist Academy",'Shickshinny=' + Shickshinny.length); Plains[Plains.length] = createMarker(new GPoint(-75.82309200,41.26613700),"
Magic Years
532 E Main St
Plains, PA 18702
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Magic Years",'Plains=' + Plains.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.93412100,41.21169200),"
Magic Years
1810 S Main St
Wilkes Barre, PA 18702
Co-ed school, KG-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Magic Years",'Wilkes_Barre=' + Wilkes_Barre.length); Wyoming[Wyoming.length] = createMarker(new GPoint(-75.85709200,41.29991500),"
Mba Academy
1150 Wyoming Ave.
Wyoming, PA 18644
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mba Academy",'Wyoming=' + Wyoming.length); Wyoming[Wyoming.length] = createMarker(new GPoint(-75.85576300,41.30031300),"
Milestones Achievement Center
1150 Wyoming Avenue
Wyoming, PA 18644
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Milestones Achievement Center",'Wyoming=' + Wyoming.length); Freeland[Freeland.length] = createMarker(new GPoint(-75.89738200,41.01288600),"
MMI Preparatory School
154 Centre Street
Freeland, PA 18224
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("MMI Preparatory School",'Freeland=' + Freeland.length); Hunlock_Creek[Hunlock_Creek.length] = createMarker(new GPoint(-76.17407800,41.23429700),"
Muhlinburg Christian Academy
362 Hunlock-harveyville Rd
Hunlock Creek, PA 18621
Co-ed school, -
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Muhlinburg Christian Academy",'Hunlock_Creek=' + Hunlock_Creek.length); Nanticoke[Nanticoke.length] = createMarker(new GPoint(-76.00442800,41.19882500),"
Pope John Paul Ii Catholic School
518 South Hanover Street
Nanticoke, PA 18634
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pope John Paul Ii Catholic School",'Nanticoke=' + Nanticoke.length); Swoyersville[Swoyersville.length] = createMarker(new GPoint(-75.86909000,41.29616800),"
Regis Academy
112 Hughes St
Swoyersville, PA 18704
Co-ed school, 6-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Regis Academy",'Swoyersville=' + Swoyersville.length); Forty_Fort[Forty_Fort.length] = createMarker(new GPoint(-75.87614400,41.28164100),"
Regis Elementary School
1133 Wyoming Avenue
Forty Fort, PA 18704
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Regis Elementary School",'Forty_Fort=' + Forty_Fort.length); Luzerne[Luzerne.length] = createMarker(new GPoint(-75.88922500,41.28405600),"
Sacred Heart Elementary School
469 Miller Street
Luzerne, PA 18709
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Elementary School",'Luzerne=' + Luzerne.length); Dupont[Dupont.length] = createMarker(new GPoint(-75.74307000,41.32374900),"
Sacred Heart Of Jesus School
219 Lackawanna Avenue
Dupont, PA 18641
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Of Jesus School",'Dupont=' + Dupont.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.86437200,41.25720100),"
Sacred Heart School
607 N Main St
Wilkes Barre, PA 18705
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart School",'Wilkes_Barre=' + Wilkes_Barre.length); Kingston[Kingston.length] = createMarker(new GPoint(-75.90104100,41.26849900),"
St. Hedwig Elementary School
207 Zerbey Avenue
Kingston, PA 18704
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Hedwig Elementary School",'Kingston=' + Kingston.length); Pittston[Pittston.length] = createMarker(new GPoint(-75.78955000,41.32340200),"
St. John The Baptist School
12 William Street
Pittston, PA 18640
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John The Baptist School",'Pittston=' + Pittston.length); Mountain_Top[Mountain_Top.length] = createMarker(new GPoint(-75.90979300,41.12002300),"
St. Jude School
422 S Mountain Blvd
Mountain Top, PA 18707
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Jude School",'Mountain_Top=' + Mountain_Top.length); Avoca[Avoca.length] = createMarker(new GPoint(-75.74198000,41.33939100),"
St. Marys School
742 Spring St
Avoca, PA 18641
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Marys School",'Avoca=' + Avoca.length); Mountain_Top[Mountain_Top.length] = createMarker(new GPoint(-75.88146600,41.16694200),"
Shining Stars
75 N Mountain Blvd
Mountain Top, PA 18707
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shining Stars",'Mountain_Top=' + Mountain_Top.length); Plains[Plains.length] = createMarker(new GPoint(-75.84321500,41.27375500),"
Ss Peter & Paul School
25 Hudson Road
Plains, PA 18705
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ss Peter & Paul School",'Plains=' + Plains.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.91235500,41.23272600),"
St Aloysius' School
321 Barney Street
Wilkes Barre, PA 18706
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Aloysius' School",'Wilkes_Barre=' + Wilkes_Barre.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.89837900,41.22948800),"
St Boniface School
221 Blackman Street
Wilkes Barre, PA 18702
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Boniface School",'Wilkes_Barre=' + Wilkes_Barre.length); Hazleton[Hazleton.length] = createMarker(new GPoint(-75.97326600,40.96316600),"
St Joseph Memorial School-hazleton Catholic School
601 N Laurel Street
Hazleton, PA 18201
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph Memorial School-hazleton Catholic School",'Hazleton=' + Hazleton.length); Pittston[Pittston.length] = createMarker(new GPoint(-75.78694100,41.32505600),"
St Mary Assumption School
41 Carroll Street
Pittston, PA 18640
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mary Assumption School",'Pittston=' + Pittston.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.88765200,41.24065300),"
St Nicholas-st. Mary's
242 S Washington Street
Wilkes Barre, PA 18701
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Nicholas-st. Mary's",'Wilkes_Barre=' + Wilkes_Barre.length); West_Hazleton[West_Hazleton.length] = createMarker(new GPoint(-75.97695100,40.95615800),"
Transfiguration School
217 West Green Street
West Hazleton, PA 18202
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Transfiguration School",'West_Hazleton=' + West_Hazleton.length); Kingston[Kingston.length] = createMarker(new GPoint(-75.88555100,41.25704300),"
United Hebrew Institute
1 Institute Lane
Kingston, PA 18704
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("United Hebrew Institute",'Kingston=' + Kingston.length); Wilkes_Barre[Wilkes_Barre.length] = createMarker(new GPoint(-75.86354700,41.24092400),"
Wilkes-barre Academy
20 Stevens Road
Wilkes Barre, PA 18702
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wilkes-barre Academy",'Wilkes_Barre=' + Wilkes_Barre.length); Exeter[Exeter.length] = createMarker(new GPoint(-75.82467400,41.31772800),"
Wyoming Area Catholic School
1690 Wyoming Avenue
Exeter, PA 18643
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wyoming Area Catholic School",'Exeter=' + Exeter.length); Forty_Fort[Forty_Fort.length] = createMarker(new GPoint(-75.86790500,41.29174100),"
Wyoming Seminary Lower School
1560 Wyoming Avenue
Forty Fort, PA 18704
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wyoming Seminary Lower School",'Forty_Fort=' + Forty_Fort.length); Kingston[Kingston.length] = createMarker(new GPoint(-75.89990500,41.26483600),"
Wyoming Valley Montessori School
851 W Market Street
Kingston, PA 18704
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wyoming Valley Montessori School",'Kingston=' + Kingston.length); Mountain_Top[Mountain_Top.length] = createMarker(new GPoint(-75.95629900,41.15097900),"
Wyoming Valley Sda Elementary School
476 3rd Street
Mountain Top, PA 18707
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wyoming Valley Sda Elementary School",'Mountain_Top=' + Mountain_Top.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(Avoca); map.removeOverlays(Dallas); map.removeOverlays(Dupont); map.removeOverlays(Duryea); map.removeOverlays(Exeter); map.removeOverlays(Forty_Fort); map.removeOverlays(Freeland); map.removeOverlays(Hanover_Township); map.removeOverlays(Hazleton); map.removeOverlays(Hunlock_Creek); map.removeOverlays(Kingston); map.removeOverlays(Luzerne); map.removeOverlays(Mountain_Top); map.removeOverlays(Nanticoke); map.removeOverlays(Pittston); map.removeOverlays(Plains); map.removeOverlays(Plymouth); map.removeOverlays(Shickshinny); map.removeOverlays(Sweet_Valley); map.removeOverlays(Swoyersville); map.removeOverlays(Sybertsville); map.removeOverlays(West_Hazleton); map.removeOverlays(Wilkes_Barre); map.removeOverlays(Wyoming); 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(Sybertsville);map.removeOverlays(Avoca); map.removeOverlays(Dallas); map.removeOverlays(Dupont); map.removeOverlays(Duryea); map.removeOverlays(Exeter); map.removeOverlays(Forty_Fort); map.removeOverlays(Freeland); map.removeOverlays(Hanover_Township); map.removeOverlays(Hazleton); map.removeOverlays(Hunlock_Creek); map.removeOverlays(Kingston); map.removeOverlays(Luzerne); map.removeOverlays(Mountain_Top); map.removeOverlays(Nanticoke); map.removeOverlays(Pittston); map.removeOverlays(Plains); map.removeOverlays(Plymouth); map.removeOverlays(Shickshinny); map.removeOverlays(Sweet_Valley); map.removeOverlays(Swoyersville); map.removeOverlays(Sybertsville); map.removeOverlays(West_Hazleton); map.removeOverlays(Wilkes_Barre); map.removeOverlays(Wyoming); map.addOverlays(Avoca); centerByArray(Avoca, false, false); cntMarker += Avoca.length; map.addOverlays(Dallas); centerByArray(Dallas, false, false); cntMarker += Dallas.length; map.addOverlays(Dupont); centerByArray(Dupont, false, false); cntMarker += Dupont.length; map.addOverlays(Duryea); centerByArray(Duryea, false, false); cntMarker += Duryea.length; map.addOverlays(Exeter); centerByArray(Exeter, false, false); cntMarker += Exeter.length; map.addOverlays(Forty_Fort); centerByArray(Forty_Fort, false, false); cntMarker += Forty_Fort.length; map.addOverlays(Freeland); centerByArray(Freeland, false, false); cntMarker += Freeland.length; map.addOverlays(Hanover_Township); centerByArray(Hanover_Township, false, false); cntMarker += Hanover_Township.length; map.addOverlays(Hazleton); centerByArray(Hazleton, false, false); cntMarker += Hazleton.length; map.addOverlays(Hunlock_Creek); centerByArray(Hunlock_Creek, false, false); cntMarker += Hunlock_Creek.length; map.addOverlays(Kingston); centerByArray(Kingston, false, false); cntMarker += Kingston.length; map.addOverlays(Luzerne); centerByArray(Luzerne, false, false); cntMarker += Luzerne.length; map.addOverlays(Mountain_Top); centerByArray(Mountain_Top, false, false); cntMarker += Mountain_Top.length; map.addOverlays(Nanticoke); centerByArray(Nanticoke, false, false); cntMarker += Nanticoke.length; map.addOverlays(Pittston); centerByArray(Pittston, false, false); cntMarker += Pittston.length; map.addOverlays(Plains); centerByArray(Plains, false, false); cntMarker += Plains.length; map.addOverlays(Plymouth); centerByArray(Plymouth, false, false); cntMarker += Plymouth.length; map.addOverlays(Shickshinny); centerByArray(Shickshinny, false, false); cntMarker += Shickshinny.length; map.addOverlays(Sweet_Valley); centerByArray(Sweet_Valley, false, false); cntMarker += Sweet_Valley.length; map.addOverlays(Swoyersville); centerByArray(Swoyersville, false, false); cntMarker += Swoyersville.length; map.addOverlays(Sybertsville); centerByArray(Sybertsville, false, false); cntMarker += Sybertsville.length; map.addOverlays(West_Hazleton); centerByArray(West_Hazleton, false, false); cntMarker += West_Hazleton.length; map.addOverlays(Wilkes_Barre); centerByArray(Wilkes_Barre, false, false); cntMarker += Wilkes_Barre.length; map.addOverlays(Wyoming); centerByArray(Wyoming, false, false); cntMarker += Wyoming.length; centerByArray(Sybertsville,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; }