function addMarkers()
{
mySelect = document.getElementById('selection');
Colchester = [];New_London = [];Norwich = [];Mystic = [];Old_Lyme = [];Groton = [];Waterford = [];Uncasville = [];Stonington = [];Oakdale = [];East_Lyme = [];Niantic = [];Bozrah = [];North_Franklin = [];Gales_Ferry = [];Ledyard = [];Griswold = [];Lebanon = [];Lisbon = [];Lyme = [];Montville = [];Noank = [];North_Stoningt = [];Pawcatuck = [];Preston = [];Quaker_Hill = [];Salem = [];Baltic = [];Old_Mystic = [];Voluntown = [];Taftville = [];mySelect.options[mySelect.options.length] = new Option("Baltic schools",'all=Baltic');
mySelect.options[mySelect.options.length] = new Option("Bozrah schools",'all=Bozrah');
mySelect.options[mySelect.options.length] = new Option("Colchester schools",'all=Colchester');
mySelect.options[mySelect.options.length] = new Option("East Lyme schools",'all=East_Lyme');
mySelect.options[mySelect.options.length] = new Option("Gales Ferry schools",'all=Gales_Ferry');
mySelect.options[mySelect.options.length] = new Option("Griswold schools",'all=Griswold');
mySelect.options[mySelect.options.length] = new Option("Groton schools",'all=Groton');
mySelect.options[mySelect.options.length] = new Option("Lebanon schools",'all=Lebanon');
mySelect.options[mySelect.options.length] = new Option("Ledyard schools",'all=Ledyard');
mySelect.options[mySelect.options.length] = new Option("Lisbon schools",'all=Lisbon');
mySelect.options[mySelect.options.length] = new Option("Lyme schools",'all=Lyme');
mySelect.options[mySelect.options.length] = new Option("Montville schools",'all=Montville');
mySelect.options[mySelect.options.length] = new Option("Mystic schools",'all=Mystic');
mySelect.options[mySelect.options.length] = new Option("New London schools",'all=New_London');
mySelect.options[mySelect.options.length] = new Option("Niantic schools",'all=Niantic');
mySelect.options[mySelect.options.length] = new Option("Noank schools",'all=Noank');
mySelect.options[mySelect.options.length] = new Option("North Franklin schools",'all=North_Franklin');
mySelect.options[mySelect.options.length] = new Option("North Stoningt schools",'all=North_Stoningt');
mySelect.options[mySelect.options.length] = new Option("Norwich schools",'all=Norwich');
mySelect.options[mySelect.options.length] = new Option("Oakdale schools",'all=Oakdale');
mySelect.options[mySelect.options.length] = new Option("Old Lyme schools",'all=Old_Lyme');
mySelect.options[mySelect.options.length] = new Option("Old Mystic schools",'all=Old_Mystic');
mySelect.options[mySelect.options.length] = new Option("Pawcatuck schools",'all=Pawcatuck');
mySelect.options[mySelect.options.length] = new Option("Preston schools",'all=Preston');
mySelect.options[mySelect.options.length] = new Option("Quaker Hill schools",'all=Quaker_Hill');
mySelect.options[mySelect.options.length] = new Option("Salem schools",'all=Salem');
mySelect.options[mySelect.options.length] = new Option("Stonington schools",'all=Stonington');
mySelect.options[mySelect.options.length] = new Option("Taftville schools",'all=Taftville');
mySelect.options[mySelect.options.length] = new Option("Uncasville schools",'all=Uncasville');
mySelect.options[mySelect.options.length] = new Option("Voluntown schools",'all=Voluntown');
mySelect.options[mySelect.options.length] = new Option("Waterford schools",'all=Waterford');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Colchester[Colchester.length] = createMarker(new GPoint(-72.29212952,41.57518768),"
",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bacon Academy",'Colchester=' + Colchester.length);
Colchester[Colchester.length] = createMarker(new GPoint(-72.29212952,41.57518768),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bacon Academy Preschool Program",'Colchester=' + Colchester.length);
New_London[New_London.length] = createMarker(new GPoint(-72.10667419,41.35826492),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bennie Dover Jackson Middle School",'New_London=' + New_London.length);
New_London[New_London.length] = createMarker(new GPoint(-72.05783700,41.37689800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bennie Dover Jackson Middle School",'New_London=' + New_London.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.09780884,41.51752853),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bishop School",'Norwich=' + Norwich.length);
Mystic[Mystic.length] = createMarker(new GPoint(-71.99898529,41.34481430),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Carl C. Cutler Middle School",'Mystic=' + Mystic.length);
Old_Lyme[Old_Lyme.length] = createMarker(new GPoint(-72.32971191,41.31705475),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Center School",'Old_Lyme=' + Old_Lyme.length);
Groton[Groton.length] = createMarker(new GPoint(-72.06926727,41.38381577),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Charles Barnum School",'Groton=' + Groton.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.12841034,41.34976578),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Clark Lane Middle School",'Waterford=' + Waterford.length);
Groton[Groton.length] = createMarker(new GPoint(-72.02645111,41.34662247),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Claude Chester School",'Groton=' + Groton.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.13961792,41.37599945),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cohanzie Elementary School",'Waterford=' + Waterford.length);
Colchester[Colchester.length] = createMarker(new GPoint(-72.30944824,41.57381821),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Colchester Intermediate School",'Colchester=' + Colchester.length);
Groton[Groton.length] = createMarker(new GPoint(-72.07163239,41.34798431),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Colonel Ledyard School",'Groton=' + Groton.length);
Uncasville[Uncasville.length] = createMarker(new GPoint(-72.10748291,41.45241165),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Corrigan Correctional Institute High School",'Uncasville=' + Uncasville.length);
Stonington[Stonington.length] = createMarker(new GPoint(-71.92352295,41.36215591),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Deans Mill School",'Stonington=' + Stonington.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.08450317,41.53609848),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Deborah-tennant Zinewicz School",'Norwich=' + Norwich.length);
Oakdale[Oakdale.length] = createMarker(new GPoint(-72.19554901,41.44943619),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dr. Charles E. Murphy School",'Oakdale=' + Oakdale.length);
East_Lyme[East_Lyme.length] = createMarker(new GPoint(-72.22730255,41.36709976),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("East Lyme High School",'East_Lyme=' + East_Lyme.length);
Niantic[Niantic.length] = createMarker(new GPoint(-72.21192169,41.34639740),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("East Lyme Middle School",'Niantic=' + Niantic.length);
Groton[Groton.length] = createMarker(new GPoint(-72.07280731,41.33638000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eastern Point School",'Groton=' + Groton.length);
New_London[New_London.length] = createMarker(new GPoint(-72.91609192,41.38183212),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Edgerton School",'New_London=' + New_London.length);
Groton[Groton.length] = createMarker(new GPoint(-72.02203369,41.34695053),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ella T. Grasso Southeastern High School",'Groton=' + Groton.length);
Bozrah[Bozrah.length] = createMarker(new GPoint(-72.17089844,41.54610062),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fields Memorial School",'Bozrah=' + Bozrah.length);
Groton[Groton.length] = createMarker(new GPoint(-72.01531219,41.34618378),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Fitch Middle School",'Groton=' + Groton.length);
Groton[Groton.length] = createMarker(new GPoint(-72.01033783,41.34318161),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fitch Senior High School",'Groton=' + Groton.length);
East_Lyme[East_Lyme.length] = createMarker(new GPoint(-72.22730255,41.36709976),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Flanders School",'East_Lyme=' + East_Lyme.length);
North_Franklin[North_Franklin.length] = createMarker(new GPoint(-72.12958527,41.63303375),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Franklin Elementary School",'North_Franklin=' + North_Franklin.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.13372000,41.34163800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Friendship School",'Waterford=' + Waterford.length);
Gales_Ferry[Gales_Ferry.length] = createMarker(new GPoint(-72.08402252,41.42807388),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gales Ferry School",'Gales_Ferry=' + Gales_Ferry.length);
Ledyard[Ledyard.length] = createMarker(new GPoint(-71.97639465,41.42692184),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gallup Hill School",'Ledyard=' + Ledyard.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.06127930,41.53306961),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greeneville School",'Norwich=' + Norwich.length);
Griswold[Griswold.length] = createMarker(new GPoint(-71.97792053,41.59628296),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Griswold Elementary School",'Griswold=' + Griswold.length);
Griswold[Griswold.length] = createMarker(new GPoint(-71.97944641,41.59833908),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Griswold Intermediate School",'Griswold=' + Griswold.length);
Griswold[Griswold.length] = createMarker(new GPoint(-71.97792053,41.59628296),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Griswold Middle School",'Griswold=' + Griswold.length);
Griswold[Griswold.length] = createMarker(new GPoint(-71.97792053,41.59628296),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Griswold Senior High School",'Griswold=' + Griswold.length);
Groton[Groton.length] = createMarker(new GPoint(-72.07966614,41.35585403),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Groton Heights School",'Groton=' + Groton.length);
New_London[New_London.length] = createMarker(new GPoint(-72.10257721,41.33445740),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harbor School",'New_London=' + New_London.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.06062317,41.53094864),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hickory Street School",'Norwich=' + Norwich.length);
Ledyard[Ledyard.length] = createMarker(new GPoint(-71.99340057,41.44860077),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Homebound",'Ledyard=' + Ledyard.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.14890289,41.34870148),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Homebound",'Waterford=' + Waterford.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.08450317,41.53609848),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Homebound High School",'Norwich=' + Norwich.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.07642365,41.51115036),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Integrated Day Charter School",'Norwich=' + Norwich.length);
New_London[New_London.length] = createMarker(new GPoint(-72.10002899,41.35586166),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Interdistrict School For Arts And Communication",'New_London=' + New_London.length);
Niantic[Niantic.length] = createMarker(new GPoint(-72.24103546,41.32018280),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("J. B. Gates Correctional Unit High School",'Niantic=' + Niantic.length);
Colchester[Colchester.length] = createMarker(new GPoint(-72.32076263,41.57139587),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jack Jackter Elementary School",'Colchester=' + Colchester.length);
New_London[New_London.length] = createMarker(new GPoint(-72.10442352,41.35673141),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jennings School",'New_London=' + New_London.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.10323334,41.52273560),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John B. Stanton School",'Norwich=' + Norwich.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.06529999,41.57277679),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John M. Moriarty School",'Norwich=' + Norwich.length);
Gales_Ferry[Gales_Ferry.length] = createMarker(new GPoint(-72.06977081,41.45355225),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Juliet W. Long School",'Gales_Ferry=' + Gales_Ferry.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.07801819,41.54656219),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Kelly Middle School",'Norwich=' + Norwich.length);
Old_Lyme[Old_Lyme.length] = createMarker(new GPoint(-72.26685333,41.31760788),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Learn Pre-kindergarten Program",'Old_Lyme=' + Old_Lyme.length);
Old_Lyme[Old_Lyme.length] = createMarker(new GPoint(-72.27372742,41.31549835),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Learn Special Education",'Old_Lyme=' + Old_Lyme.length);
Lebanon[Lebanon.length] = createMarker(new GPoint(-72.20600891,41.64146805),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lebanon Elementary School",'Lebanon=' + Lebanon.length);
Lebanon[Lebanon.length] = createMarker(new GPoint(-72.23744202,41.62676239),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lebanon Middle School",'Lebanon=' + Lebanon.length);
Ledyard[Ledyard.length] = createMarker(new GPoint(-72.01638031,41.44182968),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ledyard Center School",'Ledyard=' + Ledyard.length);
Ledyard[Ledyard.length] = createMarker(new GPoint(-71.98149109,41.41350937),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ledyard High School",'Ledyard=' + Ledyard.length);
Gales_Ferry[Gales_Ferry.length] = createMarker(new GPoint(-72.06884003,41.45442581),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Ledyard Middle School",'Gales_Ferry=' + Gales_Ferry.length);
Oakdale[Oakdale.length] = createMarker(new GPoint(-72.17036438,41.45745850),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Leonard J. Tyl Middle School",'Oakdale=' + Oakdale.length);
Niantic[Niantic.length] = createMarker(new GPoint(-72.21320343,41.34643555),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lillie B. Haynes School",'Niantic=' + Niantic.length);
Lisbon[Lisbon.length] = createMarker(new GPoint(-72.01177500,41.60701600),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lisbon Central School",'Lisbon=' + Lisbon.length);
New_London[New_London.length] = createMarker(new GPoint(-72.11423492,41.37187195),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Little Red Schoolhouse Elementary School",'New_London=' + New_London.length);
Lebanon[Lebanon.length] = createMarker(new GPoint(-72.23988342,41.62589645),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lyman Memorial High School",'Lebanon=' + Lebanon.length);
Lyme[Lyme.length] = createMarker(new GPoint(-72.30599976,41.32960129),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lyme Consolidated School",'Lyme=' + Lyme.length);
Old_Lyme[Old_Lyme.length] = createMarker(new GPoint(-72.32922363,41.31969833),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lyme-old Lyme High School",'Old_Lyme=' + Old_Lyme.length);
Old_Lyme[Old_Lyme.length] = createMarker(new GPoint(-72.32963562,41.31747055),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lyme-old Lyme Middle School",'Old_Lyme=' + Old_Lyme.length);
Groton[Groton.length] = createMarker(new GPoint(-72.06671143,41.37132645),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mary Morrisson School",'Groton=' + Groton.length);
Old_Lyme[Old_Lyme.length] = createMarker(new GPoint(-72.29357910,41.30715942),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mile Creek School",'Old_Lyme=' + Old_Lyme.length);
Uncasville[Uncasville.length] = createMarker(new GPoint(-72.09488678,41.47707748),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mohegan School",'Uncasville=' + Uncasville.length);
Montville[Montville.length] = createMarker(new GPoint(-72.12898254,41.44947052),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Montville Alternate Education High School",'Montville=' + Montville.length);
Oakdale[Oakdale.length] = createMarker(new GPoint(-72.19886017,41.47957993),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Montville High School",'Oakdale=' + Oakdale.length);
New_London[New_London.length] = createMarker(new GPoint(-72.09951782,41.35849762),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Multicultural Magnet School",'New_London=' + New_London.length);
Mystic[Mystic.length] = createMarker(new GPoint(-71.94400787,41.35916901),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mystic Middle School",'Mystic=' + Mystic.length);
New_London[New_London.length] = createMarker(new GPoint(-72.09979248,41.32133484),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nathan Hale School",'New_London=' + New_London.length);
New_London[New_London.length] = createMarker(new GPoint(-72.05783700,41.37689800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New London Clinical Day Pro",'New_London=' + New_London.length);
New_London[New_London.length] = createMarker(new GPoint(-72.12290955,41.36032486),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New London High School",'New_London=' + New_London.length);
New_London[New_London.length] = createMarker(new GPoint(-72.10430145,41.35200119),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New London Pre-k Program At High School",'New_London=' + New_London.length);
Niantic[Niantic.length] = createMarker(new GPoint(-72.20349121,41.32196426),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Niantic Center School",'Niantic=' + Niantic.length);
Noank[Noank.length] = createMarker(new GPoint(-71.99487305,41.32725525),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Noank School",'Noank=' + Noank.length);
North_Stoningt[North_Stoningt.length] = createMarker(new GPoint(-71.89112854,41.44332123),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Stonington Elementary School",'North_Stoningt=' + North_Stoningt.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.08326721,41.53653717),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Norwich Free Academy",'Norwich=' + Norwich.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.07669830,41.54981232),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Norwich High School",'Norwich=' + Norwich.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.10456848,41.50884628),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Norwich Vocational School",'Norwich=' + Norwich.length);
Oakdale[Oakdale.length] = createMarker(new GPoint(-72.15818787,41.46612930),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oakdale School",'Oakdale=' + Oakdale.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.17671967,41.36019516),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oswegatchie Elementary School",'Waterford=' + Waterford.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.13167572,41.34200668),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Parent Resource & Exceptional Preschool",'Waterford=' + Waterford.length);
Pawcatuck[Pawcatuck.length] = createMarker(new GPoint(-71.84318542,41.37081146),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pawcatuck Middle School",'Pawcatuck=' + Pawcatuck.length);
Groton[Groton.length] = createMarker(new GPoint(-72.07567596,41.37492371),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pleasant Valley School",'Groton=' + Groton.length);
Preston[Preston.length] = createMarker(new GPoint(-71.98462677,41.52876663),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Preston City School",'Preston=' + Preston.length);
Preston[Preston.length] = createMarker(new GPoint(-71.98426056,41.48825073),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Preston Plains School",'Preston=' + Preston.length);
Preston[Preston.length] = createMarker(new GPoint(-71.98922500,41.48727400),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Preston Veterans' Memorial School",'Preston=' + Preston.length);
Quaker_Hill[Quaker_Hill.length] = createMarker(new GPoint(-72.11247253,41.40232468),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Quaker Hill Elementary School",'Quaker_Hill=' + Quaker_Hill.length);
Uncasville[Uncasville.length] = createMarker(new GPoint(-72.10749817,41.45234680),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Radgowski Community Correctional Center",'Uncasville=' + Uncasville.length);
Mystic[Mystic.length] = createMarker(new GPoint(-71.98245239,41.34896469),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("S. B. Butler School",'Mystic=' + Mystic.length);
Salem[Salem.length] = createMarker(new GPoint(-72.27441406,41.48675537),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Salem Elementary School",'Salem=' + Salem.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.10145569,41.55061722),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Samuel Huntington School",'Norwich=' + Norwich.length);
Baltic[Baltic.length] = createMarker(new GPoint(-72.08371735,41.62059784),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sayles Elementary School",'Baltic=' + Baltic.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.16893768,41.33366013),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Southwest Elementary School",'Waterford=' + Waterford.length);
Old_Mystic[Old_Mystic.length] = createMarker(new GPoint(-71.95780945,41.39446640),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Special Needs Preschool Program",'Old_Mystic=' + Old_Mystic.length);
Pawcatuck[Pawcatuck.length] = createMarker(new GPoint(-71.86058044,41.36888504),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Stonington High School",'Pawcatuck=' + Pawcatuck.length);
Norwich[Norwich.length] = createMarker(new GPoint(-80.35080000,25.75748100),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Teachers' Memorial Middle School",'Norwich=' + Norwich.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.11073303,41.51222992),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Thomas W. Mahan School",'Norwich=' + Norwich.length);
New_London[New_London.length] = createMarker(new GPoint(-72.11051178,41.37076950),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Title I Preschool Program",'New_London=' + New_London.length);
Norwich[Norwich.length] = createMarker(new GPoint(-82.47956085,28.26277351),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Uncas School",'Norwich=' + Norwich.length);
Norwich[Norwich.length] = createMarker(new GPoint(-80.21632500,25.75363200),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Veterans' Memorial School",'Norwich=' + Norwich.length);
Voluntown[Voluntown.length] = createMarker(new GPoint(-71.83300018,41.58269882),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Voluntown Elementary School",'Voluntown=' + Voluntown.length);
Waterford[Waterford.length] = createMarker(new GPoint(-72.13230896,41.34188080),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Waterford High School",'Waterford=' + Waterford.length);
Taftville[Taftville.length] = createMarker(new GPoint(-72.05387115,41.56898499),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wequonnoc School",'Taftville=' + Taftville.length);
Pawcatuck[Pawcatuck.length] = createMarker(new GPoint(-71.83768463,41.37612534),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Broad Street School",'Pawcatuck=' + Pawcatuck.length);
Groton[Groton.length] = createMarker(new GPoint(-72.06785583,41.33896637),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("West Side Middle School",'Groton=' + Groton.length);
Pawcatuck[Pawcatuck.length] = createMarker(new GPoint(-71.83644867,41.38578033),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Vine Street School",'Pawcatuck=' + Pawcatuck.length);
North_Stoningt[North_Stoningt.length] = createMarker(new GPoint(-71.88562012,41.43917084),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wheeler High School",'North_Stoningt=' + North_Stoningt.length);
North_Stoningt[North_Stoningt.length] = createMarker(new GPoint(-71.88562012,41.43917084),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Wheeler Middle School",'North_Stoningt=' + North_Stoningt.length);
Norwich[Norwich.length] = createMarker(new GPoint(-72.08107758,41.53105927),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William A. Buckingham School",'Norwich=' + Norwich.length);
Colchester[Colchester.length] = createMarker(new GPoint(-72.30984497,41.57382965),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("William J. Johnston School",'Colchester=' + Colchester.length);
Groton[Groton.length] = createMarker(new GPoint(-72.07382965,41.36699677),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William Seely School",'Groton=' + Groton.length);
New_London[New_London.length] = createMarker(new GPoint(-72.09978485,41.36766052),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Winthrop School",'New_London=' + New_London.length);
Niantic[Niantic.length] = createMarker(new GPoint(-72.23826599,41.31787109),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("York Correctional Institute High School",'Niantic=' + Niantic.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(Baltic);
map.removeOverlays(Bozrah);
map.removeOverlays(Colchester);
map.removeOverlays(East_Lyme);
map.removeOverlays(Gales_Ferry);
map.removeOverlays(Griswold);
map.removeOverlays(Groton);
map.removeOverlays(Lebanon);
map.removeOverlays(Ledyard);
map.removeOverlays(Lisbon);
map.removeOverlays(Lyme);
map.removeOverlays(Montville);
map.removeOverlays(Mystic);
map.removeOverlays(New_London);
map.removeOverlays(Niantic);
map.removeOverlays(Noank);
map.removeOverlays(North_Franklin);
map.removeOverlays(North_Stoningt);
map.removeOverlays(Norwich);
map.removeOverlays(Oakdale);
map.removeOverlays(Old_Lyme);
map.removeOverlays(Old_Mystic);
map.removeOverlays(Pawcatuck);
map.removeOverlays(Preston);
map.removeOverlays(Quaker_Hill);
map.removeOverlays(Salem);
map.removeOverlays(Stonington);
map.removeOverlays(Taftville);
map.removeOverlays(Uncasville);
map.removeOverlays(Voluntown);
map.removeOverlays(Waterford);
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(Colchester);map.removeOverlays(Baltic);
map.removeOverlays(Bozrah);
map.removeOverlays(Colchester);
map.removeOverlays(East_Lyme);
map.removeOverlays(Gales_Ferry);
map.removeOverlays(Griswold);
map.removeOverlays(Groton);
map.removeOverlays(Lebanon);
map.removeOverlays(Ledyard);
map.removeOverlays(Lisbon);
map.removeOverlays(Lyme);
map.removeOverlays(Montville);
map.removeOverlays(Mystic);
map.removeOverlays(New_London);
map.removeOverlays(Niantic);
map.removeOverlays(Noank);
map.removeOverlays(North_Franklin);
map.removeOverlays(North_Stoningt);
map.removeOverlays(Norwich);
map.removeOverlays(Oakdale);
map.removeOverlays(Old_Lyme);
map.removeOverlays(Old_Mystic);
map.removeOverlays(Pawcatuck);
map.removeOverlays(Preston);
map.removeOverlays(Quaker_Hill);
map.removeOverlays(Salem);
map.removeOverlays(Stonington);
map.removeOverlays(Taftville);
map.removeOverlays(Uncasville);
map.removeOverlays(Voluntown);
map.removeOverlays(Waterford);
map.addOverlays(Baltic);
centerByArray(Baltic, false, false);
cntMarker += Baltic.length;
map.addOverlays(Bozrah);
centerByArray(Bozrah, false, false);
cntMarker += Bozrah.length;
map.addOverlays(Colchester);
centerByArray(Colchester, false, false);
cntMarker += Colchester.length;
map.addOverlays(East_Lyme);
centerByArray(East_Lyme, false, false);
cntMarker += East_Lyme.length;
map.addOverlays(Gales_Ferry);
centerByArray(Gales_Ferry, false, false);
cntMarker += Gales_Ferry.length;
map.addOverlays(Griswold);
centerByArray(Griswold, false, false);
cntMarker += Griswold.length;
map.addOverlays(Groton);
centerByArray(Groton, false, false);
cntMarker += Groton.length;
map.addOverlays(Lebanon);
centerByArray(Lebanon, false, false);
cntMarker += Lebanon.length;
map.addOverlays(Ledyard);
centerByArray(Ledyard, false, false);
cntMarker += Ledyard.length;
map.addOverlays(Lisbon);
centerByArray(Lisbon, false, false);
cntMarker += Lisbon.length;
map.addOverlays(Lyme);
centerByArray(Lyme, false, false);
cntMarker += Lyme.length;
map.addOverlays(Montville);
centerByArray(Montville, false, false);
cntMarker += Montville.length;
map.addOverlays(Mystic);
centerByArray(Mystic, false, false);
cntMarker += Mystic.length;
map.addOverlays(New_London);
centerByArray(New_London, false, false);
cntMarker += New_London.length;
map.addOverlays(Niantic);
centerByArray(Niantic, false, false);
cntMarker += Niantic.length;
map.addOverlays(Noank);
centerByArray(Noank, false, false);
cntMarker += Noank.length;
map.addOverlays(North_Franklin);
centerByArray(North_Franklin, false, false);
cntMarker += North_Franklin.length;
map.addOverlays(North_Stoningt);
centerByArray(North_Stoningt, false, false);
cntMarker += North_Stoningt.length;
map.addOverlays(Norwich);
centerByArray(Norwich, false, false);
cntMarker += Norwich.length;
map.addOverlays(Oakdale);
centerByArray(Oakdale, false, false);
cntMarker += Oakdale.length;
map.addOverlays(Old_Lyme);
centerByArray(Old_Lyme, false, false);
cntMarker += Old_Lyme.length;
map.addOverlays(Old_Mystic);
centerByArray(Old_Mystic, false, false);
cntMarker += Old_Mystic.length;
map.addOverlays(Pawcatuck);
centerByArray(Pawcatuck, false, false);
cntMarker += Pawcatuck.length;
map.addOverlays(Preston);
centerByArray(Preston, false, false);
cntMarker += Preston.length;
map.addOverlays(Quaker_Hill);
centerByArray(Quaker_Hill, false, false);
cntMarker += Quaker_Hill.length;
map.addOverlays(Salem);
centerByArray(Salem, false, false);
cntMarker += Salem.length;
map.addOverlays(Stonington);
centerByArray(Stonington, false, false);
cntMarker += Stonington.length;
map.addOverlays(Taftville);
centerByArray(Taftville, false, false);
cntMarker += Taftville.length;
map.addOverlays(Uncasville);
centerByArray(Uncasville, false, false);
cntMarker += Uncasville.length;
map.addOverlays(Voluntown);
centerByArray(Voluntown, false, false);
cntMarker += Voluntown.length;
map.addOverlays(Waterford);
centerByArray(Waterford, false, false);
cntMarker += Waterford.length;
centerByArray(Colchester,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');
}
}