function addMarkers()
{
mySelect = document.getElementById('selection');
Louisville = [];Anchorage = [];Fairdale = [];Middletown = [];Jeffersontown = [];Valley_Station = [];mySelect.options[mySelect.options.length] = new Option("Anchorage schools",'all=Anchorage');
mySelect.options[mySelect.options.length] = new Option("Fairdale schools",'all=Fairdale');
mySelect.options[mySelect.options.length] = new Option("Jeffersontown schools",'all=Jeffersontown');
mySelect.options[mySelect.options.length] = new Option("Louisville schools",'all=Louisville');
mySelect.options[mySelect.options.length] = new Option("Middletown schools",'all=Middletown');
mySelect.options[mySelect.options.length] = new Option("Valley Station schools",'all=Valley_Station');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Louisville[Louisville.length] = createMarker(new GPoint(-85.75146484,38.24827194),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ackerly/bingham Guidance Center Spec Ed",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75146484,38.24827194),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ackerly/bingham Guidance Spec Ed High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75301361,38.24873734),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ahrens Educational Resource Center Vocational School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.65770721,38.20901871),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alfred Binet Special Education School",'Louisville=' + Louisville.length);
Anchorage[Anchorage.length] = createMarker(new GPoint(-85.53916168,38.26377106),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Anchorage Public Elementary School",'Anchorage=' + Anchorage.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69014740,38.21394348),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Atherton High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.79756165,38.26557159),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Atkinson Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77287292,38.13527679),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Auburndale Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.73016357,38.20788193),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Audubon Traditional Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.58981600,38.26671900),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Audubon Youth Development Center",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.62765503,38.28386688),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ballard High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69555664,38.24883652),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Barret Traditional Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.58068085,38.13668442),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bates Elementary School",'Louisville=' + Louisville.length);
Anchorage[Anchorage.length] = createMarker(new GPoint(-85.54204559,38.26635361),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bellwood Presbyterian Home For Children",'Anchorage=' + Anchorage.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69686127,38.12236786),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blake Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.72022247,38.23621368),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bloom Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69233704,38.10589981),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blue Lick Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.58195496,38.26910782),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bowen Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.66575623,38.21017075),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Boys Haven Alternative School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.79991150,38.24380112),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brandeis Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.73265076,38.24401474),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Breckinridge Metropolitan High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.72066498,38.25077057),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Breckinridge/franklin Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.67056274,38.20737076),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brooklawn Youth Services",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.67360687,38.20600891),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brooklawn Youth Services Alternative School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75286102,38.24958801),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brown Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75301361,38.24873734),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brown High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75301361,38.24873734),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Brown Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.67278290,38.19850540),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Buechel Metropolitan High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.81487274,38.19441605),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Butler Traditional High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.78987885,38.25629425),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Byck Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.71977234,38.19650650),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Camp Taylor Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.82330322,38.21001434),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cane Run Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.55451202,38.28627014),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cardinal Treatment Center",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.55451202,38.28627014),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cardinal Treatment Ctr Alternative School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.68119812,38.22259903),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Caritas Peace Academy",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.70944977,38.21926498),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Caritas Peace Academy School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.57101440,38.18093872),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Carrithers Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.81508636,38.22859573),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Carter Traditional Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77033997,38.25030518),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Central High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.67001343,38.26452637),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chenoweth Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75258636,38.20538330),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Churchill Park Special Education High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.76386261,38.22486877),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cochran Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.57505798,38.20842361),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cochrane Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.76990509,38.25025558),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Coleridge Taylor Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.86693573,38.16006088),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Conway Middle School",'Louisville=' + Louisville.length);
Fairdale[Fairdale.length] = createMarker(new GPoint(-85.73802948,38.09654236),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Coral Ridge Elementary School",'Fairdale=' + Fairdale.length);
Middletown[Middletown.length] = createMarker(new GPoint(-85.55612183,38.24032211),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Crosby Middle School",'Middletown=' + Middletown.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.83923340,38.19374084),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crums Lane Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.87274933,38.10770798),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dixie Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.81192017,38.15411377),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Doss High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.64201355,38.28310776),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dunn Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75770569,38.22281265),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dupont Manual High School",'Louisville=' + Louisville.length);
Middletown[Middletown.length] = createMarker(new GPoint(-85.52713776,38.24385452),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eastern High School",'Middletown=' + Middletown.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.85571289,38.13821411),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eisenhower Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75486755,38.23840714),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Engelhard Elementary School",'Louisville=' + Louisville.length);
Fairdale[Fairdale.length] = createMarker(new GPoint(-85.76049042,38.10429382),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fairdale Elementary School",'Fairdale=' + Fairdale.length);
Fairdale[Fairdale.length] = createMarker(new GPoint(-85.74975586,38.11151505),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fairdale High School",'Fairdale=' + Fairdale.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.85716248,38.18516922),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Farnsley Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59551239,38.15542603),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fern Creek Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59204865,38.15554047),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fern Creek Traditional High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.67770386,38.25261307),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Field Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.82136536,38.23826981),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Foster Traditional Elementary Academy",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77890015,38.20769119),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Frayser Elementary School",'Louisville=' + Louisville.length);
Fairdale[Fairdale.length] = createMarker(new GPoint(-85.75006866,38.11626053),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Georgia Chaffee Tapp-south Park Alt High School",'Fairdale=' + Fairdale.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.58854675,38.28128433),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Georgia Chaffee Tapp-westport Alt High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.70528412,38.17919922),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gilmore Lane Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.65322876,38.20881271),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Goldsmith Lane Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.62184143,38.22660828),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greathouse Shryock Trad Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.86180878,38.14455032),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greenwood Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.80893707,38.17843628),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gutermuth Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.66696167,38.14061356),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hartstern Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.67045593,38.21849442),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hawthorne Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.78404236,38.17956924),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hazelwood Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.70686340,38.22517014),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Highland Middle School",'Louisville=' + Louisville.length);
Middletown[Middletown.length] = createMarker(new GPoint(-85.52699280,38.24385071),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hite Elementary School",'Middletown=' + Middletown.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69875400,38.25696100),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Home Of Innocents High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69170380,38.17020416),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Indian Trail Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.78195190,38.17253876),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Iroquois High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77795410,38.17218781),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Iroquois Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.79736328,38.19224167),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jacob Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75059509,38.24088287),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Jefferson County High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.72824860,38.24003601),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jefferson County Traditional Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.76546478,38.25487137),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Jefferson County Youth Center Alt School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.58326721,38.19192886),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jeffersontown Elementary School",'Louisville=' + Louisville.length);
Jeffersontown[Jeffersontown.length] = createMarker(new GPoint(-85.58003235,38.20150375),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Jeffersontown High School",'Jeffersontown=' + Jeffersontown.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.81856537,38.23257065),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John F Kennedy Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.79627991,38.23454285),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Johnson Traditional Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.89210510,38.11643982),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Johnsontown Road Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.62075043,38.28202820),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Kammerer Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75247955,38.23991776),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Keller Day Treatment Center Alt School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59979248,38.21870422),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Kennedy Metro Alternative Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.78625488,38.14592743),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kenwood Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.83766937,38.16717911),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kerrick Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.82260132,38.25751877),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("King Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.63745880,38.20799255),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Klondike Lane Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69257355,38.10602951),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Knight Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.78647614,38.12976456),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lassiter Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.66365814,38.10026550),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Laukhuf Elementary School",'Louisville=' + Louisville.length);
Valley_Station[Valley_Station.length] = createMarker(new GPoint(-85.84965515,38.11109543),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Layne Elementary School",'Valley_Station=' + Valley_Station.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.70282745,38.16867828),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Liberty Alternative High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.73507690,38.25444031),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59055328,38.26673508),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Louisville Day Treatment Center Alt School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75435638,38.23851013),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Louisville Deaf Oral School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.72404480,38.18605042),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Louisville Male Traditional High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59066772,38.24649048),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lowe Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.62866211,38.15005112),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Luhr Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.53564453,38.30650330),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Malcolm B Chancey, Junior Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77616119,38.22106934),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mary Ryan Academy Special Education",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.56279755,38.26257706),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Maryhurst Alternative School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.80200958,38.23672867),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Maupin Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77616119,38.22106934),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mcferran Elementary School",'Louisville=' + Louisville.length);
Valley_Station[Valley_Station.length] = createMarker(new GPoint(-85.87374878,38.09053802),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Medora Elementary School",'Valley_Station=' + Valley_Station.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.74634552,38.24174118),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Meyzeek Middle School",'Louisville=' + Louisville.length);
Middletown[Middletown.length] = createMarker(new GPoint(-85.54094696,38.24812317),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Middletown Elementary School",'Middletown=' + Middletown.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.80556488,38.19634247),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mill Creek Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.71235657,38.12554169),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Minors Lane Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.64147186,38.13803864),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Moore Traditional High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.64127350,38.13795471),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Moore Traditional Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.64301300,38.20242310),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Myers Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.66875458,38.18009567),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Newburg Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75770569,38.22281265),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Noe Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59927368,38.29724884),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Norton Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.68836975,38.14107132),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Okolona Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.86292267,38.14459229),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pleasure Ridge Park High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.80330658,38.27493286),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Portland Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.66602325,38.17602158),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Price Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75878906,38.25326920),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Providing Community Transition Alt School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.67027283,38.16538239),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rangeland Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.58966064,38.26710129),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rice Audubon Youth Dev Center",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59055328,38.26673508),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rice Audubon Youth Dev Center Alt School",'Louisville=' + Louisville.length);
Valley_Station[Valley_Station.length] = createMarker(new GPoint(-85.90219879,38.05662155),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Robert Frost Middle School",'Valley_Station=' + Valley_Station.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.57054138,38.19684219),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roberta Tully Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77835846,38.24997711),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Perry Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75804901,38.17372131),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rutherford Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.68875885,38.25466919),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Saint Joseph Alternative School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.64154816,38.24525833),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Saint Matthews Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.87420654,38.13209152),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sanders Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.82616425,38.19541931),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Schaffner Traditional Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77169037,38.19574356),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Semple Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.65338898,38.20901108),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Seneca High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.85385895,38.15842819),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shacklette Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.81584167,38.26279449),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Shawnee High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.73866272,38.23430634),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shelby Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.69277191,38.15813446),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Slaughter Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.64170837,38.13803864),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Smyrna Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.68107605,38.12768555),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Southern High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.77343750,38.18777466),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Southern Leadership Academy Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.55465698,38.24477005),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Spring Meadows Alternative School",'Louisville=' + Louisville.length);
Valley_Station[Valley_Station.length] = createMarker(new GPoint(-85.83561707,38.10982895),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stonestreet Elementary School",'Valley_Station=' + Valley_Station.length);
Valley_Station[Valley_Station.length] = createMarker(new GPoint(-85.84146118,38.10757065),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Stuart Middle School",'Valley_Station=' + Valley_Station.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.62956238,38.23627090),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ten Broeck Hospital-dupont Alt School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.59362030,38.26591873),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ten Broeck-kmi Hospital Alt School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.68106842,38.16742706),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.81404877,38.15435028),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Trunnell Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.86676025,38.10776901),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Valley Model Program High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.86693573,38.10763550),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Valley Traditional High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.63752747,38.24642181),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Waggener Traditional High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.84162140,38.17659378),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Waller-williams Environmental Alt School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.89778137,38.06010056),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Watson Lane Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.62591553,38.19062424),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Watterson Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.86114502,38.18206406),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wellington Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.84487915,38.17701340),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Western Day Treatment Alternative Prog",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.84339142,38.17654037),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Western High School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.78646088,38.26007080),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Western Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.60156250,38.27649307),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Westport Traditional Middle School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.78376007,38.23897171),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wheatley Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.57537079,38.16811752),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wheeler Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.80941772,38.25704956),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Whitney Young Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.62348938,38.27880859),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wilder Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.87435150,38.12183380),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wilkerson Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.75878906,38.25326920),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wilt Elementary School",'Louisville=' + Louisville.length);
Louisville[Louisville.length] = createMarker(new GPoint(-85.57331848,38.28704453),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Zachary Taylor Elementary School",'Louisville=' + Louisville.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(Anchorage);
map.removeOverlays(Fairdale);
map.removeOverlays(Jeffersontown);
map.removeOverlays(Louisville);
map.removeOverlays(Middletown);
map.removeOverlays(Valley_Station);
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(Louisville);map.removeOverlays(Anchorage);
map.removeOverlays(Fairdale);
map.removeOverlays(Jeffersontown);
map.removeOverlays(Louisville);
map.removeOverlays(Middletown);
map.removeOverlays(Valley_Station);
map.addOverlays(Anchorage);
centerByArray(Anchorage, false, false);
cntMarker += Anchorage.length;
map.addOverlays(Fairdale);
centerByArray(Fairdale, false, false);
cntMarker += Fairdale.length;
map.addOverlays(Jeffersontown);
centerByArray(Jeffersontown, false, false);
cntMarker += Jeffersontown.length;
map.addOverlays(Louisville);
centerByArray(Louisville, false, false);
cntMarker += Louisville.length;
map.addOverlays(Middletown);
centerByArray(Middletown, false, false);
cntMarker += Middletown.length;
map.addOverlays(Valley_Station);
centerByArray(Valley_Station, false, false);
cntMarker += Valley_Station.length;
centerByArray(Louisville,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');
}
}