function addMarkers()
{
mySelect = document.getElementById('selection');
Acworth = [];Marietta = [];Mableton = [];Smyrna = [];Powder_Springs = [];Austell = [];Kennesaw = [];Mareitta = [];mySelect.options[mySelect.options.length] = new Option("Acworth schools",'all=Acworth');
mySelect.options[mySelect.options.length] = new Option("Austell schools",'all=Austell');
mySelect.options[mySelect.options.length] = new Option("Kennesaw schools",'all=Kennesaw');
mySelect.options[mySelect.options.length] = new Option("Mableton schools",'all=Mableton');
mySelect.options[mySelect.options.length] = new Option("Mareitta schools",'all=Mareitta');
mySelect.options[mySelect.options.length] = new Option("Marietta schools",'all=Marietta');
mySelect.options[mySelect.options.length] = new Option("Powder Springs schools",'all=Powder_Springs');
mySelect.options[mySelect.options.length] = new Option("Smyrna schools",'all=Smyrna');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Acworth[Acworth.length] = createMarker(new GPoint(-84.65428162,34.05763626),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Acworth Elementary School",'Acworth=' + Acworth.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.48989868,34.02410126),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Addison Elementary School",'Marietta=' + Marietta.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.55709839,33.81700134),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alternative Education Center/language Academy/tran",'Mableton=' + Mableton.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.47289276,33.88522339),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Argyle Elementary School",'Smyrna=' + Smyrna.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.67672729,33.82649612),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Austell Elementary School",'Powder_Springs=' + Powder_Springs.length);
Austell[Austell.length] = createMarker(new GPoint(-84.63351200,33.81576800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Austell Primary School",'Austell=' + Austell.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.64626312,34.04175186),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Awtrey Middle School",'Kennesaw=' + Kennesaw.length);
Acworth[Acworth.length] = createMarker(new GPoint(-84.62081146,34.05691910),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Baker Elementary School",'Acworth=' + Acworth.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.54822540,34.01484299),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bells Ferry Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.53518677,33.89103699),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Belmont Hills Elementary School",'Smyrna=' + Smyrna.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.59721700,34.02836600),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Big Shanty Elementary School",'Kennesaw=' + Kennesaw.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.57802582,33.88076401),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Birney Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.52754974,34.03578949),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blackwell Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.52743530,33.87395859),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brown Elementary School",'Smyrna=' + Smyrna.length);
Mareitta[Mareitta.length] = createMarker(new GPoint(-84.46736908,33.91962051),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brumby Elementary School",'Mareitta=' + Mareitta.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.57595825,33.78859329),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bryant Elementary School",'Mableton=' + Mableton.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.64199829,33.99909973),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bullard Elementary School",'Kennesaw=' + Kennesaw.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.57761383,33.94458008),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Burruss Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.52709961,33.88750076),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Campbell High School",'Smyrna=' + Smyrna.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.51409912,33.88402939),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Campbell Middle School",'Smyrna=' + Smyrna.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.55709839,33.81700134),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Central Alternative School",'Mableton=' + Mableton.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.55580902,34.04636383),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chalker Elementary School",'Kennesaw=' + Kennesaw.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.61969757,33.92131424),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cheatham Hill Elementary School",'Marietta=' + Marietta.length);
Austell[Austell.length] = createMarker(new GPoint(-84.65083313,33.84413528),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Clarkdale Elementary School",'Austell=' + Austell.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.57591248,33.80423737),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Clay Elementary School",'Mableton=' + Mableton.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.50695400,33.89062600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cobb-douglas Psychoeducational Program",'Smyrna=' + Smyrna.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.67591858,33.86979675),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Compton Elementary School",'Powder_Springs=' + Powder_Springs.length);
Austell[Austell.length] = createMarker(new GPoint(-84.63642120,33.84031296),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Cooper Middle School",'Austell=' + Austell.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.53268200,34.01923800),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Daniell Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.47937012,34.07265854),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Davis Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.41620636,33.96914673),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Dickerson Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.44293213,33.98990250),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Dodgen Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.63497162,33.90217590),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dowell Elementary School",'Marietta=' + Marietta.length);
Mareitta[Mareitta.length] = createMarker(new GPoint(-83.42610168,32.66600037),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Due West Elementary School",'Mareitta=' + Mareitta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.55704498,33.91653824),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dunleith Elementary School",'Marietta=' + Marietta.length);
Acworth[Acworth.length] = createMarker(new GPoint(-84.67690277,34.06531906),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Durham Middle School",'Acworth=' + Acworth.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.47753143,33.96087646),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("East Cobb Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.43732452,33.97783279),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("East Side Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.47858429,33.94318390),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eastvalley Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.54244232,33.91643524),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fair Oaks Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.35330200,33.95901871),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fitzhugh Lee Transitional Learning Center",'Smyrna=' + Smyrna.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.57621765,33.83727264),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Floyd Middle School",'Mableton=' + Mableton.length);
Acworth[Acworth.length] = createMarker(new GPoint(-84.71224213,33.98919678),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ford Elementary School",'Acworth=' + Acworth.length);
Acworth[Acworth.length] = createMarker(new GPoint(-84.69876099,34.02445221),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Frey Elementary School",'Acworth=' + Acworth.length);
Austell[Austell.length] = createMarker(new GPoint(-84.64587402,33.82698059),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Garrett Middle School",'Austell=' + Austell.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.43365479,34.05012512),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Garrison Mill Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.53501129,33.90384293),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Green Acres Elementary School",'Smyrna=' + Smyrna.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.51815033,33.85593796),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Griffin Middle School",'Smyrna=' + Smyrna.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.50695400,33.89062600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("H.a.v.e.n. Academy",'Smyrna=' + Smyrna.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.55860138,33.81039429),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harmony-leland Elementary School",'Mableton=' + Mableton.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.68258667,33.96512222),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Harrison High School",'Kennesaw=' + Kennesaw.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.62886047,33.99205780),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hayes Elementary School",'Kennesaw=' + Kennesaw.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.56481171,33.93883514),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hickory Hills Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.43934631,34.01563644),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hightower Trail Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.61186981,33.88270950),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hollydale Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.49496460,34.06067276),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Keheley Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.51403046,34.06702805),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kell High School",'Marietta=' + Marietta.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.68348694,33.85944748),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kemp Elementary School",'Powder_Springs=' + Powder_Springs.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.59179687,34.03860092),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kennesaw Charter School",'Kennesaw=' + Kennesaw.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.62746429,34.03504562),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kennesaw Elementary School",'Kennesaw=' + Kennesaw.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.62525177,34.00054169),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kennesaw Mountain High School",'Kennesaw=' + Kennesaw.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.51080322,34.00186157),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kincaid Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.52340698,33.85378265),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("King Springs Elementary School",'Smyrna=' + Smyrna.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.55426788,33.89599991),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Labelle Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.47196960,34.04070663),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lassiter High School",'Marietta=' + Marietta.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.67232513,34.01529694),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lewis Elementary School",'Kennesaw=' + Kennesaw.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.55590057,33.81219864),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lindley Middle School",'Mableton=' + Mableton.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.51923370,33.97103882),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lockheed Elementary School",'Marietta=' + Marietta.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.69445801,33.97044373),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lost Mountain Middle School",'Kennesaw=' + Kennesaw.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.58206177,33.82566452),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mableton Elementary School",'Mableton=' + Mableton.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.47029114,34.06092453),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mabry Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.52716064,33.94354248),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Marietta 6th Grade School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.58820500,33.94870200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Marietta High School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.55706024,33.95512009),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Marietta Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.58204500,33.91361100),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Marietta Regional Youth Detention Center",'Marietta=' + Marietta.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.55709839,33.81700134),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Martha J. Moore Transitional Learning Center",'Mableton=' + Mableton.length);
Acworth[Acworth.length] = createMarker(new GPoint(-84.68179300,34.06410700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mccall Primary School",'Acworth=' + Acworth.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.50653076,34.05035019),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mccleskey Middle School",'Marietta=' + Marietta.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.67257690,33.90248108),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mceachern High School",'Powder_Springs=' + Powder_Springs.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.57670593,33.89521027),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Milford Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.42008972,33.97918320),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mount Bethel Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.46404266,34.03449631),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.46313477,34.00689697),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Murdock Elementary School",'Marietta=' + Marietta.length);
Acworth[Acworth.length] = createMarker(new GPoint(-84.65457200,34.05889000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Murray F. Barber Middle School",'Acworth=' + Acworth.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.50604248,34.05093384),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nicholson Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.51753235,33.84209824),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nickajack Elementary School",'Smyrna=' + Smyrna.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.64720917,34.03766251),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North Cobb High School",'Kennesaw=' + Kennesaw.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.55136108,33.87947464),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Norton Park Elementary School",'Smyrna=' + Smyrna.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.54496765,33.91481400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oakwood High School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.56649780,33.89165497),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Osborne High School",'Marietta=' + Marietta.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.56980896,34.05072784),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Palmer Middle School",'Kennesaw=' + Kennesaw.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.53303528,33.94898987),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Park Street Elementary School",'Marietta=' + Marietta.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.58282471,33.80739975),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pebblebrook High School",'Mableton=' + Mableton.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.52683258,33.94430542),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pine Forest Elementary School",'Marietta=' + Marietta.length);
Kennesaw[Kennesaw.length] = createMarker(new GPoint(-84.63287354,33.98694611),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pine Mountain Middle School",'Kennesaw=' + Kennesaw.length);
Acworth[Acworth.length] = createMarker(new GPoint(-84.64096069,34.12005997),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pitner Elementary School",'Acworth=' + Acworth.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.45141602,34.02200699),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pope High School",'Marietta=' + Marietta.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.67998505,33.85213852),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Powder Springs Elementary School",'Powder_Springs=' + Powder_Springs.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.49592590,33.94338226),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Powers Ferry Elementary School",'Marietta=' + Marietta.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.56281281,33.79096603),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Riverside Elementary School",'Mableton=' + Mableton.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.56866500,33.78936100),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Riverside Primary School",'Mableton=' + Mableton.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.47814941,34.04895401),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rocky Mount Elementary School",'Marietta=' + Marietta.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.56890106,33.86429977),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Russell Elementary School",'Smyrna=' + Smyrna.length);
Austell[Austell.length] = createMarker(new GPoint(-84.59876251,33.84763718),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sanders Elementary School",'Austell=' + Austell.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.52747000,33.98632700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sawyer Road Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.48736572,33.94715500),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sedalia Park Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.43683624,34.03173828),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shallowford Falls Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.48073578,34.03163528),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Simpson Middle School",'Marietta=' + Marietta.length);
Mableton[Mableton.length] = createMarker(new GPoint(-84.58889771,33.81263351),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sky View Elementary School",'Mableton=' + Mableton.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.61233521,33.89010239),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Smitha Middle School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.45395660,33.93686295),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sope Creek Elementary School",'Marietta=' + Marietta.length);
Austell[Austell.length] = createMarker(new GPoint(-84.61370850,33.83333588),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South Cobb High School",'Austell=' + Austell.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.49619293,34.01212692),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sprayberry High School",'Marietta=' + Marietta.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.66206360,33.93278122),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Still Elementary School",'Powder_Springs=' + Powder_Springs.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.66899109,33.87530136),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Tapp Middle School",'Powder_Springs=' + Powder_Springs.length);
Smyrna[Smyrna.length] = createMarker(new GPoint(-84.48694611,33.86439133),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Teasley Elementary School",'Smyrna=' + Smyrna.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.40494537,33.99378586),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Timber Ridge Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.42104340,34.01666641),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tritt Elementary School",'Marietta=' + Marietta.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.69268036,33.89541626),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Varner Elementary School",'Powder_Springs=' + Powder_Springs.length);
Powder_Springs[Powder_Springs.length] = createMarker(new GPoint(-84.72394562,33.95944595),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vaughan Elementary School",'Powder_Springs=' + Powder_Springs.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.44053650,33.98754120),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Walton High School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.56250763,33.95563889),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Side Elementary School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.47786713,33.96079254),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wheeler High School",'Marietta=' + Marietta.length);
Marietta[Marietta.length] = createMarker(new GPoint(-84.51222229,33.98633957),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Woods-wilkins Alternative Center",'Marietta=' + Marietta.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(Acworth);
map.removeOverlays(Austell);
map.removeOverlays(Kennesaw);
map.removeOverlays(Mableton);
map.removeOverlays(Mareitta);
map.removeOverlays(Marietta);
map.removeOverlays(Powder_Springs);
map.removeOverlays(Smyrna);
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(Acworth);map.removeOverlays(Acworth);
map.removeOverlays(Austell);
map.removeOverlays(Kennesaw);
map.removeOverlays(Mableton);
map.removeOverlays(Mareitta);
map.removeOverlays(Marietta);
map.removeOverlays(Powder_Springs);
map.removeOverlays(Smyrna);
map.addOverlays(Acworth);
centerByArray(Acworth, false, false);
cntMarker += Acworth.length;
map.addOverlays(Austell);
centerByArray(Austell, false, false);
cntMarker += Austell.length;
map.addOverlays(Kennesaw);
centerByArray(Kennesaw, false, false);
cntMarker += Kennesaw.length;
map.addOverlays(Mableton);
centerByArray(Mableton, false, false);
cntMarker += Mableton.length;
map.addOverlays(Mareitta);
centerByArray(Mareitta, false, false);
cntMarker += Mareitta.length;
map.addOverlays(Marietta);
centerByArray(Marietta, false, false);
cntMarker += Marietta.length;
map.addOverlays(Powder_Springs);
centerByArray(Powder_Springs, false, false);
cntMarker += Powder_Springs.length;
map.addOverlays(Smyrna);
centerByArray(Smyrna, false, false);
cntMarker += Smyrna.length;
centerByArray(Acworth,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');
}
}