function addMarkers()
{
mySelect = document.getElementById('selection');
Abington = [];Bryn_Mawr = [];Bala_Cynwyd = [];Norristown = [];Collegeville = [];Audubon = [];Pottstown = [];Hatboro = [];Blue_Bell = [];Gilbertsville = [];Bridgeport = [];Lansdale = [];Royersford = [];King_Of_Prussia = [];Wyncote = [];Plymouth_Meeting = [];Cheltenham = [];Conshohocken = [];Glenside = [];Souderton = [];Eagleville = [];Willow_Grove = [];Elkins_Park = [];Fort_Washington = [];Harleysville = [];Gladwyne = [];North_Wales = [];Horsham = [];Rosemont = [];Hatfield = [];Dresher = [];Jenkintown = [];Ambler = [];Ardmore = [];Huntingdon_Valley = [];Maple_Glen = [];Green_Lane = [];Merion_Station = [];Melrose_Park = [];Frederick = [];Oaks = [];Narberth = [];Wynnewood = [];Zieglerville = [];Trappe = [];Wayne = [];Roslyn = [];Schwenksville = [];Oreland = [];Flourtown = [];Erdenheim = [];Pennsburg = [];East_Greenville = [];Telford = [];Stowe = [];Limerick = [];Lafayette_Hill = [];mySelect.options[mySelect.options.length] = new Option("Abington schools",'all=Abington');
mySelect.options[mySelect.options.length] = new Option("Ambler schools",'all=Ambler');
mySelect.options[mySelect.options.length] = new Option("Ardmore schools",'all=Ardmore');
mySelect.options[mySelect.options.length] = new Option("Audubon schools",'all=Audubon');
mySelect.options[mySelect.options.length] = new Option("Bala Cynwyd schools",'all=Bala_Cynwyd');
mySelect.options[mySelect.options.length] = new Option("Blue Bell schools",'all=Blue_Bell');
mySelect.options[mySelect.options.length] = new Option("Bridgeport schools",'all=Bridgeport');
mySelect.options[mySelect.options.length] = new Option("Bryn Mawr schools",'all=Bryn_Mawr');
mySelect.options[mySelect.options.length] = new Option("Cheltenham schools",'all=Cheltenham');
mySelect.options[mySelect.options.length] = new Option("Collegeville schools",'all=Collegeville');
mySelect.options[mySelect.options.length] = new Option("Conshohocken schools",'all=Conshohocken');
mySelect.options[mySelect.options.length] = new Option("Dresher schools",'all=Dresher');
mySelect.options[mySelect.options.length] = new Option("Eagleville schools",'all=Eagleville');
mySelect.options[mySelect.options.length] = new Option("East Greenville schools",'all=East_Greenville');
mySelect.options[mySelect.options.length] = new Option("Elkins Park schools",'all=Elkins_Park');
mySelect.options[mySelect.options.length] = new Option("Erdenheim schools",'all=Erdenheim');
mySelect.options[mySelect.options.length] = new Option("Flourtown schools",'all=Flourtown');
mySelect.options[mySelect.options.length] = new Option("Fort Washington schools",'all=Fort_Washington');
mySelect.options[mySelect.options.length] = new Option("Frederick schools",'all=Frederick');
mySelect.options[mySelect.options.length] = new Option("Gilbertsville schools",'all=Gilbertsville');
mySelect.options[mySelect.options.length] = new Option("Gladwyne schools",'all=Gladwyne');
mySelect.options[mySelect.options.length] = new Option("Glenside schools",'all=Glenside');
mySelect.options[mySelect.options.length] = new Option("Green Lane schools",'all=Green_Lane');
mySelect.options[mySelect.options.length] = new Option("Harleysville schools",'all=Harleysville');
mySelect.options[mySelect.options.length] = new Option("Hatboro schools",'all=Hatboro');
mySelect.options[mySelect.options.length] = new Option("Hatfield schools",'all=Hatfield');
mySelect.options[mySelect.options.length] = new Option("Horsham schools",'all=Horsham');
mySelect.options[mySelect.options.length] = new Option("Huntingdon Valley schools",'all=Huntingdon_Valley');
mySelect.options[mySelect.options.length] = new Option("Jenkintown schools",'all=Jenkintown');
mySelect.options[mySelect.options.length] = new Option("King Of Prussia schools",'all=King_Of_Prussia');
mySelect.options[mySelect.options.length] = new Option("Lafayette Hill schools",'all=Lafayette_Hill');
mySelect.options[mySelect.options.length] = new Option("Lansdale schools",'all=Lansdale');
mySelect.options[mySelect.options.length] = new Option("Limerick schools",'all=Limerick');
mySelect.options[mySelect.options.length] = new Option("Maple Glen schools",'all=Maple_Glen');
mySelect.options[mySelect.options.length] = new Option("Melrose Park schools",'all=Melrose_Park');
mySelect.options[mySelect.options.length] = new Option("Merion Station schools",'all=Merion_Station');
mySelect.options[mySelect.options.length] = new Option("Narberth schools",'all=Narberth');
mySelect.options[mySelect.options.length] = new Option("Norristown schools",'all=Norristown');
mySelect.options[mySelect.options.length] = new Option("North Wales schools",'all=North_Wales');
mySelect.options[mySelect.options.length] = new Option("Oaks schools",'all=Oaks');
mySelect.options[mySelect.options.length] = new Option("Oreland schools",'all=Oreland');
mySelect.options[mySelect.options.length] = new Option("Pennsburg schools",'all=Pennsburg');
mySelect.options[mySelect.options.length] = new Option("Plymouth Meeting schools",'all=Plymouth_Meeting');
mySelect.options[mySelect.options.length] = new Option("Pottstown schools",'all=Pottstown');
mySelect.options[mySelect.options.length] = new Option("Rosemont schools",'all=Rosemont');
mySelect.options[mySelect.options.length] = new Option("Roslyn schools",'all=Roslyn');
mySelect.options[mySelect.options.length] = new Option("Royersford schools",'all=Royersford');
mySelect.options[mySelect.options.length] = new Option("Schwenksville schools",'all=Schwenksville');
mySelect.options[mySelect.options.length] = new Option("Souderton schools",'all=Souderton');
mySelect.options[mySelect.options.length] = new Option("Stowe schools",'all=Stowe');
mySelect.options[mySelect.options.length] = new Option("Telford schools",'all=Telford');
mySelect.options[mySelect.options.length] = new Option("Trappe schools",'all=Trappe');
mySelect.options[mySelect.options.length] = new Option("Wayne schools",'all=Wayne');
mySelect.options[mySelect.options.length] = new Option("Willow Grove schools",'all=Willow_Grove');
mySelect.options[mySelect.options.length] = new Option("Wyncote schools",'all=Wyncote');
mySelect.options[mySelect.options.length] = new Option("Wynnewood schools",'all=Wynnewood');
mySelect.options[mySelect.options.length] = new Option("Zieglerville schools",'all=Zieglerville');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Abington[Abington.length] = createMarker(new GPoint(-75.12143100,40.11515900),"
",iconBl);
mySelect.options[mySelect.options.length] = new Option("Abington Jhs",'Abington=' + Abington.length);
Abington[Abington.length] = createMarker(new GPoint(-75.12716675,40.11753082),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Abington Junior High School",'Abington=' + Abington.length);
Abington[Abington.length] = createMarker(new GPoint(-75.12995148,40.11119080),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Abington Senior High School",'Abington=' + Abington.length);
Bryn_Mawr[Bryn_Mawr.length] = createMarker(new GPoint(-75.32333200,40.02392800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Achievement House Charter School",'Bryn_Mawr=' + Bryn_Mawr.length);
Bala_Cynwyd[Bala_Cynwyd.length] = createMarker(new GPoint(-75.24012800,40.00406600),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ad Prima Charter School",'Bala_Cynwyd=' + Bala_Cynwyd.length);
Bala_Cynwyd[Bala_Cynwyd.length] = createMarker(new GPoint(-75.24012800,40.00406600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Agora Cyber Charter School",'Bala_Cynwyd=' + Bala_Cynwyd.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.42810059,40.14888000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Arcola Intrmd School",'Norristown=' + Norristown.length);
Collegeville[Collegeville.length] = createMarker(new GPoint(-75.45184326,40.16233444),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Arrowhead Elementary School",'Collegeville=' + Collegeville.length);
Audubon[Audubon.length] = createMarker(new GPoint(-75.42533875,40.12914276),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Audubon Elementary School",'Audubon=' + Audubon.length);
Bala_Cynwyd[Bala_Cynwyd.length] = createMarker(new GPoint(-75.24161530,40.01292801),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bala-cynwyd Middle School",'Bala_Cynwyd=' + Bala_Cynwyd.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.67185974,40.25226212),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Barth Elementary School",'Pottstown=' + Pottstown.length);
Bala_Cynwyd[Bala_Cynwyd.length] = createMarker(new GPoint(-75.23603821,40.02352905),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Belmont Hills Elementary School",'Bala_Cynwyd=' + Bala_Cynwyd.length);
Hatboro[Hatboro.length] = createMarker(new GPoint(-75.11487579,40.18794250),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blair Mill Elementary School",'Hatboro=' + Hatboro.length);
Blue_Bell[Blue_Bell.length] = createMarker(new GPoint(-75.27069855,40.15675354),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blue Bell Elementary School",'Blue_Bell=' + Blue_Bell.length);
Gilbertsville[Gilbertsville.length] = createMarker(new GPoint(-75.57505798,40.31649780),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Boyertown Area Junior High School - East",'Gilbertsville=' + Gilbertsville.length);
Bridgeport[Bridgeport.length] = createMarker(new GPoint(-75.34065247,40.10480118),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bridgeport Elementary School",'Bridgeport=' + Bridgeport.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.25489807,40.25961304),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bridle Path Elementary School",'Lansdale=' + Lansdale.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.53535461,40.19616699),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brooke Elementary School",'Royersford=' + Royersford.length);
King_Of_Prussia[King_Of_Prussia.length] = createMarker(new GPoint(-75.38654327,40.10710526),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Caley Elementary School",'King_Of_Prussia=' + King_Of_Prussia.length);
King_Of_Prussia[King_Of_Prussia.length] = createMarker(new GPoint(-75.37468719,40.09683228),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Candlebrook Elementary School",'King_Of_Prussia=' + King_Of_Prussia.length);
Wyncote[Wyncote.length] = createMarker(new GPoint(-75.15830231,40.08041763),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Cedarbrook Middle School",'Wyncote=' + Wyncote.length);
Plymouth_Meeting[Plymouth_Meeting.length] = createMarker(new GPoint(-75.31414795,40.12429428),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Center For Technical Studies O",'Plymouth_Meeting=' + Plymouth_Meeting.length);
Cheltenham[Cheltenham.length] = createMarker(new GPoint(-75.10714722,40.05920410),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cheltenham Elementary School",'Cheltenham=' + Cheltenham.length);
Wyncote[Wyncote.length] = createMarker(new GPoint(-75.15811157,40.08595276),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cheltenham High School",'Wyncote=' + Wyncote.length);
Hatboro[Hatboro.length] = createMarker(new GPoint(-75.11215973,40.15360260),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cold Spring Elementary School",'Hatboro=' + Hatboro.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.32583618,40.13632584),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cole Manor Elementary School",'Norristown=' + Norristown.length);
Plymouth_Meeting[Plymouth_Meeting.length] = createMarker(new GPoint(-75.26242065,40.10400009),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Colonial Elementary School",'Plymouth_Meeting=' + Plymouth_Meeting.length);
Plymouth_Meeting[Plymouth_Meeting.length] = createMarker(new GPoint(-75.30738831,40.12668228),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Colonial Middle School",'Plymouth_Meeting=' + Plymouth_Meeting.length);
Conshohocken[Conshohocken.length] = createMarker(new GPoint(-75.30564117,40.07619858),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Conshohocken Elementary School",'Conshohocken=' + Conshohocken.length);
Glenside[Glenside.length] = createMarker(new GPoint(-75.13894653,40.11523438),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Copper Beech School",'Glenside=' + Glenside.length);
Hatboro[Hatboro.length] = createMarker(new GPoint(-75.10069275,40.18391418),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crooked Billet Elementary School",'Hatboro=' + Hatboro.length);
Bala_Cynwyd[Bala_Cynwyd.length] = createMarker(new GPoint(-75.24122620,40.01199722),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cynwyd School",'Bala_Cynwyd=' + Bala_Cynwyd.length);
Souderton[Souderton.length] = createMarker(new GPoint(-75.31112671,40.31195450),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("E M Crouthamel Elementary School",'Souderton=' + Souderton.length);
Eagleville[Eagleville.length] = createMarker(new GPoint(-75.40227509,40.16367340),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eagleville Elementary School",'Eagleville=' + Eagleville.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.32261658,40.15304184),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("East Norriton Middle School",'Norristown=' + Norristown.length);
Willow_Grove[Willow_Grove.length] = createMarker(new GPoint(-75.11093140,40.15951538),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eastern Center For Arts & Tech",'Willow_Grove=' + Willow_Grove.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.62715149,40.24840927),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Edgewood Elementary School",'Pottstown=' + Pottstown.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.33562469,40.13020325),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eisenhower MiddleSchool",'Norristown=' + Norristown.length);
Elkins_Park[Elkins_Park.length] = createMarker(new GPoint(-75.11402893,40.06983566),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Elkins Park School",'Elkins_Park=' + Elkins_Park.length);
Collegeville[Collegeville.length] = createMarker(new GPoint(-75.46313477,40.21702576),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Evergreen Elementary School",'Collegeville=' + Collegeville.length);
Willow_Grove[Willow_Grove.length] = createMarker(new GPoint(-75.14362335,40.14073944),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fitzwater Elementary School",'Willow_Grove=' + Willow_Grove.length);
Fort_Washington[Fort_Washington.length] = createMarker(new GPoint(-75.20169830,40.14742279),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fort Washington Elementary School",'Fort_Washington=' + Fort_Washington.length);
Souderton[Souderton.length] = createMarker(new GPoint(-75.35227203,40.31250381),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franconia Elementary School",'Souderton=' + Souderton.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.62991333,40.26005936),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franklin Elementary School",'Pottstown=' + Pottstown.length);
Harleysville[Harleysville.length] = createMarker(new GPoint(-75.34777832,40.23581314),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("General Nash Elementary School",'Harleysville=' + Harleysville.length);
Gilbertsville[Gilbertsville.length] = createMarker(new GPoint(-75.60853577,40.32096863),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gilbertsville Elementary School",'Gilbertsville=' + Gilbertsville.length);
Gladwyne[Gladwyne.length] = createMarker(new GPoint(-75.27609253,40.03370285),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gladwyne School",'Gladwyne=' + Gladwyne.length);
Glenside[Glenside.length] = createMarker(new GPoint(-75.16226959,40.09705353),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Glenside Elementary School",'Glenside=' + Glenside.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.34155273,40.11904144),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gotwals Elementary School",'Norristown=' + Norristown.length);
North_Wales[North_Wales.length] = createMarker(new GPoint(-75.26445770,40.22105026),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gwyn-nor Elementary School",'North_Wales=' + North_Wales.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.31051636,40.22336197),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gwynedd Square Elementary School",'Lansdale=' + Lansdale.length);
Horsham[Horsham.length] = createMarker(new GPoint(-75.13335419,40.19437408),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hallowell Elementary School",'Horsham=' + Horsham.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.33618164,40.11735916),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hancock Elementary School",'Norristown=' + Norristown.length);
Rosemont[Rosemont.length] = createMarker(new GPoint(-75.32102966,40.03934097),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Harriton Senior High School",'Rosemont=' + Rosemont.length);
Horsham[Horsham.length] = createMarker(new GPoint(-75.16267395,40.19810867),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hatboro-horsham Senior High School",'Horsham=' + Horsham.length);
Hatfield[Hatfield.length] = createMarker(new GPoint(-75.30664062,40.28067017),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hatfield Elementary School",'Hatfield=' + Hatfield.length);
Abington[Abington.length] = createMarker(new GPoint(-75.12364197,40.12366486),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Highland School At Glenside-weldo",'Abington=' + Abington.length);
Souderton[Souderton.length] = createMarker(new GPoint(-75.33530426,40.31524277),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Indian Crest Jhs",'Souderton=' + Souderton.length);
Harleysville[Harleysville.length] = createMarker(new GPoint(-75.38018799,40.28628922),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Indian Valley Middle School",'Harleysville=' + Harleysville.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.30578613,40.24782562),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Inglewood Elementary School",'Lansdale=' + Lansdale.length);
Dresher[Dresher.length] = createMarker(new GPoint(-75.17197418,40.15243912),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jarrettown Elementary School",'Dresher=' + Dresher.length);
Jenkintown[Jenkintown.length] = createMarker(new GPoint(-75.12692261,40.09608078),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jenkintown Elementary School",'Jenkintown=' + Jenkintown.length);
Jenkintown[Jenkintown.length] = createMarker(new GPoint(-75.12692261,40.09608078),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Jenkintown High School",'Jenkintown=' + Jenkintown.length);
Jenkintown[Jenkintown.length] = createMarker(new GPoint(-75.12692261,40.09608078),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jenkintown Middle School",'Jenkintown=' + Jenkintown.length);
Horsham[Horsham.length] = createMarker(new GPoint(-75.12693024,40.18688965),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Keith Valley Middle School",'Horsham=' + Horsham.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.26264954,40.24047852),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Knapp Elementary School",'Lansdale=' + Lansdale.length);
Hatfield[Hatfield.length] = createMarker(new GPoint(-75.27656555,40.26578522),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kulp Elementary School",'Hatfield=' + Hatfield.length);
Bala_Cynwyd[Bala_Cynwyd.length] = createMarker(new GPoint(-75.23361206,40.00237274),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Laboratory Charter School",'Bala_Cynwyd=' + Bala_Cynwyd.length);
Ambler[Ambler.length] = createMarker(new GPoint(-75.18647766,40.21017456),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Limekiln-simmons Elementary School",'Ambler=' + Ambler.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.54214478,40.23152924),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Limerick Elementary School",'Royersford=' + Royersford.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.64779663,40.25597000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Pottstown=' + Pottstown.length);
Ambler[Ambler.length] = createMarker(new GPoint(-75.22722626,40.17050552),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lower Gwynedd Elementary School",'Ambler=' + Ambler.length);
Ardmore[Ardmore.length] = createMarker(new GPoint(-75.28301239,40.00923538),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lower Merion High School",'Ardmore=' + Ardmore.length);
Huntingdon_Valley[Huntingdon_Valley.length] = createMarker(new GPoint(-75.05966187,40.12361145),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lower Moreland High School",'Huntingdon_Valley=' + Huntingdon_Valley.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.63365936,40.27203369),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lower Pottsgrove Elementary School",'Pottstown=' + Pottstown.length);
Harleysville[Harleysville.length] = createMarker(new GPoint(-75.38555145,40.28112411),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lower Salford Elementary School",'Harleysville=' + Harleysville.length);
Maple_Glen[Maple_Glen.length] = createMarker(new GPoint(-75.18366241,40.16521454),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Maple Glen Elementary School",'Maple_Glen=' + Maple_Glen.length);
Green_Lane[Green_Lane.length] = createMarker(new GPoint(-75.47957611,40.34603119),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Marlborough Elementary School",'Green_Lane=' + Green_Lane.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.36249542,40.12803268),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Marshall Street Elementary School",'Norristown=' + Norristown.length);
Ambler[Ambler.length] = createMarker(new GPoint(-75.22080994,40.15283585),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mattison Avenue Elementary School",'Ambler=' + Ambler.length);
Elkins_Park[Elkins_Park.length] = createMarker(new GPoint(-75.10533142,40.08087921),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mckinley School",'Elkins_Park=' + Elkins_Park.length);
Merion_Station[Merion_Station.length] = createMarker(new GPoint(-75.25528717,40.00144958),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Merion Elementary School",'Merion_Station=' + Merion_Station.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.39684296,40.17476654),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Methacton High School",'Norristown=' + Norristown.length);
Melrose_Park[Melrose_Park.length] = createMarker(new GPoint(-75.13466644,40.06686783),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Middle Years Altern School",'Melrose_Park=' + Melrose_Park.length);
North_Wales[North_Wales.length] = createMarker(new GPoint(-75.21418762,40.24573517),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Montgomery Elementary School",'North_Wales=' + North_Wales.length);
Huntingdon_Valley[Huntingdon_Valley.length] = createMarker(new GPoint(-75.06143951,40.12343597),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Murray Avenue School",'Huntingdon_Valley=' + Huntingdon_Valley.length);
Elkins_Park[Elkins_Park.length] = createMarker(new GPoint(-75.12571716,40.06468964),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Myers Elementary School",'Elkins_Park=' + Elkins_Park.length);
Frederick[Frederick.length] = createMarker(new GPoint(-75.54261780,40.31312561),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("New Hanover-upper Frederick Elementary School",'Frederick=' + Frederick.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.35725403,40.14447403),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Norristown Area High School",'Norristown=' + Norristown.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.32108307,40.23366928),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North Montco Tech Career Cente",'Lansdale=' + Lansdale.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.31124878,40.23286057),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North Penn Senior High School",'Lansdale=' + Lansdale.length);
North_Wales[North_Wales.length] = createMarker(new GPoint(-75.27255249,40.20985413),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Wales Elementary School",'North_Wales=' + North_Wales.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.29554749,40.25349045),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Park Elementary School",'Lansdale=' + Lansdale.length);
Harleysville[Harleysville.length] = createMarker(new GPoint(-75.38632965,40.26646805),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Ridge Elementary School",'Harleysville=' + Harleysville.length);
Oaks[Oaks.length] = createMarker(new GPoint(-75.45999908,40.13159943),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oaks Elementary School",'Oaks=' + Oaks.length);
Abington[Abington.length] = createMarker(new GPoint(-75.11203766,40.13012695),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Overlook School At Glenside-weldo",'Abington=' + Abington.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.36012268,40.15835571),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Paul V Fly Elementary School",'Norristown=' + Norristown.length);
Narberth[Narberth.length] = createMarker(new GPoint(-75.26551819,40.02168655),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Penn Valley School",'Narberth=' + Narberth.length);
Wynnewood[Wynnewood.length] = createMarker(new GPoint(-75.27757263,39.98725510),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Penn Wynne School",'Wynnewood=' + Wynnewood.length);
North_Wales[North_Wales.length] = createMarker(new GPoint(-75.27327728,40.21902084),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pennbrook Middle School",'North_Wales=' + North_Wales.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.27864838,40.23621368),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Penndale Middle School",'Lansdale=' + Lansdale.length);
Hatfield[Hatfield.length] = createMarker(new GPoint(-75.31205750,40.27044678),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pennfield Middle School",'Hatfield=' + Hatfield.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.34416199,40.11562729),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pennsylvania Virtual Charter School",'Norristown=' + Norristown.length);
Hatboro[Hatboro.length] = createMarker(new GPoint(-75.11206818,40.17409134),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pennypack Elementary School",'Hatboro=' + Hatboro.length);
Collegeville[Collegeville.length] = createMarker(new GPoint(-75.45372772,40.21823120),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Perkiomen Valley High School",'Collegeville=' + Collegeville.length);
Collegeville[Collegeville.length] = createMarker(new GPoint(-75.46316528,40.21704483),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Perkiomen Valley Middle School",'Collegeville=' + Collegeville.length);
Zieglerville[Zieglerville.length] = createMarker(new GPoint(-75.50964800,40.29296600),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Perkiomen Valley Ms-west",'Zieglerville=' + Zieglerville.length);
Trappe[Trappe.length] = createMarker(new GPoint(-75.48063660,40.19491959),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Perkiomen Valley New Beginning High School",'Trappe=' + Trappe.length);
Huntingdon_Valley[Huntingdon_Valley.length] = createMarker(new GPoint(-75.03009033,40.13857269),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pine Road Elementary School",'Huntingdon_Valley=' + Huntingdon_Valley.length);
Plymouth_Meeting[Plymouth_Meeting.length] = createMarker(new GPoint(-75.29431915,40.11389542),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Plymouth Elementary School",'Plymouth_Meeting=' + Plymouth_Meeting.length);
Plymouth_Meeting[Plymouth_Meeting.length] = createMarker(new GPoint(-75.30474854,40.13655090),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Plymouth-whitemarsh Senior High School",'Plymouth_Meeting=' + Plymouth_Meeting.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.63365936,40.27203369),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pottsgrove Middle School",'Pottstown=' + Pottstown.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.61904144,40.26481628),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pottsgrove Senior High School",'Pottstown=' + Pottstown.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.63945770,40.25395203),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pottstown Middle School",'Pottstown=' + Pottstown.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.63473511,40.25534058),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pottstown Senior High School",'Pottstown=' + Pottstown.length);
Conshohocken[Conshohocken.length] = createMarker(new GPoint(-75.28835297,40.09737778),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ridge Park Elementary School",'Conshohocken=' + Conshohocken.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.61831665,40.26571274),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ringing Rocks Elementary School",'Pottstown=' + Pottstown.length);
Wayne[Wayne.length] = createMarker(new GPoint(-75.38647461,40.07489014),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roberts Elementary School",'Wayne=' + Wayne.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.34215546,40.12353134),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Altern School",'Norristown=' + Norristown.length);
Roslyn[Roslyn.length] = createMarker(new GPoint(-75.14041901,40.12530136),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roslyn School",'Roslyn=' + Roslyn.length);
Hatboro[Hatboro.length] = createMarker(new GPoint(-75.09442902,40.17058182),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Round Meadow Elementary School",'Hatboro=' + Hatboro.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.53536224,40.18324280),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Royersford Elementary School",'Royersford=' + Royersford.length);
Pottstown[Pottstown.length] = createMarker(new GPoint(-75.62312317,40.24149704),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rupert Elementary School",'Pottstown=' + Pottstown.length);
Huntingdon_Valley[Huntingdon_Valley.length] = createMarker(new GPoint(-75.09053040,40.09849548),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rydal East School",'Huntingdon_Valley=' + Huntingdon_Valley.length);
Harleysville[Harleysville.length] = createMarker(new GPoint(-75.43700409,40.30970764),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Salford Hills Elementary School",'Harleysville=' + Harleysville.length);
Dresher[Dresher.length] = createMarker(new GPoint(-75.17188263,40.12394333),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sandy Run Middle School",'Dresher=' + Dresher.length);
Schwenksville[Schwenksville.length] = createMarker(new GPoint(-75.48435974,40.17752075),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Schwenksville Elementary School",'Schwenksville=' + Schwenksville.length);
Ambler[Ambler.length] = createMarker(new GPoint(-75.25202942,40.14387131),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shady Grove Elementary School",'Ambler=' + Ambler.length);
Horsham[Horsham.length] = createMarker(new GPoint(-75.16939545,40.20040131),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Simmons Elementary School",'Horsham=' + Horsham.length);
Collegeville[Collegeville.length] = createMarker(new GPoint(-75.41876221,40.21368790),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Skippack Elementary School",'Collegeville=' + Collegeville.length);
Souderton[Souderton.length] = createMarker(new GPoint(-75.31466675,40.31397629),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Souderton Area Senior High School",'Souderton=' + Souderton.length);
Souderton[Souderton.length] = createMarker(new GPoint(-75.32024384,40.30954361),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Souderton Charter School Collaborative",'Souderton=' + Souderton.length);
Trappe[Trappe.length] = createMarker(new GPoint(-75.45108032,40.18728256),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("South Elementary School",'Trappe=' + Trappe.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.53194427,40.18770981),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Spring-ford Intrmd School",'Royersford=' + Royersford.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.52749634,40.18712616),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Spring-ford Middle School",'Royersford=' + Royersford.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.52863200,40.17164700),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Spring-ford Ms 7th Grade Center",'Royersford=' + Royersford.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.52812958,40.18751526),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Spring-ford Senior High School",'Royersford=' + Royersford.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.52747700,40.18510400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Spring-ford Shs 9th Grade Center",'Royersford=' + Royersford.length);
Oreland[Oreland.length] = createMarker(new GPoint(-75.18811798,40.10575485),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Springfield Township El Sch-enfield Elementary School",'Oreland=' + Oreland.length);
Flourtown[Flourtown.length] = createMarker(new GPoint(-75.19778442,40.10628891),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Springfield Township El Sch-erdenhm Elementary School",'Flourtown=' + Flourtown.length);
Erdenheim[Erdenheim.length] = createMarker(new GPoint(-75.19498444,40.10080719),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Springfield Township High School",'Erdenheim=' + Erdenheim.length);
Oreland[Oreland.length] = createMarker(new GPoint(-75.19342804,40.10240936),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Springfield Township Middle School",'Oreland=' + Oreland.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.35810089,40.12553787),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Stewart Middle School",'Norristown=' + Norristown.length);
Blue_Bell[Blue_Bell.length] = createMarker(new GPoint(-75.31014252,40.16295242),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stony Creek Elementary School",'Blue_Bell=' + Blue_Bell.length);
Fort_Washington[Fort_Washington.length] = createMarker(new GPoint(-75.20182037,40.15363693),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Upper Dublin High School",'Fort_Washington=' + Fort_Washington.length);
King_Of_Prussia[King_Of_Prussia.length] = createMarker(new GPoint(-75.38377380,40.09740448),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Upper Merion High School",'King_Of_Prussia=' + King_Of_Prussia.length);
King_Of_Prussia[King_Of_Prussia.length] = createMarker(new GPoint(-75.38392639,40.09743881),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Upper Merion Middle School",'King_Of_Prussia=' + King_Of_Prussia.length);
Willow_Grove[Willow_Grove.length] = createMarker(new GPoint(-75.11053467,40.15886688),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Upper Moreland High School",'Willow_Grove=' + Willow_Grove.length);
Hatboro[Hatboro.length] = createMarker(new GPoint(-75.09471300,40.17057700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Upper Moreland Intermediate School",'Hatboro=' + Hatboro.length);
Hatboro[Hatboro.length] = createMarker(new GPoint(-75.08834839,40.17068863),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Upper Moreland Middle School",'Hatboro=' + Hatboro.length);
Pennsburg[Pennsburg.length] = createMarker(new GPoint(-75.49195099,40.38327026),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Upper Perkiomen High School",'Pennsburg=' + Pennsburg.length);
East_Greenville[East_Greenville.length] = createMarker(new GPoint(-75.50638580,40.40862656),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Upper Perkiomen Middle School",'East_Greenville=' + East_Greenville.length);
Royersford[Royersford.length] = createMarker(new GPoint(-75.54180145,40.19887924),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Upper Providence Elementary School",'Royersford=' + Royersford.length);
Telford[Telford.length] = createMarker(new GPoint(-75.40799713,40.30838013),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vernfield Elementary School",'Telford=' + Telford.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.32124329,40.25641251),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Walton Farm Elementary School",'Lansdale=' + Lansdale.length);
Narberth[Narberth.length] = createMarker(new GPoint(-75.25668335,40.02833939),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Welsh Valley Middle School",'Narberth=' + Narberth.length);
Souderton[Souderton.length] = createMarker(new GPoint(-75.32858276,40.30350113),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Broad Street Elementary School",'Souderton=' + Souderton.length);
Stowe[Stowe.length] = createMarker(new GPoint(-75.68546295,40.24964905),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Pottsgrove Elementary School",'Stowe=' + Stowe.length);
Limerick[Limerick.length] = createMarker(new GPoint(-75.50730133,40.21950150),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Western Center For Technical S",'Limerick=' + Limerick.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.35729980,40.14441681),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Whitehall Elementary School",'Norristown=' + Norristown.length);
Lafayette_Hill[Lafayette_Hill.length] = createMarker(new GPoint(-75.25554657,40.09865189),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Whitemarsh Elementary School",'Lafayette_Hill=' + Lafayette_Hill.length);
Willow_Grove[Willow_Grove.length] = createMarker(new GPoint(-75.13101196,40.14049530),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Willow Hill School",'Willow_Grove=' + Willow_Grove.length);
Ambler[Ambler.length] = createMarker(new GPoint(-75.23064423,40.16602707),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Wissahickon Middle School",'Ambler=' + Ambler.length);
Ambler[Ambler.length] = createMarker(new GPoint(-75.23007202,40.16755295),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wissahickon Senior High School",'Ambler=' + Ambler.length);
Norristown[Norristown.length] = createMarker(new GPoint(-75.40335083,40.13618469),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Woodland Elementary School",'Norristown=' + Norristown.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.34706116,40.20171356),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Worcester Elementary School",'Lansdale=' + Lansdale.length);
Wyncote[Wyncote.length] = createMarker(new GPoint(-75.15365601,40.09000778),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wyncote Elementary School",'Wyncote=' + Wyncote.length);
Lansdale[Lansdale.length] = createMarker(new GPoint(-75.29524994,40.24428558),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("York Avenue Elementary School",'Lansdale=' + Lansdale.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,10);
/*
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(Abington);
map.removeOverlays(Ambler);
map.removeOverlays(Ardmore);
map.removeOverlays(Audubon);
map.removeOverlays(Bala_Cynwyd);
map.removeOverlays(Blue_Bell);
map.removeOverlays(Bridgeport);
map.removeOverlays(Bryn_Mawr);
map.removeOverlays(Cheltenham);
map.removeOverlays(Collegeville);
map.removeOverlays(Conshohocken);
map.removeOverlays(Dresher);
map.removeOverlays(Eagleville);
map.removeOverlays(East_Greenville);
map.removeOverlays(Elkins_Park);
map.removeOverlays(Erdenheim);
map.removeOverlays(Flourtown);
map.removeOverlays(Fort_Washington);
map.removeOverlays(Frederick);
map.removeOverlays(Gilbertsville);
map.removeOverlays(Gladwyne);
map.removeOverlays(Glenside);
map.removeOverlays(Green_Lane);
map.removeOverlays(Harleysville);
map.removeOverlays(Hatboro);
map.removeOverlays(Hatfield);
map.removeOverlays(Horsham);
map.removeOverlays(Huntingdon_Valley);
map.removeOverlays(Jenkintown);
map.removeOverlays(King_Of_Prussia);
map.removeOverlays(Lafayette_Hill);
map.removeOverlays(Lansdale);
map.removeOverlays(Limerick);
map.removeOverlays(Maple_Glen);
map.removeOverlays(Melrose_Park);
map.removeOverlays(Merion_Station);
map.removeOverlays(Narberth);
map.removeOverlays(Norristown);
map.removeOverlays(North_Wales);
map.removeOverlays(Oaks);
map.removeOverlays(Oreland);
map.removeOverlays(Pennsburg);
map.removeOverlays(Plymouth_Meeting);
map.removeOverlays(Pottstown);
map.removeOverlays(Rosemont);
map.removeOverlays(Roslyn);
map.removeOverlays(Royersford);
map.removeOverlays(Schwenksville);
map.removeOverlays(Souderton);
map.removeOverlays(Stowe);
map.removeOverlays(Telford);
map.removeOverlays(Trappe);
map.removeOverlays(Wayne);
map.removeOverlays(Willow_Grove);
map.removeOverlays(Wyncote);
map.removeOverlays(Wynnewood);
map.removeOverlays(Zieglerville);
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(Abington);map.removeOverlays(Abington);
map.removeOverlays(Ambler);
map.removeOverlays(Ardmore);
map.removeOverlays(Audubon);
map.removeOverlays(Bala_Cynwyd);
map.removeOverlays(Blue_Bell);
map.removeOverlays(Bridgeport);
map.removeOverlays(Bryn_Mawr);
map.removeOverlays(Cheltenham);
map.removeOverlays(Collegeville);
map.removeOverlays(Conshohocken);
map.removeOverlays(Dresher);
map.removeOverlays(Eagleville);
map.removeOverlays(East_Greenville);
map.removeOverlays(Elkins_Park);
map.removeOverlays(Erdenheim);
map.removeOverlays(Flourtown);
map.removeOverlays(Fort_Washington);
map.removeOverlays(Frederick);
map.removeOverlays(Gilbertsville);
map.removeOverlays(Gladwyne);
map.removeOverlays(Glenside);
map.removeOverlays(Green_Lane);
map.removeOverlays(Harleysville);
map.removeOverlays(Hatboro);
map.removeOverlays(Hatfield);
map.removeOverlays(Horsham);
map.removeOverlays(Huntingdon_Valley);
map.removeOverlays(Jenkintown);
map.removeOverlays(King_Of_Prussia);
map.removeOverlays(Lafayette_Hill);
map.removeOverlays(Lansdale);
map.removeOverlays(Limerick);
map.removeOverlays(Maple_Glen);
map.removeOverlays(Melrose_Park);
map.removeOverlays(Merion_Station);
map.removeOverlays(Narberth);
map.removeOverlays(Norristown);
map.removeOverlays(North_Wales);
map.removeOverlays(Oaks);
map.removeOverlays(Oreland);
map.removeOverlays(Pennsburg);
map.removeOverlays(Plymouth_Meeting);
map.removeOverlays(Pottstown);
map.removeOverlays(Rosemont);
map.removeOverlays(Roslyn);
map.removeOverlays(Royersford);
map.removeOverlays(Schwenksville);
map.removeOverlays(Souderton);
map.removeOverlays(Stowe);
map.removeOverlays(Telford);
map.removeOverlays(Trappe);
map.removeOverlays(Wayne);
map.removeOverlays(Willow_Grove);
map.removeOverlays(Wyncote);
map.removeOverlays(Wynnewood);
map.removeOverlays(Zieglerville);
map.addOverlays(Abington);
centerByArray(Abington, false, false);
cntMarker += Abington.length;
map.addOverlays(Ambler);
centerByArray(Ambler, false, false);
cntMarker += Ambler.length;
map.addOverlays(Ardmore);
centerByArray(Ardmore, false, false);
cntMarker += Ardmore.length;
map.addOverlays(Audubon);
centerByArray(Audubon, false, false);
cntMarker += Audubon.length;
map.addOverlays(Bala_Cynwyd);
centerByArray(Bala_Cynwyd, false, false);
cntMarker += Bala_Cynwyd.length;
map.addOverlays(Blue_Bell);
centerByArray(Blue_Bell, false, false);
cntMarker += Blue_Bell.length;
map.addOverlays(Bridgeport);
centerByArray(Bridgeport, false, false);
cntMarker += Bridgeport.length;
map.addOverlays(Bryn_Mawr);
centerByArray(Bryn_Mawr, false, false);
cntMarker += Bryn_Mawr.length;
map.addOverlays(Cheltenham);
centerByArray(Cheltenham, false, false);
cntMarker += Cheltenham.length;
map.addOverlays(Collegeville);
centerByArray(Collegeville, false, false);
cntMarker += Collegeville.length;
map.addOverlays(Conshohocken);
centerByArray(Conshohocken, false, false);
cntMarker += Conshohocken.length;
map.addOverlays(Dresher);
centerByArray(Dresher, false, false);
cntMarker += Dresher.length;
map.addOverlays(Eagleville);
centerByArray(Eagleville, false, false);
cntMarker += Eagleville.length;
map.addOverlays(East_Greenville);
centerByArray(East_Greenville, false, false);
cntMarker += East_Greenville.length;
map.addOverlays(Elkins_Park);
centerByArray(Elkins_Park, false, false);
cntMarker += Elkins_Park.length;
map.addOverlays(Erdenheim);
centerByArray(Erdenheim, false, false);
cntMarker += Erdenheim.length;
map.addOverlays(Flourtown);
centerByArray(Flourtown, false, false);
cntMarker += Flourtown.length;
map.addOverlays(Fort_Washington);
centerByArray(Fort_Washington, false, false);
cntMarker += Fort_Washington.length;
map.addOverlays(Frederick);
centerByArray(Frederick, false, false);
cntMarker += Frederick.length;
map.addOverlays(Gilbertsville);
centerByArray(Gilbertsville, false, false);
cntMarker += Gilbertsville.length;
map.addOverlays(Gladwyne);
centerByArray(Gladwyne, false, false);
cntMarker += Gladwyne.length;
map.addOverlays(Glenside);
centerByArray(Glenside, false, false);
cntMarker += Glenside.length;
map.addOverlays(Green_Lane);
centerByArray(Green_Lane, false, false);
cntMarker += Green_Lane.length;
map.addOverlays(Harleysville);
centerByArray(Harleysville, false, false);
cntMarker += Harleysville.length;
map.addOverlays(Hatboro);
centerByArray(Hatboro, false, false);
cntMarker += Hatboro.length;
map.addOverlays(Hatfield);
centerByArray(Hatfield, false, false);
cntMarker += Hatfield.length;
map.addOverlays(Horsham);
centerByArray(Horsham, false, false);
cntMarker += Horsham.length;
map.addOverlays(Huntingdon_Valley);
centerByArray(Huntingdon_Valley, false, false);
cntMarker += Huntingdon_Valley.length;
map.addOverlays(Jenkintown);
centerByArray(Jenkintown, false, false);
cntMarker += Jenkintown.length;
map.addOverlays(King_Of_Prussia);
centerByArray(King_Of_Prussia, false, false);
cntMarker += King_Of_Prussia.length;
map.addOverlays(Lafayette_Hill);
centerByArray(Lafayette_Hill, false, false);
cntMarker += Lafayette_Hill.length;
map.addOverlays(Lansdale);
centerByArray(Lansdale, false, false);
cntMarker += Lansdale.length;
map.addOverlays(Limerick);
centerByArray(Limerick, false, false);
cntMarker += Limerick.length;
map.addOverlays(Maple_Glen);
centerByArray(Maple_Glen, false, false);
cntMarker += Maple_Glen.length;
map.addOverlays(Melrose_Park);
centerByArray(Melrose_Park, false, false);
cntMarker += Melrose_Park.length;
map.addOverlays(Merion_Station);
centerByArray(Merion_Station, false, false);
cntMarker += Merion_Station.length;
map.addOverlays(Narberth);
centerByArray(Narberth, false, false);
cntMarker += Narberth.length;
map.addOverlays(Norristown);
centerByArray(Norristown, false, false);
cntMarker += Norristown.length;
map.addOverlays(North_Wales);
centerByArray(North_Wales, false, false);
cntMarker += North_Wales.length;
map.addOverlays(Oaks);
centerByArray(Oaks, false, false);
cntMarker += Oaks.length;
map.addOverlays(Oreland);
centerByArray(Oreland, false, false);
cntMarker += Oreland.length;
map.addOverlays(Pennsburg);
centerByArray(Pennsburg, false, false);
cntMarker += Pennsburg.length;
map.addOverlays(Plymouth_Meeting);
centerByArray(Plymouth_Meeting, false, false);
cntMarker += Plymouth_Meeting.length;
map.addOverlays(Pottstown);
centerByArray(Pottstown, false, false);
cntMarker += Pottstown.length;
map.addOverlays(Rosemont);
centerByArray(Rosemont, false, false);
cntMarker += Rosemont.length;
map.addOverlays(Roslyn);
centerByArray(Roslyn, false, false);
cntMarker += Roslyn.length;
map.addOverlays(Royersford);
centerByArray(Royersford, false, false);
cntMarker += Royersford.length;
map.addOverlays(Schwenksville);
centerByArray(Schwenksville, false, false);
cntMarker += Schwenksville.length;
map.addOverlays(Souderton);
centerByArray(Souderton, false, false);
cntMarker += Souderton.length;
map.addOverlays(Stowe);
centerByArray(Stowe, false, false);
cntMarker += Stowe.length;
map.addOverlays(Telford);
centerByArray(Telford, false, false);
cntMarker += Telford.length;
map.addOverlays(Trappe);
centerByArray(Trappe, false, false);
cntMarker += Trappe.length;
map.addOverlays(Wayne);
centerByArray(Wayne, false, false);
cntMarker += Wayne.length;
map.addOverlays(Willow_Grove);
centerByArray(Willow_Grove, false, false);
cntMarker += Willow_Grove.length;
map.addOverlays(Wyncote);
centerByArray(Wyncote, false, false);
cntMarker += Wyncote.length;
map.addOverlays(Wynnewood);
centerByArray(Wynnewood, false, false);
cntMarker += Wynnewood.length;
map.addOverlays(Zieglerville);
centerByArray(Zieglerville, false, false);
cntMarker += Zieglerville.length;
centerByArray(Abington,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');
}
}