function addMarkers()
{
mySelect = document.getElementById('selection');
Saginaw = [];Duluth = [];Babbitt = [];Hoyt_Lakes = [];Iron = [];Chisholm = [];Cook = [];Cotton = [];Eveleth = [];Floodwood = [];Hibbing = [];Hermantown = [];Buhl = [];Virginia = [];Proctor = [];Britt = [];Ely = [];Mountain_Iron = [];Aurora = [];Nett_Lake = [];Orr = [];Tower = [];Biwabik = [];mySelect.options[mySelect.options.length] = new Option("Aurora schools",'all=Aurora');
mySelect.options[mySelect.options.length] = new Option("Babbitt schools",'all=Babbitt');
mySelect.options[mySelect.options.length] = new Option("Biwabik schools",'all=Biwabik');
mySelect.options[mySelect.options.length] = new Option("Britt schools",'all=Britt');
mySelect.options[mySelect.options.length] = new Option("Buhl schools",'all=Buhl');
mySelect.options[mySelect.options.length] = new Option("Chisholm schools",'all=Chisholm');
mySelect.options[mySelect.options.length] = new Option("Cook schools",'all=Cook');
mySelect.options[mySelect.options.length] = new Option("Cotton schools",'all=Cotton');
mySelect.options[mySelect.options.length] = new Option("Duluth schools",'all=Duluth');
mySelect.options[mySelect.options.length] = new Option("Ely schools",'all=Ely');
mySelect.options[mySelect.options.length] = new Option("Eveleth schools",'all=Eveleth');
mySelect.options[mySelect.options.length] = new Option("Floodwood schools",'all=Floodwood');
mySelect.options[mySelect.options.length] = new Option("Hermantown schools",'all=Hermantown');
mySelect.options[mySelect.options.length] = new Option("Hibbing schools",'all=Hibbing');
mySelect.options[mySelect.options.length] = new Option("Hoyt Lakes schools",'all=Hoyt_Lakes');
mySelect.options[mySelect.options.length] = new Option("Iron schools",'all=Iron');
mySelect.options[mySelect.options.length] = new Option("Mountain Iron schools",'all=Mountain_Iron');
mySelect.options[mySelect.options.length] = new Option("Nett Lake schools",'all=Nett_Lake');
mySelect.options[mySelect.options.length] = new Option("Orr schools",'all=Orr');
mySelect.options[mySelect.options.length] = new Option("Proctor schools",'all=Proctor');
mySelect.options[mySelect.options.length] = new Option("Saginaw schools",'all=Saginaw');
mySelect.options[mySelect.options.length] = new Option("Tower schools",'all=Tower');
mySelect.options[mySelect.options.length] = new Option("Virginia schools",'all=Virginia');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Saginaw[Saginaw.length] = createMarker(new GPoint(-92.46009827,46.85190201),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Albrook Elementary School",'Saginaw=' + Saginaw.length);
Saginaw[Saginaw.length] = createMarker(new GPoint(-92.46217346,46.85123825),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Albrook Secondary School",'Saginaw=' + Saginaw.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09658813,46.78773880),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alternative Programs High School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.13198853,46.81576920),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Arrowhead Juvenile Center",'Duluth=' + Duluth.length);
Babbitt[Babbitt.length] = createMarker(new GPoint(-91.94853973,47.70881653),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Babbitt Elementary School",'Babbitt=' + Babbitt.length);
Babbitt[Babbitt.length] = createMarker(new GPoint(-91.94853973,47.70881653),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Babbitt Secondary School",'Babbitt=' + Babbitt.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.20934296,46.74686432),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bay View Elementary School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.22959900,46.67720032),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bethany Crisis Center",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.14177704,46.81174088),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Birchwood Magnet Elementary School",'Duluth=' + Duluth.length);
Hoyt_Lakes[Hoyt_Lakes.length] = createMarker(new GPoint(-92.13901520,47.51300049),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Boase Elementary School",'Hoyt_Lakes=' + Hoyt_Lakes.length);
Saginaw[Saginaw.length] = createMarker(new GPoint(-92.34182739,46.89433670),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Caribou Lake Elementary School",'Saginaw=' + Saginaw.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.11523437,46.79930496),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Central Secondary School",'Duluth=' + Duluth.length);
Iron[Iron.length] = createMarker(new GPoint(-92.70722961,47.40389252),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cherry Elementary School",'Iron=' + Iron.length);
Iron[Iron.length] = createMarker(new GPoint(-92.70722961,47.40389252),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cherry Secondary School",'Iron=' + Iron.length);
Chisholm[Chisholm.length] = createMarker(new GPoint(-92.85630035,47.51359940),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Chisholm Elementary School",'Chisholm=' + Chisholm.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.08502197,46.84988403),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Chisholm House Program",'Duluth=' + Duluth.length);
Chisholm[Chisholm.length] = createMarker(new GPoint(-92.88441467,47.48550034),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Chisholm Secondary School",'Chisholm=' + Chisholm.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.05842590,46.81663132),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Congdon Park Elementary School",'Duluth=' + Duluth.length);
Cook[Cook.length] = createMarker(new GPoint(-92.67821503,47.85370636),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cook Elementary School",'Cook=' + Cook.length);
Cook[Cook.length] = createMarker(new GPoint(-92.67821503,47.85370636),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cook Secondary School",'Cook=' + Cook.length);
Cotton[Cotton.length] = createMarker(new GPoint(-92.41899872,47.17589951),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cotton Elementary School",'Cotton=' + Cotton.length);
Cotton[Cotton.length] = createMarker(new GPoint(-92.41899872,47.17589951),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cotton Secondary School",'Cotton=' + Cotton.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.15766907,46.74828339),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Denfeld Senior High School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.10009003,46.78813934),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Duluth Alc High School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.10009003,46.78813934),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Duluth Excell Targeted Services",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09928800,46.78934200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Duluth Online",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09984900,46.78796500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Duluth Targeted Services",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.14177704,46.81174088),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Early Childhood Special Ed Elementary School",'Duluth=' + Duluth.length);
Eveleth[Eveleth.length] = createMarker(new GPoint(-92.53340912,47.46375275),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("East Range Sec. Tech. Center",'Eveleth=' + Eveleth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.06629181,46.81723785),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("East Senior High School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.10038757,46.82420349),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Edison Charter School",'Duluth=' + Duluth.length);
Eveleth[Eveleth.length] = createMarker(new GPoint(-92.53363037,47.46353912),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Eveleth-gilbert Junior Middle School",'Eveleth=' + Eveleth.length);
Eveleth[Eveleth.length] = createMarker(new GPoint(-92.53363037,47.46353912),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eveleth-gilbert Senior High School",'Eveleth=' + Eveleth.length);
Floodwood[Floodwood.length] = createMarker(new GPoint(-92.91590118,46.92190170),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Floodwood Alternative Center",'Floodwood=' + Floodwood.length);
Floodwood[Floodwood.length] = createMarker(new GPoint(-92.91590118,46.92190170),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Floodwood Elementary School",'Floodwood=' + Floodwood.length);
Floodwood[Floodwood.length] = createMarker(new GPoint(-92.91590118,46.92190170),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Floodwood Secondary School",'Floodwood=' + Floodwood.length);
Eveleth[Eveleth.length] = createMarker(new GPoint(-92.53363037,47.46353912),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franklin Elementary School",'Eveleth=' + Eveleth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09906769,46.80126572),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Grant Magnet Elementary School",'Duluth=' + Duluth.length);
Hibbing[Hibbing.length] = createMarker(new GPoint(-92.93729401,47.40720367),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greenhaven Elementary School",'Hibbing=' + Hibbing.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09600067,46.77360153),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Harbor City International Charter",'Duluth=' + Duluth.length);
Hermantown[Hermantown.length] = createMarker(new GPoint(-92.20808411,46.83528137),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hermantown Early Childhood Elementary School",'Hermantown=' + Hermantown.length);
Hermantown[Hermantown.length] = createMarker(new GPoint(-92.24479675,46.82217026),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hermantown Elementary School",'Hermantown=' + Hermantown.length);
Hermantown[Hermantown.length] = createMarker(new GPoint(-92.23833466,46.82143402),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hermantown Middle School",'Hermantown=' + Hermantown.length);
Hermantown[Hermantown.length] = createMarker(new GPoint(-92.24172211,46.82399368),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hermantown Senior High School",'Hermantown=' + Hermantown.length);
Hibbing[Hibbing.length] = createMarker(new GPoint(-92.93229675,47.42615891),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hibbing Senior High School",'Hibbing=' + Hibbing.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09600067,46.77360153),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Homebound Regular Ed",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09658813,46.78773880),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Homebound Special Ed",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.11128998,46.85662079),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Homecroft Elementary School",'Duluth=' + Duluth.length);
Buhl[Buhl.length] = createMarker(new GPoint(-92.68289948,47.85800171),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Iron Range School",'Buhl=' + Buhl.length);
Virginia[Virginia.length] = createMarker(new GPoint(-92.53880310,47.52020645),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("James Madison Elementary School",'Virginia=' + Virginia.length);
Proctor[Proctor.length] = createMarker(new GPoint(-92.21990204,46.74414444),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jedlicka Junior Middle School",'Proctor=' + Proctor.length);
Hibbing[Hibbing.length] = createMarker(new GPoint(-92.92038727,47.41716385),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Hibbing=' + Hibbing.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.15367126,46.88848877),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lake Superior High School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.00589752,46.93814468),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lakewood Elementary School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.16636658,46.74321365),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Laura Macarthur Elementary School",'Duluth=' + Duluth.length);
Britt[Britt.length] = createMarker(new GPoint(-92.63866425,47.68056870),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Laurentian Environmental Center",'Britt=' + Britt.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.01598358,46.83884048),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lester Park Elementary School",'Duluth=' + Duluth.length);
Hibbing[Hibbing.length] = createMarker(new GPoint(-92.92794037,47.42399216),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lincoln Middle School",'Hibbing=' + Hibbing.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.13243866,46.76650238),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Park Elementary School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.12008667,46.80963898),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lowell Music Magnet Elementary School",'Duluth=' + Duluth.length);
Buhl[Buhl.length] = createMarker(new GPoint(-92.77420044,47.49520111),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Martin Hughes Charter School",'Buhl=' + Buhl.length);
Ely[Ely.length] = createMarker(new GPoint(-91.85779572,47.90116119),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Memorial Secondary School",'Ely=' + Ely.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.16899872,46.73889923),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Merritt Day Treatment",'Duluth=' + Duluth.length);
Mountain_Iron[Mountain_Iron.length] = createMarker(new GPoint(-92.62729645,47.52220154),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Merritt Elementary School",'Mountain_Iron=' + Mountain_Iron.length);
Hibbing[Hibbing.length] = createMarker(new GPoint(-92.93229675,47.42616272),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mesabi Alc High School",'Hibbing=' + Hibbing.length);
Aurora[Aurora.length] = createMarker(new GPoint(-92.23937225,47.53217316),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mesabi East Elementary School",'Aurora=' + Aurora.length);
Aurora[Aurora.length] = createMarker(new GPoint(-92.23930359,47.53173828),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mesabi East Secondary School",'Aurora=' + Aurora.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09658813,46.78773880),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Miller-dwan Adoc",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09928800,46.78934200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Miller-dwan Cd",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.21089172,46.68783951),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Morgan Park Middle School",'Duluth=' + Duluth.length);
Mountain_Iron[Mountain_Iron.length] = createMarker(new GPoint(-92.62729645,47.52220154),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mountain Iron-buhl Secondary School",'Mountain_Iron=' + Mountain_Iron.length);
Saginaw[Saginaw.length] = createMarker(new GPoint(-92.31314087,46.91244888),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("N.e. Regional Correction Cntr.",'Saginaw=' + Saginaw.length);
Eveleth[Eveleth.length] = createMarker(new GPoint(-92.53363037,47.46353912),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nelle Shean Elementary School",'Eveleth=' + Eveleth.length);
Nett_Lake[Nett_Lake.length] = createMarker(new GPoint(-93.09358215,48.11151886),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nett Lake Elementary School",'Nett_Lake=' + Nett_Lake.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.10318756,46.79191208),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nettleton Magnet Elementary School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-91.89959717,46.93936539),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Shore Community School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.10440063,46.93690109),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("North Star Mid. Alp. Middle School",'Duluth=' + Duluth.length);
Mountain_Iron[Mountain_Iron.length] = createMarker(new GPoint(-92.62282900,47.53248000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northeast Service Cooperative",'Mountain_Iron=' + Mountain_Iron.length);
Virginia[Virginia.length] = createMarker(new GPoint(-92.51454900,47.50224900),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northland Learning Center",'Virginia=' + Virginia.length);
Virginia[Virginia.length] = createMarker(new GPoint(-92.34396362,47.53474045),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northland Learning Center / Ebd",'Virginia=' + Virginia.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09302521,46.81486130),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northwood School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.15738678,46.75553894),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northwood West",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.04178619,46.82680130),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Ordean Middle School",'Duluth=' + Duluth.length);
Orr[Orr.length] = createMarker(new GPoint(-92.82540131,48.11130142),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Orr Elementary School",'Orr=' + Orr.length);
Orr[Orr.length] = createMarker(new GPoint(-92.82540131,48.11130142),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Orr Secondary School",'Orr=' + Orr.length);
Virginia[Virginia.length] = createMarker(new GPoint(-92.53880310,47.52020645),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Parkview Elementary School",'Virginia=' + Virginia.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.15838623,46.78237915),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Piedmont Elementary School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.28155518,46.86457062),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pike Lake Elementary School",'Duluth=' + Duluth.length);
Proctor[Proctor.length] = createMarker(new GPoint(-92.21990204,46.74414444),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Proctor Intermediate Elementary School",'Proctor=' + Proctor.length);
Proctor[Proctor.length] = createMarker(new GPoint(-92.23570251,46.74347305),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Proctor Senior High School",'Proctor=' + Proctor.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.17195129,46.73104095),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Raleigh Primary/el Academy",'Duluth=' + Duluth.length);
Hibbing[Hibbing.length] = createMarker(new GPoint(-92.93229675,47.42616272),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Range Treatment Center",'Hibbing=' + Hibbing.length);
Mountain_Iron[Mountain_Iron.length] = createMarker(new GPoint(-92.59266663,47.51693726),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Region 3 - Northeast Service Coop",'Mountain_Iron=' + Mountain_Iron.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.02580261,46.84702682),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rockridge Elementary School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-94.52319300,39.10536000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Saint Luke's Hospital",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.11634064,46.79949951),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Secondary Technical Cntr",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09658813,46.78773880),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Special Ed. N.p.",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.22809601,46.66400909),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stowe Elementary School",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.09658813,46.78773880),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Teen Parent High School",'Duluth=' + Duluth.length);
Tower[Tower.length] = createMarker(new GPoint(-92.29149628,47.81629944),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Tower-soudan Elementary School",'Tower=' + Tower.length);
Tower[Tower.length] = createMarker(new GPoint(-92.29149628,47.81629944),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tower-soudan Secondary School",'Tower=' + Tower.length);
Biwabik[Biwabik.length] = createMarker(new GPoint(-92.34661865,47.53477859),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("V.l. Reishus Elementary School",'Biwabik=' + Biwabik.length);
Chisholm[Chisholm.length] = createMarker(new GPoint(-92.87856293,47.49840927),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vaughan Elementary School",'Chisholm=' + Chisholm.length);
Virginia[Virginia.length] = createMarker(new GPoint(-92.53880310,47.52020645),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Virginia Secondary School",'Virginia=' + Virginia.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.07358551,46.83133698),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Washburn Junior Academy",'Duluth=' + Duluth.length);
Hibbing[Hibbing.length] = createMarker(new GPoint(-92.92684174,47.42627335),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Hibbing=' + Hibbing.length);
Ely[Ely.length] = createMarker(new GPoint(-91.85800934,47.90132904),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Ely=' + Ely.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.08496094,46.84976196),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Woodland Hills Academy",'Duluth=' + Duluth.length);
Duluth[Duluth.length] = createMarker(new GPoint(-92.07469177,46.81573868),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Woodland Middle School",'Duluth=' + Duluth.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(Aurora);
map.removeOverlays(Babbitt);
map.removeOverlays(Biwabik);
map.removeOverlays(Britt);
map.removeOverlays(Buhl);
map.removeOverlays(Chisholm);
map.removeOverlays(Cook);
map.removeOverlays(Cotton);
map.removeOverlays(Duluth);
map.removeOverlays(Ely);
map.removeOverlays(Eveleth);
map.removeOverlays(Floodwood);
map.removeOverlays(Hermantown);
map.removeOverlays(Hibbing);
map.removeOverlays(Hoyt_Lakes);
map.removeOverlays(Iron);
map.removeOverlays(Mountain_Iron);
map.removeOverlays(Nett_Lake);
map.removeOverlays(Orr);
map.removeOverlays(Proctor);
map.removeOverlays(Saginaw);
map.removeOverlays(Tower);
map.removeOverlays(Virginia);
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(Saginaw);map.removeOverlays(Aurora);
map.removeOverlays(Babbitt);
map.removeOverlays(Biwabik);
map.removeOverlays(Britt);
map.removeOverlays(Buhl);
map.removeOverlays(Chisholm);
map.removeOverlays(Cook);
map.removeOverlays(Cotton);
map.removeOverlays(Duluth);
map.removeOverlays(Ely);
map.removeOverlays(Eveleth);
map.removeOverlays(Floodwood);
map.removeOverlays(Hermantown);
map.removeOverlays(Hibbing);
map.removeOverlays(Hoyt_Lakes);
map.removeOverlays(Iron);
map.removeOverlays(Mountain_Iron);
map.removeOverlays(Nett_Lake);
map.removeOverlays(Orr);
map.removeOverlays(Proctor);
map.removeOverlays(Saginaw);
map.removeOverlays(Tower);
map.removeOverlays(Virginia);
map.addOverlays(Aurora);
centerByArray(Aurora, false, false);
cntMarker += Aurora.length;
map.addOverlays(Babbitt);
centerByArray(Babbitt, false, false);
cntMarker += Babbitt.length;
map.addOverlays(Biwabik);
centerByArray(Biwabik, false, false);
cntMarker += Biwabik.length;
map.addOverlays(Britt);
centerByArray(Britt, false, false);
cntMarker += Britt.length;
map.addOverlays(Buhl);
centerByArray(Buhl, false, false);
cntMarker += Buhl.length;
map.addOverlays(Chisholm);
centerByArray(Chisholm, false, false);
cntMarker += Chisholm.length;
map.addOverlays(Cook);
centerByArray(Cook, false, false);
cntMarker += Cook.length;
map.addOverlays(Cotton);
centerByArray(Cotton, false, false);
cntMarker += Cotton.length;
map.addOverlays(Duluth);
centerByArray(Duluth, false, false);
cntMarker += Duluth.length;
map.addOverlays(Ely);
centerByArray(Ely, false, false);
cntMarker += Ely.length;
map.addOverlays(Eveleth);
centerByArray(Eveleth, false, false);
cntMarker += Eveleth.length;
map.addOverlays(Floodwood);
centerByArray(Floodwood, false, false);
cntMarker += Floodwood.length;
map.addOverlays(Hermantown);
centerByArray(Hermantown, false, false);
cntMarker += Hermantown.length;
map.addOverlays(Hibbing);
centerByArray(Hibbing, false, false);
cntMarker += Hibbing.length;
map.addOverlays(Hoyt_Lakes);
centerByArray(Hoyt_Lakes, false, false);
cntMarker += Hoyt_Lakes.length;
map.addOverlays(Iron);
centerByArray(Iron, false, false);
cntMarker += Iron.length;
map.addOverlays(Mountain_Iron);
centerByArray(Mountain_Iron, false, false);
cntMarker += Mountain_Iron.length;
map.addOverlays(Nett_Lake);
centerByArray(Nett_Lake, false, false);
cntMarker += Nett_Lake.length;
map.addOverlays(Orr);
centerByArray(Orr, false, false);
cntMarker += Orr.length;
map.addOverlays(Proctor);
centerByArray(Proctor, false, false);
cntMarker += Proctor.length;
map.addOverlays(Saginaw);
centerByArray(Saginaw, false, false);
cntMarker += Saginaw.length;
map.addOverlays(Tower);
centerByArray(Tower, false, false);
cntMarker += Tower.length;
map.addOverlays(Virginia);
centerByArray(Virginia, false, false);
cntMarker += Virginia.length;
centerByArray(Saginaw,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');
}
}