function addMarkers() { mySelect = document.getElementById('selection'); Albion = [];Battle_Creek = [];Athens = [];Bedford = [];Marshall = [];East_Leroy = [];Springfield = [];Homer = [];Parma = [];Tekonsha = [];mySelect.options[mySelect.options.length] = new Option("Albion schools",'all=Albion'); mySelect.options[mySelect.options.length] = new Option("Athens schools",'all=Athens'); mySelect.options[mySelect.options.length] = new Option("Battle Creek schools",'all=Battle_Creek'); mySelect.options[mySelect.options.length] = new Option("Bedford schools",'all=Bedford'); mySelect.options[mySelect.options.length] = new Option("East Leroy schools",'all=East_Leroy'); mySelect.options[mySelect.options.length] = new Option("Homer schools",'all=Homer'); mySelect.options[mySelect.options.length] = new Option("Marshall schools",'all=Marshall'); mySelect.options[mySelect.options.length] = new Option("Parma schools",'all=Parma'); mySelect.options[mySelect.options.length] = new Option("Springfield schools",'all=Springfield'); mySelect.options[mySelect.options.length] = new Option("Tekonsha schools",'all=Tekonsha'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Albion[Albion.length] = createMarker(new GPoint(-84.75441742,42.24511719),"
Albion Alternative Education
1418 Cooper Street
Albion, MI 49224

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Albion Alternative Education",'Albion=' + Albion.length); Albion[Albion.length] = createMarker(new GPoint(-84.74995422,42.25893784),"
Albion Senior High School
225 Watson Street
Albion, MI 49224

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Albion Senior High School",'Albion=' + Albion.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.15518188,42.31310272),"
Alternative Community Educat
50 Spencer Street
Battle Creek, MI 49015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alternative Community Educat",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19293976,42.32680511),"
Ann J. Kellogg School
306 Champion Street
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ann J. Kellogg School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.21383667,42.30228806),"
Arbor Academy
55 Arbor Street
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Arbor Academy",'Battle_Creek=' + Battle_Creek.length); Athens[Athens.length] = createMarker(new GPoint(-85.23255157,42.08636475),"
Athens High School
300 E. Holcomb Street
Athens, MI 49011

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Athens High School",'Athens=' + Athens.length); Athens[Athens.length] = createMarker(new GPoint(-85.22938538,42.08446503),"
Athens Middle School
515 E. Williams Street
Athens, MI 49011

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Athens Middle School",'Athens=' + Athens.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.23368073,42.26076126),"
Battle Creek Area Learning Center
15 S. Arbor Street
Battle Creek, MI 49015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Battle Creek Area Learning Center",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.18197632,42.32232666),"
Battle Creek Central High School
100 W. Van Buren Street
Battle Creek, MI 49017

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Battle Creek Central High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.22512817,42.32233047),"
Battle Creek Math-sci Center
765 Upton Avenue
Battle Creek, MI 49015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Battle Creek Math-sci Center",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.13561249,42.27223587),"
Beadle Lake Elementary School
8175 C Drive North
Battle Creek, MI 49014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beadle Lake Elementary School",'Battle_Creek=' + Battle_Creek.length); Bedford[Bedford.length] = createMarker(new GPoint(-85.23171997,42.39592743),"
Bedford Elementary School
315 Hutchinson Road
Bedford, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bedford Elementary School",'Bedford=' + Bedford.length); Albion[Albion.length] = createMarker(new GPoint(-84.74851227,42.25624084),"
Caldwell Elementary School
1100 N. Berrien Street
Albion, MI 49224

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Caldwell Elementary School",'Albion=' + Albion.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.17337799,42.33935165),"
Calhoun Area Technology Center
475 Roosevelt Avenue E.
Battle Creek, MI 49017

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calhoun Area Technology Center",'Battle_Creek=' + Battle_Creek.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.93659973,42.28319168),"
Calhoun Co. Juvenile Home School
14555 18 12 Mile Road
Marshall, MI 49068

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calhoun Co. Juvenile Home School",'Marshall=' + Marshall.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.20628357,42.31010056),"
Coburn School
39 Fairhome Avenue
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Coburn School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.13535309,42.32294846),"
Doris Klaussen Dev. Center
408 Jameson Street
Battle Creek, MI 49014

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Doris Klaussen Dev. Center",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.20043945,42.33847809),"
Dudley School
308 Roosevelt Avenue W.
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dudley School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.17968750,42.32114410),"
Early Childhood Education Elementary School
77 Capital Ave Ne
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Early Childhood Education Elementary School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.23368073,42.26076126),"
Early Childhood-prep Elementary School
8587 Q Drive North
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Early Childhood-prep Elementary School",'Battle_Creek=' + Battle_Creek.length); East_Leroy[East_Leroy.length] = createMarker(new GPoint(-85.21434784,42.16636276),"
East Leroy Elementary School
4320 K Drive South
East Leroy, MI 49051

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("East Leroy Elementary School",'East_Leroy=' + East_Leroy.length); Springfield[Springfield.length] = createMarker(new GPoint(-85.23856354,42.32293701),"
Endeavor Charter Academy
380 North Helmer Road
Springfield, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Endeavor Charter Academy",'Springfield=' + Springfield.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.17306519,42.30812073),"
Franklin School
20 Newark Avenue
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Franklin School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.17519379,42.32995224),"
Fremont School
115 E. Emmett Street
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fremont School",'Battle_Creek=' + Battle_Creek.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.95181274,42.27423859),"
Gordon Elementary School
400 N. Gordon Street
Marshall, MI 49068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gordon Elementary School",'Marshall=' + Marshall.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.15338898,42.26115036),"
Harper Creek High School
12677 Beadle Lake Road
Battle Creek, MI 49014

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harper Creek High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.15039062,42.26116180),"
Harper Creek Junior High School
7454 B Drive North
Battle Creek, MI 49014

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Harper Creek Junior High School",'Battle_Creek=' + Battle_Creek.length); Albion[Albion.length] = createMarker(new GPoint(-84.73639679,42.24527740),"
Harrington Elementary School
100 S. Clark Street
Albion, MI 49224

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harrington Elementary School",'Albion=' + Albion.length); Homer[Homer.length] = createMarker(new GPoint(-84.80886841,42.14294434),"
Homer Community High School
403 S. Hillsdale Street
Homer, MI 49245

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Homer Community High School",'Homer=' + Homer.length); Homer[Homer.length] = createMarker(new GPoint(-84.80886841,42.14294434),"
Homer Middle School
403 S. Hillsdale Street
Homer, MI 49245

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Homer Middle School",'Homer=' + Homer.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.95724487,42.26096344),"
Hughes Elementary School
103 W. Hughes Street
Marshall, MI 49068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hughes Elementary School",'Marshall=' + Marshall.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.21408844,42.30332184),"
Lakeview Alternative Educati High School
15 Arbor Street
Battle Creek, MI 49015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeview Alternative Educati High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.22858429,42.29565048),"
Lakeview High School
15060 S. Helmer Road
Battle Creek, MI 49015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeview High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.21655273,42.30311203),"
Lakeview Junior High School
20 S. Woodrow Avenue
Battle Creek, MI 49015

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lakeview Junior High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.24210358,42.34999847),"
Lamora Park School
65 N. Woodlawn Avenue
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lamora Park School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.20256042,42.32753754),"
Level Park School
3515 W. Michigan Avenue
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Level Park School",'Battle_Creek=' + Battle_Creek.length); Homer[Homer.length] = createMarker(new GPoint(-84.80886841,42.14294434),"
Lillian Fletcher Elementary School
403 S. Hillsdale Street
Homer, MI 49245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lillian Fletcher Elementary School",'Homer=' + Homer.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.95861053,42.27096176),"
Madison Elementary School
100 E. Green Street
Marshall, MI 49068

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Madison Elementary School",'Marshall=' + Marshall.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.88254547,42.30496216),"
Mar Lee School
21236 H Drive North
Marshall, MI 49068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mar Lee School",'Marshall=' + Marshall.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.94184113,42.25208664),"
Marshall Academy
18203 Homer Road
Marshall, MI 49068

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marshall Academy",'Marshall=' + Marshall.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.96770477,42.27313614),"
Marshall Alternative High School
624 W. Mansion Street
Marshall, MI 49068

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marshall Alternative High School",'Marshall=' + Marshall.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.95468140,42.28276443),"
Marshall High School
701 N. Marshall Avenue
Marshall, MI 49068

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marshall High School",'Marshall=' + Marshall.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.95861053,42.27096176),"
Marshall Middle School
100 E. Green Street
Marshall, MI 49068

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Marshall Middle School",'Marshall=' + Marshall.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.16719818,42.32359314),"
Mckinley Elementary School
400 Capital Avenue Ne
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.21391296,42.30377960),"
Michigan School Readiness Preschool
15 Arbor Street
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Michigan School Readiness Preschool",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.21649933,42.39540100),"
Michigan Youth Challenge Academy
5500 Armstrong Building 13
Battle Creek, MI 49016

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Michigan Youth Challenge Academy",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19624329,42.27721024),"
Minges Brook School
435 Lincoln Hills Drive
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Minges Brook School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.21002960,42.33895493),"
Northwestern Junior High School
176 Limit Street
Battle Creek, MI 49017

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northwestern Junior High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.20999908,42.33885193),"
Northwestern Middle School
176 Limit Street
Battle Creek, MI 49017

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northwestern Middle School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.18093109,42.31734467),"
Operation Graduation High School
56 East Michigan
Battle Creek, MI 49017

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Operation Graduation High School",'Battle_Creek=' + Battle_Creek.length); Parma[Parma.length] = createMarker(new GPoint(-84.59671021,42.25532532),"
Parma Elementary School
385 Elizabeth Street
Parma, MI 49269

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parma Elementary School",'Parma=' + Parma.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.13050079,42.37013626),"
Pennfield Central School
8587 Q Drive North
Battle Creek, MI 49017

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pennfield Central School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.13050079,42.37013626),"
Pennfield Dunlap Middle School
8587 Q Drive North
Battle Creek, MI 49017

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pennfield Dunlap Middle School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.13050079,42.37013626),"
Pennfield North School
8587 Q Drive North
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pennfield North School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.13050079,42.37013626),"
Pennfield Purdy School
8587 Q Drive North
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pennfield Purdy School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.13050079,42.37013626),"
Pennfield Senior High School
8587 Q Drive North
Battle Creek, MI 49017

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pennfield Senior High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.15869141,42.30956268),"
Post Elementary School
340 Cliff Street
Battle Creek, MI 49014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Post Elementary School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.20706177,42.30114746),"
Prairieview School
1675 Iroquois Avenue
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prairieview School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.18932343,42.29049683),"
Riverside Elementary School
650 Riverside Drive
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Riverside Elementary School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19662476,42.30859375),"
Roosevelt School
485 Capital Avenue Sw
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19451904,42.23196411),"
Sonoma School
4640 B Drive South
Battle Creek, MI 49014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sonoma School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.15511322,42.31313705),"
South Hill Academy
50 Spencer Street
Battle Creek, MI 49017

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Hill Academy",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19628143,42.31296158),"
Southwestern Academy
390 S. Washington Avenue
Battle Creek, MI 49015

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Southwestern Academy",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19609070,42.31278229),"
Southwestern Junior High School
388 S. Washington Avenue
Battle Creek, MI 49015

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Southwestern Junior High School",'Battle_Creek=' + Battle_Creek.length); Springfield[Springfield.length] = createMarker(new GPoint(-85.24647522,42.32639694),"
Springfield Middle School
1023 Avenue A
Springfield, MI 49015

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Springfield Middle School",'Springfield=' + Springfield.length); Albion[Albion.length] = createMarker(new GPoint(-84.80095673,42.28176117),"
Starr Commonwealth For Boys
13725 26 Mile Road
Albion, MI 49224

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Starr Commonwealth For Boys",'Albion=' + Albion.length); Tekonsha[Tekonsha.length] = createMarker(new GPoint(-84.98893738,42.09183884),"
Tekonsha Elementary School
327 Catherine Street
Tekonsha, MI 49092

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tekonsha Elementary School",'Tekonsha=' + Tekonsha.length); Tekonsha[Tekonsha.length] = createMarker(new GPoint(-84.98972321,42.09086990),"
Tekonsha Middle School
245 S. Elm Street
Tekonsha, MI 49092

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Tekonsha Middle School",'Tekonsha=' + Tekonsha.length); Tekonsha[Tekonsha.length] = createMarker(new GPoint(-84.98972321,42.09086990),"
Tekonsha Senior High School
245 S. Elm Street
Tekonsha, MI 49092

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tekonsha Senior High School",'Tekonsha=' + Tekonsha.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.21408844,42.30332184),"
Territorial School
15 Arbor Street
Battle Creek, MI 49015

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Territorial School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.23107147,42.34044266),"
Urbandale School
123 N. Bedford Road
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Urbandale School",'Battle_Creek=' + Battle_Creek.length); Springfield[Springfield.length] = createMarker(new GPoint(-85.24497223,42.32653809),"
Valley View Elementary School
960 Avenue A
Springfield, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Valley View Elementary School",'Springfield=' + Springfield.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.15560913,42.33179855),"
Verona School
825 Capital Ne
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Verona School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.18110657,42.32172775),"
W.k. Kellogg Junior High School
60 W. Van Buren Street
Battle Creek, MI 49017

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("W.k. Kellogg Junior High School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.18104553,42.32187653),"
W.k. Kellogg Middle School
60 W. Van Buren Street
Battle Creek, MI 49017

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("W.k. Kellogg Middle School",'Battle_Creek=' + Battle_Creek.length); Marshall[Marshall.length] = createMarker(new GPoint(-84.95468140,42.28097153),"
Walters Elementary School
705 N. Marshall Avenue
Marshall, MI 49068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walters Elementary School",'Marshall=' + Marshall.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19021606,42.33886337),"
Washington Academy
450 N. Washington Avenue
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Academy",'Battle_Creek=' + Battle_Creek.length); Albion[Albion.length] = createMarker(new GPoint(-84.76367950,42.25793839),"
Washington Gardner Elementary School
401 E Michigan Ave
Albion, MI 49224

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Gardner Elementary School",'Albion=' + Albion.length); Albion[Albion.length] = createMarker(new GPoint(-84.74840546,42.24693680),"
Washington Gardner Middle School
401 E. Michigan Avenue
Albion, MI 49224

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Washington Gardner Middle School",'Albion=' + Albion.length); Albion[Albion.length] = createMarker(new GPoint(-84.74840546,42.24693680),"
Washington Gardner Open School
401 E. Michigan Avenue
Albion, MI 49224

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Gardner Open School",'Albion=' + Albion.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.19036865,42.33864212),"
Washington School
450 N. Washington Avenue
Battle Creek, MI 49017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.11116028,42.30719376),"
Wattles Park Elementary School
132 S. Wattles Road
Battle Creek, MI 49014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wattles Park Elementary School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.22799683,42.28720856),"
Westlake Elementary School
1184 S. 24th Street
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westlake Elementary School",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.20240021,42.31713486),"
Wilson Academy
71 Blanche Street
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wilson Academy",'Battle_Creek=' + Battle_Creek.length); Battle_Creek[Battle_Creek.length] = createMarker(new GPoint(-85.22000122,42.30009842),"
Wilson School
71 Blanche Street
Battle Creek, MI 49015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wilson School",'Battle_Creek=' + Battle_Creek.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(Albion); map.removeOverlays(Athens); map.removeOverlays(Battle_Creek); map.removeOverlays(Bedford); map.removeOverlays(East_Leroy); map.removeOverlays(Homer); map.removeOverlays(Marshall); map.removeOverlays(Parma); map.removeOverlays(Springfield); map.removeOverlays(Tekonsha); 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(Albion);map.removeOverlays(Albion); map.removeOverlays(Athens); map.removeOverlays(Battle_Creek); map.removeOverlays(Bedford); map.removeOverlays(East_Leroy); map.removeOverlays(Homer); map.removeOverlays(Marshall); map.removeOverlays(Parma); map.removeOverlays(Springfield); map.removeOverlays(Tekonsha); map.addOverlays(Albion); centerByArray(Albion, false, false); cntMarker += Albion.length; map.addOverlays(Athens); centerByArray(Athens, false, false); cntMarker += Athens.length; map.addOverlays(Battle_Creek); centerByArray(Battle_Creek, false, false); cntMarker += Battle_Creek.length; map.addOverlays(Bedford); centerByArray(Bedford, false, false); cntMarker += Bedford.length; map.addOverlays(East_Leroy); centerByArray(East_Leroy, false, false); cntMarker += East_Leroy.length; map.addOverlays(Homer); centerByArray(Homer, false, false); cntMarker += Homer.length; map.addOverlays(Marshall); centerByArray(Marshall, false, false); cntMarker += Marshall.length; map.addOverlays(Parma); centerByArray(Parma, false, false); cntMarker += Parma.length; map.addOverlays(Springfield); centerByArray(Springfield, false, false); cntMarker += Springfield.length; map.addOverlays(Tekonsha); centerByArray(Tekonsha, false, false); cntMarker += Tekonsha.length; centerByArray(Albion,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'); } }