function addMarkers(){ mySelect = document.getElementById('selection'); Allentown = [];Kempton = [];Macungie = [];Bethlehem = [];Whitehall = [];Emmaus = [];Fountain_Hill = [];Orefield = [];Alburtis = [];Limeport = [];mySelect.options[mySelect.options.length] = new Option("Alburtis schools",'all=Alburtis'); mySelect.options[mySelect.options.length] = new Option("Allentown schools",'all=Allentown'); mySelect.options[mySelect.options.length] = new Option("Bethlehem schools",'all=Bethlehem'); mySelect.options[mySelect.options.length] = new Option("Emmaus schools",'all=Emmaus'); mySelect.options[mySelect.options.length] = new Option("Fountain Hill schools",'all=Fountain_Hill'); mySelect.options[mySelect.options.length] = new Option("Kempton schools",'all=Kempton'); mySelect.options[mySelect.options.length] = new Option("Limeport schools",'all=Limeport'); mySelect.options[mySelect.options.length] = new Option("Macungie schools",'all=Macungie'); mySelect.options[mySelect.options.length] = new Option("Orefield schools",'all=Orefield'); mySelect.options[mySelect.options.length] = new Option("Whitehall schools",'all=Whitehall'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Allentown[Allentown.length] = createMarker(new GPoint(-75.45746200,40.63667700),"
A Childrens Place Learning Center
719 Roble Road
Allentown, PA 18109
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Childrens Place Learning Center",'Allentown=' + Allentown.length); Kempton[Kempton.length] = createMarker(new GPoint(-75.73430000,40.65890000),"
Blue Mountain Christian Day School
8711 Kings Highway
Kempton, PA 19529
Co-ed school, 1-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blue Mountain Christian Day School",'Kempton=' + Kempton.length); Macungie[Macungie.length] = createMarker(new GPoint(-75.58606000,40.54845700),"
Cambridge Day Schools
6673 Stein Way
Macungie, PA 18062
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cambridge Day Schools",'Macungie=' + Macungie.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.49612000,40.59930100),"
Cathedral Of St Catherine Of Siena School
210 North 18th Street
Allentown, PA 18104
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cathedral Of St Catherine Of Siena School",'Allentown=' + Allentown.length); Bethlehem[Bethlehem.length] = createMarker(new GPoint(-75.42446700,40.65504600),"
Centennial School Lehigh Univ
2196 Avenue C
Bethlehem, PA 18017
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Centennial School Lehigh Univ",'Bethlehem=' + Bethlehem.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.47651800,40.57928900),"
Children First Community Academy
518 - 526 North Second Street
Allentown, PA 18103
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children First Community Academy",'Allentown=' + Allentown.length); Whitehall[Whitehall.length] = createMarker(new GPoint(-75.50268000,40.66510800),"
Christ The King School
3008 S Ruch Street
Whitehall, PA 18052
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The King School",'Whitehall=' + Whitehall.length); Bethlehem[Bethlehem.length] = createMarker(new GPoint(-75.42081200,40.63331900),"
Covenant Christian Academy
1414 Pennsylvania Ave
Bethlehem, PA 18018
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Covenant Christian Academy",'Bethlehem=' + Bethlehem.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.45731800,40.62722200),"
The Cuddle Zone Learning Center
445 Allentown Drive
Allentown, PA 18109
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Cuddle Zone Learning Center",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.52653200,40.58860700),"
Datzyk Montessori School
3300 Broadway
Allentown, PA 18104
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Datzyk Montessori School",'Allentown=' + Allentown.length); Bethlehem[Bethlehem.length] = createMarker(new GPoint(-75.37220000,40.65080000),"
Daycare In The Park
3045 Ave B Lvipl
Bethlehem, PA 18017
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Daycare In The Park",'Bethlehem=' + Bethlehem.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.44174600,40.64182200),"
Daycare In The Park
951 Marcon Blvd
Allentown, PA 18109
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Daycare In The Park",'Allentown=' + Allentown.length); Emmaus[Emmaus.length] = createMarker(new GPoint(-75.49270100,40.53862500),"
Discovery Preschool
225 North Street
Emmaus, PA 18049
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Discovery Preschool",'Emmaus=' + Emmaus.length); Emmaus[Emmaus.length] = createMarker(new GPoint(-75.52337500,40.52076500),"
Emmaus Baptist Academy
4702 Colebrook Avenue
Emmaus, PA 18049
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emmaus Baptist Academy",'Emmaus=' + Emmaus.length); Macungie[Macungie.length] = createMarker(new GPoint(-75.55929200,40.51755800),"
First Impressions Child Care Center
131 West Main Street
Macungie, PA 18062
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Impressions Child Care Center",'Macungie=' + Macungie.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.47487300,40.60283100),"
Grace Montessori School
814 W Linden Street
Allentown, PA 18101
Co-ed school, NS-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Montessori School",'Allentown=' + Allentown.length); Macungie[Macungie.length] = createMarker(new GPoint(-75.55240500,40.53437800),"
The Hillside School
2697 Brookside Rd
Macungie, PA 18062
Co-ed school, KG-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Hillside School",'Macungie=' + Macungie.length); Fountain_Hill[Fountain_Hill.length] = createMarker(new GPoint(-75.39788700,40.59993300),"
Holy Child School
1301 Sioux Street
Fountain Hill, PA 18015
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Child School",'Fountain_Hill=' + Fountain_Hill.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.46149000,40.61318200),"
Holy Spirit Elementary School
510 Ridge Avenue
Allentown, PA 18102
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Spirit Elementary School",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.50747600,40.60340600),"
Jewish Community Center of Allentown Kindergarten
702 N 22nd Street
Allentown, PA 18104
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jewish Community Center of Allentown Kindergarten",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.51362900,40.61074100),"
Jewish Day School
2313 Pennsylvania St
Allentown, PA 18104
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jewish Day School",'Allentown=' + Allentown.length); Orefield[Orefield.length] = createMarker(new GPoint(-75.61205900,40.64973200),"
Kids Peace
5300 Kidspeace Drive
Orefield, PA 18069
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Peace",'Orefield=' + Orefield.length); Bethlehem[Bethlehem.length] = createMarker(new GPoint(-75.40647000,40.59769600),"
Kids Peace Broadway School
1620 Broadway
Bethlehem, PA 18015
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Peace Broadway School",'Bethlehem=' + Bethlehem.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.46962900,40.61229500),"
Kids Peace National Centers W
401 Allen Street
Allentown, PA 18104
Co-ed school, 8-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Peace National Centers W",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.51898100,40.57056000),"
Lehigh Christian Academy
1151 S Cedar Crest Blvd
Allentown, PA 18103
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lehigh Christian Academy",'Allentown=' + Allentown.length); Whitehall[Whitehall.length] = createMarker(new GPoint(-75.48143600,40.71815400),"
Lehigh Valley Lutheran School
3355 Macarthur Road
Whitehall, PA 18052
Co-ed school, K-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lehigh Valley Lutheran School",'Whitehall=' + Whitehall.length); Whitehall[Whitehall.length] = createMarker(new GPoint(-75.51711300,40.64878600),"
Lehigh Valley Sda School
3950 Mechanicsville Road
Whitehall, PA 18052
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lehigh Valley Sda School",'Whitehall=' + Whitehall.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.43556000,40.62316000),"
Life Academy
855 North Maxwell Street
Allentown, PA 18109
Co-ed school, K-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Academy",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.53261400,40.61237200),"
Lifespan
1503 N. Cedar Crest Blvd.
Allentown, PA 18204
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lifespan",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.53261400,40.61237200),"
Lifespan Day Care Center
1503 N Cedar Crest Blvd
Allentown, PA 18104
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lifespan Day Care Center",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.61486800,40.56772300),"
Little People Country Club
357 S Route 100
Allentown, PA 18106
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little People Country Club",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.47288000,40.56998700),"
Little People Day Care School
2310 S 12 St
Allentown, PA 18103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little People Day Care School",'Allentown=' + Allentown.length); Whitehall[Whitehall.length] = createMarker(new GPoint(-75.49363700,40.61806200),"
Little People Day Care School
1325 Fairmont Street
Whitehall, PA 18052
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little People Day Care School",'Whitehall=' + Whitehall.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.42921800,40.63233100),"
Little People East
1320 Sherman Street
Allentown, PA 18109
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little People East",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.50198400,40.60673600),"
The Lutheran Academy
802 N 19th Street
Allentown, PA 18104
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Lutheran Academy",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.49404400,40.59997400),"
Magic Years
224 N 17th Street
Allentown, PA 18104
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Magic Years",'Allentown=' + Allentown.length); Alburtis[Alburtis.length] = createMarker(new GPoint(-75.59792300,40.51377300),"
Magic Years Cc And Learning Center
135 Quarry Road
Alburtis, PA 18011
Co-ed school, KG-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Magic Years Cc And Learning Center",'Alburtis=' + Alburtis.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.45734400,40.59241900),"
Mercy Special Learning Center
830 South Woodward St
Allentown, PA 18103
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mercy Special Learning Center",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.44096500,40.61705700),"
Our Lady Help Of Christians School
934 Hanover Avenue
Allentown, PA 18109
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Help Of Christians School",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.51464700,40.57527400),"
Perlis Montessori School
1035 Flexer Avenue
Allentown, PA 18103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Perlis Montessori School",'Allentown=' + Allentown.length); Emmaus[Emmaus.length] = createMarker(new GPoint(-75.51699700,40.52592900),"
Premier Child Care Center Inc
3853 Allen Street
Emmaus, PA 18049
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Premier Child Care Center Inc",'Emmaus=' + Emmaus.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.46770200,40.60911800),"
Sacred Heart School
325 N 4th Street
Allentown, PA 18102
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart School",'Allentown=' + Allentown.length); Whitehall[Whitehall.length] = createMarker(new GPoint(-75.47153900,40.62949600),"
Saint Elizabeth Regional School
433 Pershing Blvd
Whitehall, PA 18052
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Elizabeth Regional School",'Whitehall=' + Whitehall.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.48485700,40.61145200),"
St. Francis Of Assisi School
1035 W Washington Street
Allentown, PA 18102
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Francis Of Assisi School",'Allentown=' + Allentown.length); Orefield[Orefield.length] = createMarker(new GPoint(-75.59075600,40.60747600),"
St. Joseph The Worker School
1858 Applewood Drive
Orefield, PA 18069
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph The Worker School",'Orefield=' + Orefield.length); Macungie[Macungie.length] = createMarker(new GPoint(-75.57465700,40.47524600),"
Salem Christian School
8031 Salem Bible Church Road
Macungie, PA 18062
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Salem Christian School",'Macungie=' + Macungie.length); Bethlehem[Bethlehem.length] = createMarker(new GPoint(-75.39262700,40.62263700),"
Ss Simon & Jude Elementary School
714 W Broad Street
Bethlehem, PA 18018
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ss Simon & Jude Elementary School",'Bethlehem=' + Bethlehem.length); Emmaus[Emmaus.length] = createMarker(new GPoint(-75.49206900,40.52841800),"
St Ann Elementary School
435 S 6th Street
Emmaus, PA 18049
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Ann Elementary School",'Emmaus=' + Emmaus.length); Limeport[Limeport.length] = createMarker(new GPoint(-75.44750000,40.50880000),"
St Michael The Archangel School
Po Box 188 5040 St Josephs Road
Limeport, PA 18060
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Michael The Archangel School",'Limeport=' + Limeport.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.45605900,40.59060700),"
St Paul School
219 W Susquehanna Street
Allentown, PA 18103
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Paul School",'Allentown=' + Allentown.length); Whitehall[Whitehall.length] = createMarker(new GPoint(-75.50899300,40.64833200),"
St Stephens School
3900 Mechanicsville Road
Whitehall, PA 18052
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Stephens School",'Whitehall=' + Whitehall.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.51504000,40.57529800),"
St Thomas More School
1040 Flexer Avenue
Allentown, PA 18103
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Thomas More School",'Allentown=' + Allentown.length); Allentown[Allentown.length] = createMarker(new GPoint(-75.50268000,40.57956300),"
Swain School
1100 S 24th St
Allentown, PA 18103
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Swain School",'Allentown=' + Allentown.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(Alburtis); map.removeOverlays(Allentown); map.removeOverlays(Bethlehem); map.removeOverlays(Emmaus); map.removeOverlays(Fountain_Hill); map.removeOverlays(Kempton); map.removeOverlays(Limeport); map.removeOverlays(Macungie); map.removeOverlays(Orefield); map.removeOverlays(Whitehall); 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(Allentown);map.removeOverlays(Alburtis); map.removeOverlays(Allentown); map.removeOverlays(Bethlehem); map.removeOverlays(Emmaus); map.removeOverlays(Fountain_Hill); map.removeOverlays(Kempton); map.removeOverlays(Limeport); map.removeOverlays(Macungie); map.removeOverlays(Orefield); map.removeOverlays(Whitehall); map.addOverlays(Alburtis); centerByArray(Alburtis, false, false); cntMarker += Alburtis.length; map.addOverlays(Allentown); centerByArray(Allentown, false, false); cntMarker += Allentown.length; map.addOverlays(Bethlehem); centerByArray(Bethlehem, false, false); cntMarker += Bethlehem.length; map.addOverlays(Emmaus); centerByArray(Emmaus, false, false); cntMarker += Emmaus.length; map.addOverlays(Fountain_Hill); centerByArray(Fountain_Hill, false, false); cntMarker += Fountain_Hill.length; map.addOverlays(Kempton); centerByArray(Kempton, false, false); cntMarker += Kempton.length; map.addOverlays(Limeport); centerByArray(Limeport, false, false); cntMarker += Limeport.length; map.addOverlays(Macungie); centerByArray(Macungie, false, false); cntMarker += Macungie.length; map.addOverlays(Orefield); centerByArray(Orefield, false, false); cntMarker += Orefield.length; map.addOverlays(Whitehall); centerByArray(Whitehall, false, false); cntMarker += Whitehall.length; centerByArray(Allentown,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; }