function addMarkers()
{
mySelect = document.getElementById('selection');
Rosemount = [];Burnsville = [];Lakeville = [];Apple_Valley = [];Farmington = [];Inver_Grove_Heights = [];Eagan = [];Hastings = [];Mendota_Heights = [];West_St_Paul = [];South_St_Paul = [];Northfield = [];Randolph = [];mySelect.options[mySelect.options.length] = new Option("Apple Valley schools",'all=Apple_Valley');
mySelect.options[mySelect.options.length] = new Option("Burnsville schools",'all=Burnsville');
mySelect.options[mySelect.options.length] = new Option("Eagan schools",'all=Eagan');
mySelect.options[mySelect.options.length] = new Option("Farmington schools",'all=Farmington');
mySelect.options[mySelect.options.length] = new Option("Hastings schools",'all=Hastings');
mySelect.options[mySelect.options.length] = new Option("Inver Grove Heights schools",'all=Inver_Grove_Heights');
mySelect.options[mySelect.options.length] = new Option("Lakeville schools",'all=Lakeville');
mySelect.options[mySelect.options.length] = new Option("Mendota Heights schools",'all=Mendota_Heights');
mySelect.options[mySelect.options.length] = new Option("Northfield schools",'all=Northfield');
mySelect.options[mySelect.options.length] = new Option("Randolph schools",'all=Randolph');
mySelect.options[mySelect.options.length] = new Option("Rosemount schools",'all=Rosemount');
mySelect.options[mySelect.options.length] = new Option("South St Paul schools",'all=South_St_Paul');
mySelect.options[mySelect.options.length] = new Option("West St Paul schools",'all=West_St_Paul');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.03599900,44.73900300),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("917 Akin Road Elementary School",'Rosemount=' + Rosemount.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.07933500,44.73895400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("917 Burnsville High School",'Rosemount=' + Rosemount.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.27419000,44.76562000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("917 Century Junior High School",'Burnsville=' + Burnsville.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-92.86080170,44.72689819),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("917 Crista Mcauliffe Elementary School",'Rosemount=' + Rosemount.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.12429400,44.73919000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("917 Crista Mcauliffe Elemtary",'Rosemount=' + Rosemount.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.27419000,44.76562000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("917 D/hoh Gideon Pond Elementary School",'Burnsville=' + Burnsville.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-92.98789978,45.26969910),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("917 Farmington High School.",'Rosemount=' + Rosemount.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-92.86080170,44.72689819),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("917 Hastings High School",'Rosemount=' + Rosemount.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-92.86080170,44.72689819),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("917 Hastings Middle School",'Rosemount=' + Rosemount.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.24288177,44.64329529),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("917 Lakeville Senior High School",'Lakeville=' + Lakeville.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.21757900,44.74275000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("917 Mcquire Jr High School",'Apple_Valley=' + Apple_Valley.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.27189636,44.76950073),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("917 Nicollet Junior Hi Sp Ed Middle School",'Rosemount=' + Rosemount.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.03949738,44.84349823),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("917 Pine Bend Elementary School",'Apple_Valley=' + Apple_Valley.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.10639954,44.89920044),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("917 Sibley High School",'Rosemount=' + Rosemount.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.17170000,44.66850400),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Akin Road Elementary School",'Farmington=' + Farmington.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.25131989,44.78581619),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Anthony Louis Day Treatment Center",'Burnsville=' + Burnsville.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.23280334,44.73941803),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Apple Valley Senior High School",'Apple_Valley=' + Apple_Valley.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.03949738,44.84349823),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Atheneum Elementary School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.21739960,44.80473709),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Behavior Learning Center",'Eagan=' + Eagan.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.16713400,44.81808000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bes Transition Program",'Eagan=' + Eagan.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.23342400,44.80289000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bes Virtual Learning Academy",'Burnsville=' + Burnsville.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.17433167,44.81166458),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Black Hawk Middle School",'Eagan=' + Eagan.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.27189636,44.76950073),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Burnsville Alc Middle School",'Eagan=' + Eagan.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.16713400,44.81808000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Burnsville Area Learning Center",'Eagan=' + Eagan.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.27189636,44.76950073),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Burnsville Extended Day",'Eagan=' + Eagan.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.26721191,44.78194809),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Burnsville Senior High School",'Burnsville=' + Burnsville.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.21739960,44.80473709),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cedar Alternative Center",'Eagan=' + Eagan.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.21739960,44.80473709),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cedar Outpatient Speech Elementary School",'Eagan=' + Eagan.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.21939850,44.72637177),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cedar Park Elementary School",'Apple_Valley=' + Apple_Valley.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.21739960,44.80473709),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cedar School",'Eagan=' + Eagan.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.21739960,44.80473709),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cedar School, D/hoh,e.c. Elementary School",'Eagan=' + Eagan.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.25740814,44.67988586),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Century Junior Middle School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.23979950,44.69565582),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cherry View Elementary School",'Lakeville=' + Lakeville.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.88188171,44.73572159),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Christa Mcauliffe Elementary School",'Hastings=' + Hastings.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.25920105,44.71179962),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crystal Lake Elementary School",'Lakeville=' + Lakeville.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.09165955,44.73910904),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dakota Cty. Alc High School",'Rosemount=' + Rosemount.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.13656900,44.80459000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Dakota Hills Middle School",'Eagan=' + Eagan.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.14438400,44.63919000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dakota Prairie Area Learning Center",'Farmington=' + Farmington.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.14319611,44.63675690),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dakota Prairie Targeted Services",'Farmington=' + Farmington.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.15761566,44.74082184),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dakota Ridge School",'Apple_Valley=' + Apple_Valley.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.17211151,44.81166458),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Deerwood Elementary School",'Eagan=' + Eagan.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.15631866,44.74003601),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Diamond Path Elementary School",'Apple_Valley=' + Apple_Valley.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.13223267,44.80559921),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eagan Senior High School",'Eagan=' + Eagan.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.86437225,44.73524475),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Early Childhood Ecfe Elementary School",'Hastings=' + Hastings.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.04494476,44.83352661),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Early Childhood Elementary School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.18431854,44.73276520),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Early Childhood Learning Center",'Apple_Valley=' + Apple_Valley.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.25788116,44.68795013),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eastview Elementary School",'Lakeville=' + Lakeville.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.19136047,44.74636459),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eastview Senior High School",'Apple_Valley=' + Apple_Valley.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.25839233,44.74916458),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Echo Park Elementary School",'Burnsville=' + Burnsville.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.31387329,44.76056290),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Edward Neill Elementary School",'Burnsville=' + Burnsville.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.15648651,44.74066925),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Expelled Learners High School",'Rosemount=' + Rosemount.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.18669891,44.76266861),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Falcon Ridge Middle School",'Apple_Valley=' + Apple_Valley.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.14747620,44.64760971),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Farmington East Middle School",'Farmington=' + Farmington.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.14189911,44.63433456),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Farmington Elementary School",'Farmington=' + Farmington.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.15717316,44.63077545),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Farmington Senior High School",'Farmington=' + Farmington.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.15134430,44.64694595),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Farmington West Middle School",'Farmington=' + Farmington.length);
Mendota_Heights[Mendota_Heights.length] = createMarker(new GPoint(-93.11816406,44.86685181),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Friendly Hills Middle School",'Mendota_Heights=' + Mendota_Heights.length);
West_St_Paul[West_St_Paul.length] = createMarker(new GPoint(-93.09570312,44.89350510),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Garlough Elementary School",'West_St_Paul=' + West_St_Paul.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.26747894,44.76776123),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gideon Pond El. Sp. Ed. Elementary School",'Burnsville=' + Burnsville.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.26725006,44.76788712),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gideon Pond Elementary School",'Burnsville=' + Burnsville.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.15469360,44.81938934),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Glacier Hills Elementary School",'Eagan=' + Eagan.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.20745087,44.75528717),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greenleaf Elementary School",'Apple_Valley=' + Apple_Valley.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.86437225,44.73524475),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Harbor Shelter Program High School",'Hastings=' + Hastings.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.15648651,44.74066925),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Harbor Shelter South High School",'Burnsville=' + Burnsville.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.85268402,44.72990036),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hastings Alternative Center",'Hastings=' + Hastings.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.86437225,44.73524475),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hastings Middle School",'Hastings=' + Hastings.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.88999939,44.74212646),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hastings Senior High School",'Hastings=' + Hastings.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.85362244,44.72874451),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hastings Targeted Services",'Hastings=' + Hastings.length);
West_St_Paul[West_St_Paul.length] = createMarker(new GPoint(-93.10609436,44.88917160),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Henry Sibley Senior High School",'West_St_Paul=' + West_St_Paul.length);
West_St_Paul[West_St_Paul.length] = createMarker(new GPoint(-93.09004211,44.91260910),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Heritage Middle School",'West_St_Paul=' + West_St_Paul.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.17709351,44.74636459),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Highland Elementary School",'Apple_Valley=' + Apple_Valley.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.03959656,44.85133743),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hilltop Elementary School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.25959778,44.69593811),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Huddleston Elementary School",'Lakeville=' + Lakeville.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.20369720,44.74440002),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Idea/apple Valley Campus High School",'Apple_Valley=' + Apple_Valley.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.14652252,44.63797760),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Idea/farmington Campus High School",'Farmington=' + Farmington.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.05119324,44.90151596),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Idea/thompson Heights School",'South_St_Paul=' + South_St_Paul.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.07163239,44.73899841),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Interm. 917-dctc Sp. Ed. High School",'Rosemount=' + Rosemount.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.04232025,44.83036804),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Inver Grove Heights Middle School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.03718500,44.89133700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Jr. High Targeted Services",'South_St_Paul=' + South_St_Paul.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-92.88623047,44.73853683),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Juvenile Services Center",'South_St_Paul=' + South_St_Paul.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.03460693,44.87044525),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kaposia Education Center Elementary School",'South_St_Paul=' + South_St_Paul.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.03718500,44.89133700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kec Targeted Services",'South_St_Paul=' + South_St_Paul.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.84867096,44.73430252),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kennedy Elementary School",'Hastings=' + Hastings.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.24270630,44.64171982),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kennedy Elementary School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.26826477,44.66630173),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Kenwood Trail Junior Middle School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.25299072,44.66123199),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lake Marion Elementary School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.26800537,44.65346146),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lakeview Elementary School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.24303436,44.64789581),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lakeville Alc High School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.26779938,44.67330170),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lakeville Ec Elementary School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.26010895,44.66538620),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lakeville Senior High School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.26816600,44.64977500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lakeville South High School",'Lakeville=' + Lakeville.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.24303436,44.64789581),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lakeville Targeted Services",'Lakeville=' + Lakeville.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.28317261,44.77885056),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Learners Center",'Burnsville=' + Burnsville.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.04515076,44.89530945),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Center Elementary School",'South_St_Paul=' + South_St_Paul.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.03718500,44.89133700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lincoln Center Targeted Services",'South_St_Paul=' + South_St_Paul.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.24270630,44.64200211),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mcguire Junior Middle School",'Lakeville=' + Lakeville.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.18639374,44.66676331),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Meadowview Elementary School",'Farmington=' + Farmington.length);
Mendota_Heights[Mendota_Heights.length] = createMarker(new GPoint(-93.14183000,44.88532300),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mendota Elementary School",'Mendota_Heights=' + Mendota_Heights.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.22555542,44.80478287),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Metcalf Junior Middle School",'Burnsville=' + Burnsville.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.27189636,44.76950073),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Minnesota Valley Adult Diploma High School",'Eagan=' + Eagan.length);
West_St_Paul[West_St_Paul.length] = createMarker(new GPoint(-93.09432983,44.90893555),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Moreland Elementary School",'West_St_Paul=' + West_St_Paul.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.27299500,44.76185226),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Nicollet Junior Middle School",'Burnsville=' + Burnsville.length);
Farmington[Farmington.length] = createMarker(new GPoint(-93.17822266,44.70304871),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Trail Elementary School",'Farmington=' + Farmington.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.13800049,44.80483627),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Northview Elementary School",'Eagan=' + Eagan.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.24137115,44.71006393),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Hills Elementary School",'Lakeville=' + Lakeville.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.18632507,44.79929733),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Ridge Elementary School",'Eagan=' + Eagan.length);
Lakeville[Lakeville.length] = createMarker(new GPoint(-93.30467987,44.71025085),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Orchard Lake Elementary School",'Lakeville=' + Lakeville.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.21179600,44.73477300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Paideia Academy Charter School",'Apple_Valley=' + Apple_Valley.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.20378113,44.71183777),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Parkview Elementary School",'Rosemount=' + Rosemount.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.17178345,44.84786224),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pilot Knob Elementary School",'Eagan=' + Eagan.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.03540039,44.80690765),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pine Bend Elementary School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.86573029,44.73406601),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pinecrest Elementary School",'Hastings=' + Hastings.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.11804962,44.80077362),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pinewood Elementary School",'Eagan=' + Eagan.length);
Northfield[Northfield.length] = createMarker(new GPoint(-93.15708923,44.54752350),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Prairie Creek Community School",'Northfield=' + Northfield.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.21166229,44.79785919),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rahn Elementary School",'Eagan=' + Eagan.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.20855713,44.78826141),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rahncliff Abe Diploma Program High School",'Eagan=' + Eagan.length);
Randolph[Randolph.length] = createMarker(new GPoint(-93.01679993,44.53779984),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Randolph Elementary School",'Randolph=' + Randolph.length);
Randolph[Randolph.length] = createMarker(new GPoint(-93.01679993,44.53779984),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Randolph Secondary School",'Randolph=' + Randolph.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.11083221,44.78206635),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Red Pine Elementary School",'Eagan=' + Eagan.length);
West_St_Paul[West_St_Paul.length] = createMarker(new GPoint(-93.08271100,44.89082400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("River Heights Charter School",'West_St_Paul=' + West_St_Paul.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.21398163,44.73270416),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rosemount Alc High School",'Apple_Valley=' + Apple_Valley.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.21757900,44.74275000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rosemount Area Learning Cntr.",'Apple_Valley=' + Apple_Valley.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.12924194,44.74033737),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rosemount Elementary School",'Rosemount=' + Rosemount.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.12734985,44.74193573),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Rosemount Middle School",'Rosemount=' + Rosemount.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.12904358,44.74433517),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rosemount Senior High School",'Rosemount=' + Rosemount.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.06807709,44.86315155),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Salem Hills Elementary School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.20359802,44.74449921),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("School Of Environmental Studies",'Apple_Valley=' + Apple_Valley.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.17709351,44.74475861),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Scott Highlands Middle School",'Apple_Valley=' + Apple_Valley.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.14414978,44.75280762),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shannon Park Elementary School",'Rosemount=' + Rosemount.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.04570007,44.83346176),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Simley Alternative Program High School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.04570007,44.83346176),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Simley Senior High School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.23402405,44.80289841),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sioux Trail Elementary School",'Burnsville=' + Burnsville.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.27507019,44.76201248),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sky Oaks Elementary School",'Burnsville=' + Burnsville.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.03157043,44.87822342),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("So. Saint Paul Alc High School",'South_St_Paul=' + South_St_Paul.length);
Rosemount[Rosemount.length] = createMarker(new GPoint(-93.04212952,44.89191055),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("So. Saint Paul Jr./sr. High School",'Rosemount=' + Rosemount.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.27639400,44.78273900),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sobriety High South",'Burnsville=' + Burnsville.length);
Mendota_Heights[Mendota_Heights.length] = createMarker(new GPoint(-93.11333466,44.90581894),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Somerset Elementary School",'Mendota_Heights=' + Mendota_Heights.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.03440857,44.83894348),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("South Grove Elementary School",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
South_St_Paul[South_St_Paul.length] = createMarker(new GPoint(-93.04200745,44.89191818),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South Saint Paul Secondary School",'South_St_Paul=' + South_St_Paul.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.24022675,44.72527695),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Southview Elementary School",'Apple_Valley=' + Apple_Valley.length);
West_St_Paul[West_St_Paul.length] = createMarker(new GPoint(-93.10609436,44.88917160),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Special Ed. Elementary School",'West_St_Paul=' + West_St_Paul.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.86437225,44.73524475),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Special Services Elementary School",'Hastings=' + Hastings.length);
Inver_Grove_Heights[Inver_Grove_Heights.length] = createMarker(new GPoint(-93.03949738,44.84349823),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tarek Ibn Ziyad Academy",'Inver_Grove_Heights=' + Inver_Grove_Heights.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.17552948,44.79822922),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Thomas Lake Elementary School",'Eagan=' + Eagan.length);
Hastings[Hastings.length] = createMarker(new GPoint(-92.86623383,44.74327469),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tilden Elementary School",'Hastings=' + Hastings.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.21398163,44.73270416),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Transition Plus High School",'Apple_Valley=' + Apple_Valley.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.21616364,44.80456161),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Vale Educational Center",'Eagan=' + Eagan.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.23839569,44.72698975),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Valley Middle School",'Apple_Valley=' + Apple_Valley.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.30397034,44.76583862),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vista View Elementary School",'Burnsville=' + Burnsville.length);
West_St_Paul[West_St_Paul.length] = createMarker(new GPoint(-93.10639954,44.89920044),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("West Saint Paul Alc",'West_St_Paul=' + West_St_Paul.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.23861694,44.73873520),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Westview Elementary School",'Apple_Valley=' + Apple_Valley.length);
Burnsville[Burnsville.length] = createMarker(new GPoint(-93.23352814,44.79423141),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William Byrne Elementary School",'Burnsville=' + Burnsville.length);
Eagan[Eagan.length] = createMarker(new GPoint(-93.13475037,44.81900024),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Woodland Elementary School",'Eagan=' + Eagan.length);
Apple_Valley[Apple_Valley.length] = createMarker(new GPoint(-93.20887756,44.81993866),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Youth Transition Program (ytp)",'Apple_Valley=' + Apple_Valley.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(Apple_Valley);
map.removeOverlays(Burnsville);
map.removeOverlays(Eagan);
map.removeOverlays(Farmington);
map.removeOverlays(Hastings);
map.removeOverlays(Inver_Grove_Heights);
map.removeOverlays(Lakeville);
map.removeOverlays(Mendota_Heights);
map.removeOverlays(Northfield);
map.removeOverlays(Randolph);
map.removeOverlays(Rosemount);
map.removeOverlays(South_St_Paul);
map.removeOverlays(West_St_Paul);
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(Rosemount);map.removeOverlays(Apple_Valley);
map.removeOverlays(Burnsville);
map.removeOverlays(Eagan);
map.removeOverlays(Farmington);
map.removeOverlays(Hastings);
map.removeOverlays(Inver_Grove_Heights);
map.removeOverlays(Lakeville);
map.removeOverlays(Mendota_Heights);
map.removeOverlays(Northfield);
map.removeOverlays(Randolph);
map.removeOverlays(Rosemount);
map.removeOverlays(South_St_Paul);
map.removeOverlays(West_St_Paul);
map.addOverlays(Apple_Valley);
centerByArray(Apple_Valley, false, false);
cntMarker += Apple_Valley.length;
map.addOverlays(Burnsville);
centerByArray(Burnsville, false, false);
cntMarker += Burnsville.length;
map.addOverlays(Eagan);
centerByArray(Eagan, false, false);
cntMarker += Eagan.length;
map.addOverlays(Farmington);
centerByArray(Farmington, false, false);
cntMarker += Farmington.length;
map.addOverlays(Hastings);
centerByArray(Hastings, false, false);
cntMarker += Hastings.length;
map.addOverlays(Inver_Grove_Heights);
centerByArray(Inver_Grove_Heights, false, false);
cntMarker += Inver_Grove_Heights.length;
map.addOverlays(Lakeville);
centerByArray(Lakeville, false, false);
cntMarker += Lakeville.length;
map.addOverlays(Mendota_Heights);
centerByArray(Mendota_Heights, false, false);
cntMarker += Mendota_Heights.length;
map.addOverlays(Northfield);
centerByArray(Northfield, false, false);
cntMarker += Northfield.length;
map.addOverlays(Randolph);
centerByArray(Randolph, false, false);
cntMarker += Randolph.length;
map.addOverlays(Rosemount);
centerByArray(Rosemount, false, false);
cntMarker += Rosemount.length;
map.addOverlays(South_St_Paul);
centerByArray(South_St_Paul, false, false);
cntMarker += South_St_Paul.length;
map.addOverlays(West_St_Paul);
centerByArray(West_St_Paul, false, false);
cntMarker += West_St_Paul.length;
centerByArray(Rosemount,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');
}
}