function addMarkers()
{
mySelect = document.getElementById('selection');
Whites_Creek = [];Madison = [];Old_Hickory = [];Antioch = [];Nashville = [];Hermitage = [];Goodlettsville = [];Brentwood = [];Joelton = [];Ridgetop = [];mySelect.options[mySelect.options.length] = new Option("Antioch schools",'all=Antioch');
mySelect.options[mySelect.options.length] = new Option("Brentwood schools",'all=Brentwood');
mySelect.options[mySelect.options.length] = new Option("Goodlettsville schools",'all=Goodlettsville');
mySelect.options[mySelect.options.length] = new Option("Hermitage schools",'all=Hermitage');
mySelect.options[mySelect.options.length] = new Option("Joelton schools",'all=Joelton');
mySelect.options[mySelect.options.length] = new Option("Madison schools",'all=Madison');
mySelect.options[mySelect.options.length] = new Option("Nashville schools",'all=Nashville');
mySelect.options[mySelect.options.length] = new Option("Old Hickory schools",'all=Old_Hickory');
mySelect.options[mySelect.options.length] = new Option("Ridgetop schools",'all=Ridgetop');
mySelect.options[mySelect.options.length] = new Option("Whites Creek schools",'all=Whites_Creek');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Whites_Creek[Whites_Creek.length] = createMarker(new GPoint(-86.83152008,36.25258636),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Alex Green Elementary School",'Whites_Creek=' + Whites_Creek.length);
Madison[Madison.length] = createMarker(new GPoint(-86.70481873,36.27333832),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Amqui Elementary School",'Madison=' + Madison.length);
Old_Hickory[Old_Hickory.length] = createMarker(new GPoint(-86.62453461,36.23228073),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Andrew Jackson Elementary School",'Old_Hickory=' + Old_Hickory.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.60022736,36.04724884),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Antioch High School",'Antioch=' + Antioch.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.67223358,36.05626678),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Antioch Middle School",'Antioch=' + Antioch.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.66272736,36.06722641),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Apollo Middle School",'Antioch=' + Antioch.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.73345947,36.18904114),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bailey Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.93462372,36.07183075),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bellevue Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.76065826,36.26901245),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bellshire Design Center",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75637054,36.12276077),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Berry Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.74893188,36.07648849),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Binkley Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.83343506,36.19107056),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bordeaux Enhanced Option Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78186035,36.21876907),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Brick Church Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.90341187,36.12763977),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brookmeade Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Buena Vista / Jones Paideia Magnet Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80480194,36.17630005),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Buena Vista Enhanced Option Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("C Lawrence Magnet School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.76891327,36.17979431),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Caldwell Enhanced Option Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Cameron Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80069733,36.10868073),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Carter Lawrence Elementary Magnet School",'Nashville=' + Nashville.length);
Madison[Madison.length] = createMarker(new GPoint(-86.74182892,36.25695038),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chadwell Elementary School",'Madison=' + Madison.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.88363647,36.15131378),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Charlotte Park Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.84386444,36.15654755),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cockrill Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.84489441,36.15084457),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cohn Alternative School",'Nashville=' + Nashville.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.69868469,36.05854034),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cole Elementary School",'Antioch=' + Antioch.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.73547363,36.18920135),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cora Howe Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cotton Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75733948,36.06530380),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crieve Hall Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72540283,36.07350159),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Croft Design Center",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.86587524,36.21070480),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cumberland Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.71913910,36.20684433),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Dalewood Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.71829224,36.21746445),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dan Mills Elementary School",'Nashville=' + Nashville.length);
Hermitage[Hermitage.length] = createMarker(new GPoint(-86.60453033,36.19052505),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dodson Elementary School",'Hermitage=' + Hermitage.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.65634918,36.16732788),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Donelson Middle School",'Nashville=' + Nashville.length);
Old_Hickory[Old_Hickory.length] = createMarker(new GPoint(-86.65229797,36.26176453),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dupont Elementary School",'Old_Hickory=' + Old_Hickory.length);
Old_Hickory[Old_Hickory.length] = createMarker(new GPoint(-86.64677429,36.25193405),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Dupont Hadley Middle School",'Old_Hickory=' + Old_Hickory.length);
Hermitage[Hermitage.length] = createMarker(new GPoint(-86.61274719,36.19924545),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Dupont Tyler Middle School",'Hermitage=' + Hermitage.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80564880,36.13475418),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eakin Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75074768,36.17874908),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("East Literature Magnet School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75075531,36.17874146),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("East Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80310059,36.23779678),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Ewing Park Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72242737,36.14386368),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Fairview Marguerite Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.76591492,36.13312531),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fall-hamilton Elementary School",'Nashville=' + Nashville.length);
Madison[Madison.length] = createMarker(new GPoint(-86.71062469,36.29100418),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gateway Elementary School",'Madison=' + Madison.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72771454,36.10103607),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Glencliff Comp High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72311401,36.10123825),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Glencliff Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78342438,36.09603882),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Glendale Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.70533752,36.11071777),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Glengarry Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.76604462,36.18682480),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Glenn Enhance Option School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.70683289,36.12733841),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Glenview Elementary School",'Nashville=' + Nashville.length);
Goodlettsville[Goodlettsville.length] = createMarker(new GPoint(-86.71102905,36.31272507),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Goodlettsville Elementary School",'Goodlettsville=' + Goodlettsville.length);
Goodlettsville[Goodlettsville.length] = createMarker(new GPoint(-86.71400452,36.32529831),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Goodlettsville Middle School",'Goodlettsville=' + Goodlettsville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.92285156,36.11470032),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gower Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.74446106,36.23249054),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Gra-mar Middle School",'Nashville=' + Nashville.length);
Brentwood[Brentwood.length] = createMarker(new GPoint(-86.75260162,36.04741287),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Granbery Elementary School",'Brentwood=' + Brentwood.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.86553955,36.11578751),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("H G Hill Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.95519257,36.04647827),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harpeth Valley Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Harris Hillman Special",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78138733,36.23563385),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Haynes Health/medical Science Design Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.70857239,36.07350922),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Haywood Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80301666,36.16017532),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Head Middle Mathematics / Science Magnet",'Nashville=' + Nashville.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.67456055,36.03271103),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Henry Maxwell Elementary School",'Antioch=' + Antioch.length);
Hermitage[Hermitage.length] = createMarker(new GPoint(-86.63504791,36.19734955),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hermitage Elementary School",'Hermitage=' + Hermitage.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.65610504,36.16704559),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hickman Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.77097600,36.19426700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Highland Heights",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.81273651,36.10742188),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hillsboro Comp High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.87331390,36.11706924),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hillwood Comp High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80745697,36.19060898),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hull Jackson Montessori Magnet",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78122711,36.15945053),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hume Fogg Magnet High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75422668,36.27816772),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hunters Lane Comprehensive High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72354126,36.19745636),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Inglewood Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72087097,36.22758102),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Isaac Litton Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.73297882,36.21134567),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("J Baxter Alternative High School",'Nashville=' + Nashville.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.66922760,36.06784058),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("J E Moss Elementary School",'Antioch=' + Antioch.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75619507,36.22154617),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jere Baxter Middle School",'Nashville=' + Nashville.length);
Joelton[Joelton.length] = createMarker(new GPoint(-86.86577606,36.31507111),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Joelton Elementary School",'Joelton=' + Joelton.length);
Joelton[Joelton.length] = createMarker(new GPoint(-86.86560822,36.31347656),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Joelton Middle School",'Joelton=' + Joelton.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.73548126,36.11472321),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John B Whitsitt Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80493164,36.18643188),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("John Early Paideia Magnet School",'Nashville=' + Nashville.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.59851074,36.05749512),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("John F. Kennedy Middle School",'Antioch=' + Antioch.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.77242279,36.08113861),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("John Overton Comprehensive High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80146790,36.09556198),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("John T Moore Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Johnson Alternative School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80149078,36.18087769),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jones Paideia Magnet School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.83264923,36.10245132),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Julia Green Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.77097600,36.19426700),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("K I P P: Academy Nashville",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.82680511,36.22009659),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kings Lane Design Center",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75299072,36.16822052),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kirkpatrick Enhanced Option Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.62905121,36.07905197),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lakeview Design Center",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.74069977,36.18090057),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lockeland Elementary School",'Nashville=' + Nashville.length);
Madison[Madison.length] = createMarker(new GPoint(-86.71675110,36.26374817),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Madison School",'Madison=' + Madison.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75077820,36.23182678),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Maplewood Comprehensive High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72242737,36.14386368),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Margaret Allen Montessori Magnet School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.86460114,36.15060043),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Martha Vaught Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Martin Luther King Junior Magnet- Pearl High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.67819000,35.97017200),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("May Werthan Shayne Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mc Kissack Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.67641449,36.18571854),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mcgavock Comprehensive High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.68090057,36.16229630),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mcgavock Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.83135223,36.15984726),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mckissack-crewell Professional Development School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.72292328,36.05689240),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mcmurray Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.77063751,36.19440842),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Meigs Magnet Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.85813141,36.13544083),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Middle College High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.85832900,36.13481200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mnps Middle College @ Nscc",'Nashville=' + Nashville.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.60525513,36.04167557),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mt View Elementary School",'Antioch=' + Antioch.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80323029,36.15625763),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Murphy Alternative Learning Center",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Murrell Special Education",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75718689,36.15012360),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Napier Enhancement Option Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.83716583,36.18901443),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Nashville School For Arts",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.74279785,36.14149857),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Nashville School Of Arts",'Nashville=' + Nashville.length);
Madison[Madison.length] = createMarker(new GPoint(-86.67330933,36.24040604),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Neelys Bend Elementary School",'Madison=' + Madison.length);
Madison[Madison.length] = createMarker(new GPoint(-86.67504120,36.24175262),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Neelys Bend Middle School",'Madison=' + Madison.length);
Goodlettsville[Goodlettsville.length] = createMarker(new GPoint(-86.71334839,36.32302856),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Old Center Elementary School",'Goodlettsville=' + Goodlettsville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.84609700,36.15446500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Old Cockrill",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.70719910,36.08717728),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Paragon Mills Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.82844543,36.15146255),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Park Avenue Enhanced Option Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pearl Cohn Magnet High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.68188477,36.20315552),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pennington Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.83271027,36.06169510),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Percy Priest Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.85544586,36.16205215),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Renaissance High School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Rose Park Math/science Magnet School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.71749878,36.18443680),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rosebank Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75489044,36.18047333),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ross Elementary School",'Nashville=' + Nashville.length);
Hermitage[Hermitage.length] = createMarker(new GPoint(-86.57885400,36.15514300),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ruby Major Elementary School",'Hermitage=' + Hermitage.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.77001953,36.20036697),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shwab Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-85.79570007,35.93759918),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Smithson Craighead Academy",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.68154144,36.17684174),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stanford Montessori School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.71736908,36.19614029),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Stratford Comprehensive High School",'Nashville=' + Nashville.length);
Madison[Madison.length] = createMarker(new GPoint(-86.71437073,36.25617981),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stratton Elementary School",'Madison=' + Madison.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.84368896,36.14421082),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sylvan Park Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.86460114,36.15060043),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sylvan Park Paideia Design Center",'Nashville=' + Nashville.length);
Antioch[Antioch.length] = createMarker(new GPoint(-86.60668600,36.06288900),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Thomas A. Edison Elementary School",'Antioch=' + Antioch.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.75691986,36.20893860),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tom Joy Elementary School",'Nashville=' + Nashville.length);
Hermitage[Hermitage.length] = createMarker(new GPoint(-86.61238098,36.19900131),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tulip Grove Elementary School",'Hermitage=' + Hermitage.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.71711731,36.06254959),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tusculum Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.66391100,36.16386000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Two Rivers Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.78431702,36.16534042),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Una Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.85018158,36.15432358),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("W. A. Bass Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.76161194,36.17165756),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Warner Elementary School",'Nashville=' + Nashville.length);
Ridgetop[Ridgetop.length] = createMarker(new GPoint(-86.77940369,36.39500046),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Watauga Elementary School",'Ridgetop=' + Ridgetop.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.82395172,36.13496780),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("West End Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.89466095,36.09219360),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Westmeade Elementary School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.80891418,36.17461014),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Wharton Arts Magnet School",'Nashville=' + Nashville.length);
Whites_Creek[Whites_Creek.length] = createMarker(new GPoint(-86.81901550,36.27302170),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Whites Creek Comprehensive High School",'Whites_Creek=' + Whites_Creek.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.67819000,35.97017200),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("William Henry Oliver Middle School",'Nashville=' + Nashville.length);
Nashville[Nashville.length] = createMarker(new GPoint(-86.73310089,36.09919357),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Wright Middle School",'Nashville=' + Nashville.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(Antioch);
map.removeOverlays(Brentwood);
map.removeOverlays(Goodlettsville);
map.removeOverlays(Hermitage);
map.removeOverlays(Joelton);
map.removeOverlays(Madison);
map.removeOverlays(Nashville);
map.removeOverlays(Old_Hickory);
map.removeOverlays(Ridgetop);
map.removeOverlays(Whites_Creek);
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(Whites_Creek);map.removeOverlays(Antioch);
map.removeOverlays(Brentwood);
map.removeOverlays(Goodlettsville);
map.removeOverlays(Hermitage);
map.removeOverlays(Joelton);
map.removeOverlays(Madison);
map.removeOverlays(Nashville);
map.removeOverlays(Old_Hickory);
map.removeOverlays(Ridgetop);
map.removeOverlays(Whites_Creek);
map.addOverlays(Antioch);
centerByArray(Antioch, false, false);
cntMarker += Antioch.length;
map.addOverlays(Brentwood);
centerByArray(Brentwood, false, false);
cntMarker += Brentwood.length;
map.addOverlays(Goodlettsville);
centerByArray(Goodlettsville, false, false);
cntMarker += Goodlettsville.length;
map.addOverlays(Hermitage);
centerByArray(Hermitage, false, false);
cntMarker += Hermitage.length;
map.addOverlays(Joelton);
centerByArray(Joelton, false, false);
cntMarker += Joelton.length;
map.addOverlays(Madison);
centerByArray(Madison, false, false);
cntMarker += Madison.length;
map.addOverlays(Nashville);
centerByArray(Nashville, false, false);
cntMarker += Nashville.length;
map.addOverlays(Old_Hickory);
centerByArray(Old_Hickory, false, false);
cntMarker += Old_Hickory.length;
map.addOverlays(Ridgetop);
centerByArray(Ridgetop, false, false);
cntMarker += Ridgetop.length;
map.addOverlays(Whites_Creek);
centerByArray(Whites_Creek, false, false);
cntMarker += Whites_Creek.length;
centerByArray(Whites_Creek,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');
}
}