function addStateMarkers() { mySelect = document.getElementById('selection'); coEd[coEd.length] = createMarker(new GPoint(-72.603726,42.548158),"
Bement School
94 Old Main Street, PO Box 8
Deerfield, MA 01342
Co-ed school, 3-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bement School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-73.408248,42.115787),"
Berkshire School
245 North Undermountain Road
Sheffield, MA 01257
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Berkshire School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.08288,42.707418),"
Brooks School
1160 Great Pond Road
North Andover, MA 01845
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brooks School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-73.213291,42.704628),"
Buxton School
291 South Street
Williamstown, MA 01267
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Buxton School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.271775,42.38644),"
The Cambridge School of Weston
Georgian Road
Weston, MA 02493
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Cambridge School of Weston",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.234103,42.386016),"
Chapel Hill-Chauncy Hall
785 Beaver Street
Waltham, MA 02452
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chapel Hill-Chauncy Hall",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.354201,42.459272),"
Concord Academy
166 Main Street
Concord, MA 01742
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Concord Academy",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.908354,42.6358),"
Cushing Academy
39 School Street, P.O. Box 8000
Ashburnham, MA 01430
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cushing Academy",'coEd=' + coEd.length); girls[girls.length] = createMarker(new GPoint(-71.287817,42.291943),"
Dana Hall School
45 Dana Road
Wellesley, MA 02482
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dana Hall School",'girls=' + girls.length); coEd[coEd.length] = createMarker(new GPoint(-72.601999,42.54247),"
Deerfield Academy
Office of Admission
Deerfield, MA 01342
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Deerfield Academy",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-72.184923,42.366752),"
Eagle Hill School
P.O. Box 116 242 Old Petersham Road
Hardwick, MA 01037
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eagle Hill School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.532888,42.305315),"
Fay School
48 Main Street
Southborough, MA 01772
Co-ed school, 6-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fay School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-70.895894,42.750704),"
The Governor's Academy <br> (formerly Governor Dummer Academy)
1 Elm Street
Byfield, MA 01922
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Governor's Academy <br> (formerly Governor Dummer Academy)",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.582122,42.593804),"
Groton School
282 Farmers Row, Box 991
Groton, MA 01450
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Groton School",'coEd=' + coEd.length); boys[boys.length] = createMarker(new GPoint(-71.604902,42.350966),"
Hillside School
404 Robin Hill Road
Marlborough, MA 01752
All-boys school, 5-9
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hillside School",'boys=' + boys.length); coEd[coEd.length] = createMarker(new GPoint(-70.82465,42.559757),"
Landmark School
P.O. Box 227
Prides Crossing, MA 01965
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Landmark School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.571599,42.608505),"
Lawrence Academy
Powderhouse Road, P.O. Box 992
Groton, MA 01450
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lawrence Academy",'coEd=' + coEd.length); boys[boys.length] = createMarker(new GPoint(-72.45345,42.649822),"
Linden Hill School
154 South Mountain Rd
Northfield, MA 01360
All-boys school, 3-9
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Linden Hill School",'boys=' + boys.length); coEd[coEd.length] = createMarker(new GPoint(-72.57628,42.098013),"
The MacDuffie School
One Ames Hill Drive
Springfield, MA 01105
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The MacDuffie School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.371622,42.493361),"
Middlesex School
1400 Lowell Road
Concord, MA 01742
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Middlesex School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.07054,42.25648),"
Milton Academy
170 Centre Street
Milton, MA 02186
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Milton Academy",'coEd=' + coEd.length); girls[girls.length] = createMarker(new GPoint(-73.254221,42.447408),"
Miss Hall's School
492 Holmes Road, PO Box 1166
Pittsfield, MA 01201
All-girls school, 9-12, PG
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Miss Hall's School",'girls=' + girls.length); coEd[coEd.length] = createMarker(new GPoint(-72.488606,42.673004),"
Northfield Mount Hermon School
One Lamplighter Way
Mount Hermon, MA 01354
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northfield Mount Hermon School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.134868,42.648486),"
Phillips Academy Andover
180 Main Street
Andover, MA 01810
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phillips Academy Andover",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-71.531945,42.305764),"
St. Mark's School
25 Marlborough Road
Southborough, MA 01772
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mark's School",'coEd=' + coEd.length); girls[girls.length] = createMarker(new GPoint(-72.582667,42.612559),"
Stoneleigh-Burnham School
574 Bernardston Road
Greenfield, MA 01301
All-girls school, 7-12, PG
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stoneleigh-Burnham School",'girls=' + girls.length); coEd[coEd.length] = createMarker(new GPoint(-70.761159,41.697687),"
Tabor Academy
66 Front Street
Marion, MA 02738
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tabor Academy",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-72.431297,42.125207),"
Wilbraham & Monson Academy
423 Main Street
Wilbraham, MA 01095
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wilbraham & Monson Academy",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-72.672417,42.266543),"
The Williston Northampton School
19 Payson Avenue
Easthampton, MA 01027
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Williston Northampton School",'coEd=' + coEd.length); coEd[coEd.length] = createMarker(new GPoint(-72.036714,42.67519),"
The Winchendon School
172 Ash Street
Winchendon, MA 01475
Co-ed school, 9-12, PG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Winchendon School",'coEd=' + coEd.length); var markers = coEd.concat(boys); markers = girls.concat(markers); var bounds = arrayBounds(markers); 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 = myMap.getBoundsZoomLevel(bounds); if(zoom==17) zoom=4; myMap.setCenter(center,zoom); myMap.addOverlays(coEd); myMap.addOverlays(boys); myMap.addOverlays(girls); } // End addStateMarkers JavaScript Function function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; } function selectChange(selection) { var myVal = selection.options[selection.selectedIndex].value; if (myVal.indexOf('boys') != -1 && myVal.indexOf('all') == -1) { var temp = myVal.split('='); var myIndex = parseInt(temp[1]) - 1; myMap.removeOverlay(boys[myIndex]); myMap.addOverlay(boys[myIndex]); GEvent.trigger(boys[myIndex],'click'); } if (myVal.indexOf('coEd') != -1 && myVal.indexOf('all') == -1) { var temp = myVal.split('='); var myIndex = parseInt(temp[1]) - 1; myMap.removeOverlay(coEd[myIndex]); myMap.addOverlay(coEd[myIndex]); GEvent.trigger(coEd[myIndex],'click'); } if (myVal.indexOf('girls') != -1 && myVal.indexOf('all') == -1) { var temp = myVal.split('='); var myIndex = parseInt(temp[1]) - 1; myMap.removeOverlay(girls[myIndex]); myMap.addOverlay(girls[myIndex]); GEvent.trigger(girls[myIndex],'click'); } if (myVal.indexOf('all') != -1 && myVal != 'all') { var temp = myVal.split('='); var showArray = temp[1]; myMap.clearOverlays() myMap.addOverlays(eval(showArray)); } if (myVal == 'all') { myMap.clearOverlays() myMap.addOverlays(coEd); myMap.addOverlays(boys); myMap.addOverlays(girls); } }