function addMarkers()
{
mySelect = document.getElementById('selection');
Yardley = [];Fairless_Hills = [];Warrington = [];Levittown = [];Bedminister = [];Bensalem = [];Furlong = [];Bristol = [];Buckingham = [];Chalfont = [];Fallsington = [];Doylestown = [];Churchville = [];Newtown = [];Holland = [];Southampton = [];Perkasie = [];Croydon = [];Kintnersville = [];Morrisville = [];Sellersville = [];Quakertown = [];Langhorne = [];Jamison = [];Feasterville = [];Warminster = [];Feasterville_Trevose = [];Solebury = [];New_Hope = [];New_Britain = [];Richboro = [];Pipersville = [];Quakerstown = [];Wrightstown = [];mySelect.options[mySelect.options.length] = new Option("Bedminister schools",'all=Bedminister');
mySelect.options[mySelect.options.length] = new Option("Bensalem schools",'all=Bensalem');
mySelect.options[mySelect.options.length] = new Option("Bristol schools",'all=Bristol');
mySelect.options[mySelect.options.length] = new Option("Buckingham schools",'all=Buckingham');
mySelect.options[mySelect.options.length] = new Option("Chalfont schools",'all=Chalfont');
mySelect.options[mySelect.options.length] = new Option("Churchville schools",'all=Churchville');
mySelect.options[mySelect.options.length] = new Option("Croydon schools",'all=Croydon');
mySelect.options[mySelect.options.length] = new Option("Doylestown schools",'all=Doylestown');
mySelect.options[mySelect.options.length] = new Option("Fairless Hills schools",'all=Fairless_Hills');
mySelect.options[mySelect.options.length] = new Option("Fallsington schools",'all=Fallsington');
mySelect.options[mySelect.options.length] = new Option("Feasterville schools",'all=Feasterville');
mySelect.options[mySelect.options.length] = new Option("Feasterville Trevose schools",'all=Feasterville_Trevose');
mySelect.options[mySelect.options.length] = new Option("Furlong schools",'all=Furlong');
mySelect.options[mySelect.options.length] = new Option("Holland schools",'all=Holland');
mySelect.options[mySelect.options.length] = new Option("Jamison schools",'all=Jamison');
mySelect.options[mySelect.options.length] = new Option("Kintnersville schools",'all=Kintnersville');
mySelect.options[mySelect.options.length] = new Option("Langhorne schools",'all=Langhorne');
mySelect.options[mySelect.options.length] = new Option("Levittown schools",'all=Levittown');
mySelect.options[mySelect.options.length] = new Option("Morrisville schools",'all=Morrisville');
mySelect.options[mySelect.options.length] = new Option("New Britain schools",'all=New_Britain');
mySelect.options[mySelect.options.length] = new Option("New Hope schools",'all=New_Hope');
mySelect.options[mySelect.options.length] = new Option("Newtown schools",'all=Newtown');
mySelect.options[mySelect.options.length] = new Option("Perkasie schools",'all=Perkasie');
mySelect.options[mySelect.options.length] = new Option("Pipersville schools",'all=Pipersville');
mySelect.options[mySelect.options.length] = new Option("Quakerstown schools",'all=Quakerstown');
mySelect.options[mySelect.options.length] = new Option("Quakertown schools",'all=Quakertown');
mySelect.options[mySelect.options.length] = new Option("Richboro schools",'all=Richboro');
mySelect.options[mySelect.options.length] = new Option("Sellersville schools",'all=Sellersville');
mySelect.options[mySelect.options.length] = new Option("Solebury schools",'all=Solebury');
mySelect.options[mySelect.options.length] = new Option("Southampton schools",'all=Southampton');
mySelect.options[mySelect.options.length] = new Option("Warminster schools",'all=Warminster');
mySelect.options[mySelect.options.length] = new Option("Warrington schools",'all=Warrington');
mySelect.options[mySelect.options.length] = new Option("Wrightstown schools",'all=Wrightstown');
mySelect.options[mySelect.options.length] = new Option("Yardley schools",'all=Yardley');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Yardley[Yardley.length] = createMarker(new GPoint(-74.88005829,40.24496460),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Afton Elementary School",'Yardley=' + Yardley.length);
Fairless_Hills[Fairless_Hills.length] = createMarker(new GPoint(-74.85527802,40.16329193),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Armstrong Middle School",'Fairless_Hills=' + Fairless_Hills.length);
Warrington[Warrington.length] = createMarker(new GPoint(-75.12938690,40.23614502),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Barclay Elementary School",'Warrington=' + Warrington.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.86891937,40.13208008),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Barton Elementary School",'Levittown=' + Levittown.length);
Bedminister[Bedminister.length] = createMarker(new GPoint(-77.81849670,40.91429901),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bedminster Elementary School",'Bedminister=' + Bedminister.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.94126892,40.14216614),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Belmont Hills Elementary School",'Bensalem=' + Bensalem.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.94093000,40.10973500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bensalem Twp High School",'Bensalem=' + Bensalem.length);
Furlong[Furlong.length] = createMarker(new GPoint(-75.08994700,40.28329300),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bridge Valley Elementary School",'Furlong=' + Furlong.length);
Bristol[Bristol.length] = createMarker(new GPoint(-74.84353638,40.10977936),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bristol High School",'Bristol=' + Bristol.length);
Bristol[Bristol.length] = createMarker(new GPoint(-74.84353638,40.10977936),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bristol Middle School",'Bristol=' + Bristol.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.83524323,40.13988113),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Buchanan Elementary School",'Levittown=' + Levittown.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.87553406,40.17639160),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Buck Elementary School",'Levittown=' + Levittown.length);
Buckingham[Buckingham.length] = createMarker(new GPoint(-75.06169891,40.32239914),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Buckingham Elementary School",'Buckingham=' + Buckingham.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.82843781,40.17686462),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bucks County Montessori Charter School",'Levittown=' + Levittown.length);
Fairless_Hills[Fairless_Hills.length] = createMarker(new GPoint(-74.85243988,40.16194153),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bucks County Technical High School",'Fairless_Hills=' + Fairless_Hills.length);
Chalfont[Chalfont.length] = createMarker(new GPoint(-75.21112061,40.27136612),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Butler Elementary School",'Chalfont=' + Chalfont.length);
Fallsington[Fallsington.length] = createMarker(new GPoint(-74.81861877,40.18796539),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Center For Student Learning Charter School",'Fallsington=' + Fallsington.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.05440521,40.33941650),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Central Bucks High School-east",'Doylestown=' + Doylestown.length);
Warrington[Warrington.length] = createMarker(new GPoint(-75.16148100,40.26098400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Central Bucks High School-south",'Warrington=' + Warrington.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.13774872,40.30461884),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Central Bucks High School-west",'Doylestown=' + Doylestown.length);
Yardley[Yardley.length] = createMarker(new GPoint(-74.82624817,40.20814133),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Charles H Boehm Middle School",'Yardley=' + Yardley.length);
Churchville[Churchville.length] = createMarker(new GPoint(-75.05884552,40.16683960),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Churchville Elementary School",'Churchville=' + Churchville.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.09156036,40.36199570),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cold Spring Elementary School",'Doylestown=' + Doylestown.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.95334625,40.08323288),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cornwells Elementary School",'Bensalem=' + Bensalem.length);
Newtown[Newtown.length] = createMarker(new GPoint(-74.94509125,40.22977829),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Council Rock High School North",'Newtown=' + Newtown.length);
Holland[Holland.length] = createMarker(new GPoint(-74.97431183,40.20772552),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Council Rock High School South",'Holland=' + Holland.length);
Southampton[Southampton.length] = createMarker(new GPoint(-75.04017639,40.18523788),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Davis Elementary School",'Southampton=' + Southampton.length);
Perkasie[Perkasie.length] = createMarker(new GPoint(-75.27355194,40.39907074),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Deibler Elementary School",'Perkasie=' + Perkasie.length);
Croydon[Croydon.length] = createMarker(new GPoint(-74.89478302,40.08988190),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Devine Elementary School",'Croydon=' + Croydon.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.14089203,40.31016541),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Doyle Elementary School",'Doylestown=' + Doylestown.length);
Kintnersville[Kintnersville.length] = createMarker(new GPoint(-75.19935608,40.52211761),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Durham-nockamixon Elementary School",'Kintnersville=' + Kintnersville.length);
Yardley[Yardley.length] = createMarker(new GPoint(-74.83498383,40.23211288),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Edgewood Elementary School",'Yardley=' + Yardley.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.81041718,40.15727997),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Emerson Elementary School",'Levittown=' + Levittown.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.88146210,40.15596008),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Everitt Elementary School",'Levittown=' + Levittown.length);
Fallsington[Fallsington.length] = createMarker(new GPoint(-74.81861877,40.18796539),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fallsington Elementary School",'Fallsington=' + Fallsington.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.83245850,40.14723969),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fitch Elementary School",'Levittown=' + Levittown.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.85370636,40.13657379),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Franklin Middle School",'Levittown=' + Levittown.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.13002777,40.35722733),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gayman Elementary School",'Doylestown=' + Doylestown.length);
Newtown[Newtown.length] = createMarker(new GPoint(-74.92228699,40.23489380),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Goodnoe Elementary School",'Newtown=' + Newtown.length);
Morrisville[Morrisville.length] = createMarker(new GPoint(-74.79103851,40.20629883),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Grandview Elementary School",'Morrisville=' + Morrisville.length);
Sellersville[Sellersville.length] = createMarker(new GPoint(-75.26343536,40.32438278),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Grasse Elementary School",'Sellersville=' + Sellersville.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.14144135,40.36064529),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Groveland Elementary School",'Doylestown=' + Doylestown.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.27370453,40.48746872),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Haycock Elementary School",'Quakertown=' + Quakertown.length);
Langhorne[Langhorne.length] = createMarker(new GPoint(-74.91529846,40.17710114),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Heckman Elementary School",'Langhorne=' + Langhorne.length);
Holland[Holland.length] = createMarker(new GPoint(-74.97080231,40.19448471),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hillcrest Elementary School",'Holland=' + Holland.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.05654907,40.34078217),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Holicong Middle School",'Doylestown=' + Doylestown.length);
Holland[Holland.length] = createMarker(new GPoint(-74.99349976,40.17383957),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Holland Elementary School",'Holland=' + Holland.length);
Holland[Holland.length] = createMarker(new GPoint(-74.97341919,40.19436264),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Holland Middle School",'Holland=' + Holland.length);
Langhorne[Langhorne.length] = createMarker(new GPoint(-74.90498352,40.14859390),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hoover Elementary School",'Langhorne=' + Langhorne.length);
Jamison[Jamison.length] = createMarker(new GPoint(-75.09474182,40.25723648),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jamison Elementary School",'Jamison=' + Jamison.length);
Feasterville[Feasterville.length] = createMarker(new GPoint(-74.99694824,40.15092468),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Joseph E Ferderbar Elementary School",'Feasterville=' + Feasterville.length);
Southampton[Southampton.length] = createMarker(new GPoint(-75.03216553,40.18640900),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Klinger Middle School",'Southampton=' + Southampton.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.13046265,40.30990982),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kutz Elementary School",'Doylestown=' + Doylestown.length);
Bristol[Bristol.length] = createMarker(new GPoint(-74.86965179,40.10899353),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lafayette Elementary School",'Bristol=' + Bristol.length);
Warminster[Warminster.length] = createMarker(new GPoint(-75.11533356,40.20235825),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Leary Elementary School",'Warminster=' + Warminster.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.13751221,40.30757904),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lenape Middle School",'Doylestown=' + Doylestown.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.88081360,40.13444138),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Levittown=' + Levittown.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.11782074,40.31766510),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Linden Elementary School",'Doylestown=' + Doylestown.length);
Warminster[Warminster.length] = createMarker(new GPoint(-75.10472870,40.21379471),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Log College Middle School",'Warminster=' + Warminster.length);
Warminster[Warminster.length] = createMarker(new GPoint(-75.09245300,40.21524429),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Longstreth Elementary School",'Warminster=' + Warminster.length);
Feasterville_Trevose[Feasterville_Trevose.length] = createMarker(new GPoint(-74.99317932,40.15717697),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lower Southampton Elementary School",'Feasterville_Trevose=' + Feasterville_Trevose.length);
Morrisville[Morrisville.length] = createMarker(new GPoint(-74.78089905,40.21091843),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("M R Reiter Elementary School",'Morrisville=' + Morrisville.length);
Yardley[Yardley.length] = createMarker(new GPoint(-74.81967926,40.22367477),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Makefield Elementary School",'Yardley=' + Yardley.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.81330872,40.17161179),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Manor Elementary School",'Levittown=' + Levittown.length);
Langhorne[Langhorne.length] = createMarker(new GPoint(-74.89679718,40.20486832),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Maple Point Middle School",'Langhorne=' + Langhorne.length);
Croydon[Croydon.length] = createMarker(new GPoint(-74.89694214,40.10163879),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Maple Shade Elementary School",'Croydon=' + Croydon.length);
Churchville[Churchville.length] = createMarker(new GPoint(-75.03642273,40.20429993),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Maureen M Welsh Elementary School",'Churchville=' + Churchville.length);
Warminster[Warminster.length] = createMarker(new GPoint(-75.06578064,40.18925858),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mcdonald Elementary School",'Warminster=' + Warminster.length);
Jamison[Jamison.length] = createMarker(new GPoint(-75.08449554,40.27037811),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Middle Bucks Institute Of Tech",'Jamison=' + Jamison.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.40173340,40.44644165),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Milford Middle School",'Quakertown=' + Quakertown.length);
Warrington[Warrington.length] = createMarker(new GPoint(-75.16983795,40.26398849),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mill Creek Elementary School",'Warrington=' + Warrington.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.87456512,40.14673233),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Miller Elementary School",'Levittown=' + Levittown.length);
Morrisville[Morrisville.length] = createMarker(new GPoint(-74.78820038,40.20709991),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Morrisville Boro Ms/hs",'Morrisville=' + Morrisville.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.32984161,40.44567490),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Neidig Elementary School",'Quakertown=' + Quakertown.length);
Langhorne[Langhorne.length] = createMarker(new GPoint(-74.94521332,40.15635300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Neshaminy High School",'Langhorne=' + Langhorne.length);
Langhorne[Langhorne.length] = createMarker(new GPoint(-74.92979431,40.20252609),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Neshaminy Middle School",'Langhorne=' + Langhorne.length);
Solebury[Solebury.length] = createMarker(new GPoint(-75.00868988,40.38130951),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("New Hope-solebury Elementary School",'Solebury=' + Solebury.length);
New_Hope[New_Hope.length] = createMarker(new GPoint(-74.95889282,40.36468887),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New Hope-solebury High School",'New_Hope=' + New_Hope.length);
New_Hope[New_Hope.length] = createMarker(new GPoint(-74.95889282,40.36468887),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("New Hope-solebury Middle School",'New_Hope=' + New_Hope.length);
New_Hope[New_Hope.length] = createMarker(new GPoint(-74.95924600,40.36463000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("New Hope-solebury Upper Elementary School",'New_Hope=' + New_Hope.length);
Newtown[Newtown.length] = createMarker(new GPoint(-74.94636536,40.25423050),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Newtown Elementary School",'Newtown=' + Newtown.length);
Newtown[Newtown.length] = createMarker(new GPoint(-74.95279694,40.22584915),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Newtown Middle School",'Newtown=' + Newtown.length);
Fairless_Hills[Fairless_Hills.length] = createMarker(new GPoint(-74.85325623,40.17811584),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oxford Valley Elementary School",'Fairless_Hills=' + Fairless_Hills.length);
Kintnersville[Kintnersville.length] = createMarker(new GPoint(-75.19757843,40.51983643),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Palisades High School",'Kintnersville=' + Kintnersville.length);
Kintnersville[Kintnersville.length] = createMarker(new GPoint(-75.20150757,40.52121353),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Palisades Middle School",'Kintnersville=' + Kintnersville.length);
Perkasie[Perkasie.length] = createMarker(new GPoint(-75.28977203,40.37976837),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Patricia A Guth Elementary School",'Perkasie=' + Perkasie.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.81694794,40.16338730),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Penn Valley Elementary School",'Levittown=' + Levittown.length);
Perkasie[Perkasie.length] = createMarker(new GPoint(-75.29198456,40.36678696),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pennridge Central Middle School",'Perkasie=' + Perkasie.length);
Perkasie[Perkasie.length] = createMarker(new GPoint(-75.27332306,40.38639450),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pennridge High School",'Perkasie=' + Perkasie.length);
Perkasie[Perkasie.length] = createMarker(new GPoint(-75.29345703,40.37091064),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pennridge South Middle School",'Perkasie=' + Perkasie.length);
Fairless_Hills[Fairless_Hills.length] = createMarker(new GPoint(-74.83864594,40.17293549),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pennsbury High School East",'Fairless_Hills=' + Fairless_Hills.length);
Fairless_Hills[Fairless_Hills.length] = createMarker(new GPoint(-74.84479523,40.17692566),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pennsbury High School West",'Fairless_Hills=' + Fairless_Hills.length);
Yardley[Yardley.length] = createMarker(new GPoint(-74.82213593,40.21157455),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pennwood Middle School",'Yardley=' + Yardley.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.44083200,40.43665800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pfaff Elementary School",'Quakertown=' + Quakertown.length);
New_Britain[New_Britain.length] = createMarker(new GPoint(-75.19460297,40.29344177),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pine Run Elementary School",'New_Britain=' + New_Britain.length);
Feasterville_Trevose[Feasterville_Trevose.length] = createMarker(new GPoint(-74.99694824,40.15092468),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Poquessing Middle School",'Feasterville_Trevose=' + Feasterville_Trevose.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.34703900,40.43415300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Quakertown Community Freshmen",'Quakertown=' + Quakertown.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.34249115,40.43727875),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Quakertown Community Senior High School",'Quakertown=' + Quakertown.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.34339905,40.43917847),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Quakertown Elementary School",'Quakertown=' + Quakertown.length);
Yardley[Yardley.length] = createMarker(new GPoint(-74.87536621,40.24555969),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Quarry Hill Elementary School",'Yardley=' + Yardley.length);
Richboro[Richboro.length] = createMarker(new GPoint(-75.00460052,40.20923615),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Richboro Elementary School",'Richboro=' + Richboro.length);
Richboro[Richboro.length] = createMarker(new GPoint(-75.00533295,40.20896149),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Richboro Middle School",'Richboro=' + Richboro.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.32533264,40.43688583),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Richland Elementary School",'Quakertown=' + Quakertown.length);
Holland[Holland.length] = createMarker(new GPoint(-74.96839905,40.20754623),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rolling Hills Elementary School",'Holland=' + Holland.length);
Morrisville[Morrisville.length] = createMarker(new GPoint(-74.82723236,40.20027924),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Morrisville=' + Morrisville.length);
Bristol[Bristol.length] = createMarker(new GPoint(-74.85278320,40.10049057),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Middle School",'Bristol=' + Bristol.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.94100189,40.10251617),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rush Elementary School",'Bensalem=' + Bensalem.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.93342590,40.11335754),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Samuel K Faust Elementary School",'Bensalem=' + Bensalem.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.88599396,40.16529083),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sandburg Middle School",'Levittown=' + Levittown.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.94697571,40.07993317),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("School Lane Charter School",'Bensalem=' + Bensalem.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.88095856,40.16897964),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Schweitzer Elementary School",'Levittown=' + Levittown.length);
Sellersville[Sellersville.length] = createMarker(new GPoint(-75.30564880,40.34980011),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sellersville Elementary School",'Sellersville=' + Sellersville.length);
Perkasie[Perkasie.length] = createMarker(new GPoint(-75.25332642,40.35440445),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Seylar Elementary School",'Perkasie=' + Perkasie.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.94124603,40.10154343),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Shafer Middle School",'Bensalem=' + Bensalem.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.94158936,40.10163116),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Snyder Middle School",'Bensalem=' + Bensalem.length);
Bristol[Bristol.length] = createMarker(new GPoint(-74.85729980,40.10106277),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Snyder-girotti Elementary School",'Bristol=' + Bristol.length);
Newtown[Newtown.length] = createMarker(new GPoint(-74.93950653,40.29006577),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sol Feinstone Elementary School",'Newtown=' + Newtown.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.29261780,40.52113724),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Springfield Elementary School",'Quakertown=' + Quakertown.length);
Southampton[Southampton.length] = createMarker(new GPoint(-75.02168274,40.17540741),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stackpole Elementary School",'Southampton=' + Southampton.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.34681702,40.43423462),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Strayer Middle School",'Quakertown=' + Quakertown.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.91944122,40.09933853),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Struble Elementary School",'Bensalem=' + Bensalem.length);
Warrington[Warrington.length] = createMarker(new GPoint(-75.12786102,40.25477219),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Tamanend Middle School",'Warrington=' + Warrington.length);
Langhorne[Langhorne.length] = createMarker(new GPoint(-74.96842194,40.15805054),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tawanka Learning Center",'Langhorne=' + Langhorne.length);
Morrisville[Morrisville.length] = createMarker(new GPoint(-74.78740692,40.20766068),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Teach-the Einstein Academy Charter School",'Morrisville=' + Morrisville.length);
Pipersville[Pipersville.length] = createMarker(new GPoint(-75.13171387,40.42825699),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tinicum Elementary School",'Pipersville=' + Pipersville.length);
Warrington[Warrington.length] = createMarker(new GPoint(-75.13691711,40.23992157),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Titus Elementary School",'Warrington=' + Warrington.length);
Doylestown[Doylestown.length] = createMarker(new GPoint(-75.13349915,40.35998535),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Tohickon Middle School",'Doylestown=' + Doylestown.length);
Quakertown[Quakertown.length] = createMarker(new GPoint(-75.38146973,40.45238876),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tohickon Valley Elementary School",'Quakertown=' + Quakertown.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.85394287,40.12757874),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Truman Senior High School",'Levittown=' + Levittown.length);
Quakerstown[Quakerstown.length] = createMarker(new GPoint(-75.37647247,40.41484833),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Trumbauersville Elementary School",'Quakerstown=' + Quakerstown.length);
Chalfont[Chalfont.length] = createMarker(new GPoint(-75.19684601,40.28494644),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Unami Middle School",'Chalfont=' + Chalfont.length);
Perkasie[Perkasie.length] = createMarker(new GPoint(-75.23683929,40.43063736),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Upper Bucks County Avts",'Perkasie=' + Perkasie.length);
Bensalem[Bensalem.length] = createMarker(new GPoint(-74.92652130,40.14328766),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Valley Elementary School",'Bensalem=' + Bensalem.length);
Fairless_Hills[Fairless_Hills.length] = createMarker(new GPoint(-74.83580017,40.17671585),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Village Park School",'Fairless_Hills=' + Fairless_Hills.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.81703949,40.15319061),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Walt Disney Elementary School",'Levittown=' + Levittown.length);
Jamison[Jamison.length] = createMarker(new GPoint(-75.08174133,40.25037384),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Warwick Elementary School",'Jamison=' + Jamison.length);
Levittown[Levittown.length] = createMarker(new GPoint(-74.83848572,40.15498734),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Levittown=' + Levittown.length);
Sellersville[Sellersville.length] = createMarker(new GPoint(-75.32563019,40.36854935),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Rockhill Elementary School",'Sellersville=' + Sellersville.length);
Yardley[Yardley.length] = createMarker(new GPoint(-74.83135986,40.21146393),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("William Penn Middle School",'Yardley=' + Yardley.length);
Warminster[Warminster.length] = createMarker(new GPoint(-75.07407379,40.18426514),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("William Tennent High School",'Warminster=' + Warminster.length);
Warminster[Warminster.length] = createMarker(new GPoint(-75.10494995,40.21357346),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Willow Dale Elementary School",'Warminster=' + Warminster.length);
Wrightstown[Wrightstown.length] = createMarker(new GPoint(-74.99253845,40.26464844),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wrightstown Elementary School",'Wrightstown=' + Wrightstown.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(Bedminister);
map.removeOverlays(Bensalem);
map.removeOverlays(Bristol);
map.removeOverlays(Buckingham);
map.removeOverlays(Chalfont);
map.removeOverlays(Churchville);
map.removeOverlays(Croydon);
map.removeOverlays(Doylestown);
map.removeOverlays(Fairless_Hills);
map.removeOverlays(Fallsington);
map.removeOverlays(Feasterville);
map.removeOverlays(Feasterville_Trevose);
map.removeOverlays(Furlong);
map.removeOverlays(Holland);
map.removeOverlays(Jamison);
map.removeOverlays(Kintnersville);
map.removeOverlays(Langhorne);
map.removeOverlays(Levittown);
map.removeOverlays(Morrisville);
map.removeOverlays(New_Britain);
map.removeOverlays(New_Hope);
map.removeOverlays(Newtown);
map.removeOverlays(Perkasie);
map.removeOverlays(Pipersville);
map.removeOverlays(Quakerstown);
map.removeOverlays(Quakertown);
map.removeOverlays(Richboro);
map.removeOverlays(Sellersville);
map.removeOverlays(Solebury);
map.removeOverlays(Southampton);
map.removeOverlays(Warminster);
map.removeOverlays(Warrington);
map.removeOverlays(Wrightstown);
map.removeOverlays(Yardley);
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(Yardley);map.removeOverlays(Bedminister);
map.removeOverlays(Bensalem);
map.removeOverlays(Bristol);
map.removeOverlays(Buckingham);
map.removeOverlays(Chalfont);
map.removeOverlays(Churchville);
map.removeOverlays(Croydon);
map.removeOverlays(Doylestown);
map.removeOverlays(Fairless_Hills);
map.removeOverlays(Fallsington);
map.removeOverlays(Feasterville);
map.removeOverlays(Feasterville_Trevose);
map.removeOverlays(Furlong);
map.removeOverlays(Holland);
map.removeOverlays(Jamison);
map.removeOverlays(Kintnersville);
map.removeOverlays(Langhorne);
map.removeOverlays(Levittown);
map.removeOverlays(Morrisville);
map.removeOverlays(New_Britain);
map.removeOverlays(New_Hope);
map.removeOverlays(Newtown);
map.removeOverlays(Perkasie);
map.removeOverlays(Pipersville);
map.removeOverlays(Quakerstown);
map.removeOverlays(Quakertown);
map.removeOverlays(Richboro);
map.removeOverlays(Sellersville);
map.removeOverlays(Solebury);
map.removeOverlays(Southampton);
map.removeOverlays(Warminster);
map.removeOverlays(Warrington);
map.removeOverlays(Wrightstown);
map.removeOverlays(Yardley);
map.addOverlays(Bedminister);
centerByArray(Bedminister, false, false);
cntMarker += Bedminister.length;
map.addOverlays(Bensalem);
centerByArray(Bensalem, false, false);
cntMarker += Bensalem.length;
map.addOverlays(Bristol);
centerByArray(Bristol, false, false);
cntMarker += Bristol.length;
map.addOverlays(Buckingham);
centerByArray(Buckingham, false, false);
cntMarker += Buckingham.length;
map.addOverlays(Chalfont);
centerByArray(Chalfont, false, false);
cntMarker += Chalfont.length;
map.addOverlays(Churchville);
centerByArray(Churchville, false, false);
cntMarker += Churchville.length;
map.addOverlays(Croydon);
centerByArray(Croydon, false, false);
cntMarker += Croydon.length;
map.addOverlays(Doylestown);
centerByArray(Doylestown, false, false);
cntMarker += Doylestown.length;
map.addOverlays(Fairless_Hills);
centerByArray(Fairless_Hills, false, false);
cntMarker += Fairless_Hills.length;
map.addOverlays(Fallsington);
centerByArray(Fallsington, false, false);
cntMarker += Fallsington.length;
map.addOverlays(Feasterville);
centerByArray(Feasterville, false, false);
cntMarker += Feasterville.length;
map.addOverlays(Feasterville_Trevose);
centerByArray(Feasterville_Trevose, false, false);
cntMarker += Feasterville_Trevose.length;
map.addOverlays(Furlong);
centerByArray(Furlong, false, false);
cntMarker += Furlong.length;
map.addOverlays(Holland);
centerByArray(Holland, false, false);
cntMarker += Holland.length;
map.addOverlays(Jamison);
centerByArray(Jamison, false, false);
cntMarker += Jamison.length;
map.addOverlays(Kintnersville);
centerByArray(Kintnersville, false, false);
cntMarker += Kintnersville.length;
map.addOverlays(Langhorne);
centerByArray(Langhorne, false, false);
cntMarker += Langhorne.length;
map.addOverlays(Levittown);
centerByArray(Levittown, false, false);
cntMarker += Levittown.length;
map.addOverlays(Morrisville);
centerByArray(Morrisville, false, false);
cntMarker += Morrisville.length;
map.addOverlays(New_Britain);
centerByArray(New_Britain, false, false);
cntMarker += New_Britain.length;
map.addOverlays(New_Hope);
centerByArray(New_Hope, false, false);
cntMarker += New_Hope.length;
map.addOverlays(Newtown);
centerByArray(Newtown, false, false);
cntMarker += Newtown.length;
map.addOverlays(Perkasie);
centerByArray(Perkasie, false, false);
cntMarker += Perkasie.length;
map.addOverlays(Pipersville);
centerByArray(Pipersville, false, false);
cntMarker += Pipersville.length;
map.addOverlays(Quakerstown);
centerByArray(Quakerstown, false, false);
cntMarker += Quakerstown.length;
map.addOverlays(Quakertown);
centerByArray(Quakertown, false, false);
cntMarker += Quakertown.length;
map.addOverlays(Richboro);
centerByArray(Richboro, false, false);
cntMarker += Richboro.length;
map.addOverlays(Sellersville);
centerByArray(Sellersville, false, false);
cntMarker += Sellersville.length;
map.addOverlays(Solebury);
centerByArray(Solebury, false, false);
cntMarker += Solebury.length;
map.addOverlays(Southampton);
centerByArray(Southampton, false, false);
cntMarker += Southampton.length;
map.addOverlays(Warminster);
centerByArray(Warminster, false, false);
cntMarker += Warminster.length;
map.addOverlays(Warrington);
centerByArray(Warrington, false, false);
cntMarker += Warrington.length;
map.addOverlays(Wrightstown);
centerByArray(Wrightstown, false, false);
cntMarker += Wrightstown.length;
map.addOverlays(Yardley);
centerByArray(Yardley, false, false);
cntMarker += Yardley.length;
centerByArray(Yardley,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');
}
}