function addStateMarkers()
{
mySelect = document.getElementById('selection');
girls[girls.length] = createMarker(new GPoint(-72.084535,41.616825),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Academy of the Holy Family",'girls=' + girls.length);
boys[boys.length] = createMarker(new GPoint(-72.836502,41.781261),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Avon Old Farms School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-72.603726,42.548158),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bement School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.408248,42.115787),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Berkshire School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.20654,43.581712),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brewster Academy",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-70.704079,44.05502),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Bridgton Academy",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-71.08288,42.707418),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brooks School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.213291,42.704628),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Buxton School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.271775,42.38644),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Cambridge School of Weston",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.412634,41.585649),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Canterbury School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-72.036496,43.676448),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Cardigan Mountain School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-71.234103,42.386016),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Chapel Hill-Chauncy Hall",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.901089,41.500662),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cheshire Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.807511,41.45667),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Choate Rosemary Hall",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.354201,42.459272),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Concord Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.908354,42.6358),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cushing Academy",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-71.287817,42.291943),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dana Hall School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-72.601999,42.54247),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Deerfield Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.069609,42.90525),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dublin School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.184923,42.366752),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Eagle Hill School",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-72.835373,41.849302),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("The Ethel Walker School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-71.532888,42.305315),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fay School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.193369,41.746775),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Forman School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-69.274573,45.180386),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Foxcroft Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.976421,44.019861),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fryeburg Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-68.589532,44.413244),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("George Stevens Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.301923,41.647383),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Glenholme School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.790939,44.404085),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Gould Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.895894,42.750704),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Governor's Academy <br> (formerly Governor Dummer Academy)",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-72.554108,42.975764),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("The Greenwood School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-71.582122,42.593804),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Groton School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.310565,41.629329),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Gunnery",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-71.939744,42.740273),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hampshire Country School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-70.407614,44.19822),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hebron Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.755044,42.818427),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("High Mowing School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-71.604902,42.350966),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hillside School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-71.688166,43.757797),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Holderness School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.440469,41.96427),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Hotchkiss School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-69.820655,43.906893),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hyde-Bath",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.973239,41.946385),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hyde-Woodstock",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.502981,41.778838),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kent School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.027169,44.40958),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kents Hill School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.267903,43.535228),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kimball Union Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.82465,42.559757),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Landmark School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.571599,42.608505),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lawrence Academy",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-72.45345,42.649822),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Linden Hill School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-72.644174,41.85076),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Loomis Chaffee School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.57628,42.098013),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The MacDuffie School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-71.978549,43.083471),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Maharishi Academy of Total Knowledge",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-73.455403,41.782029),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Marvelwood School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.048629,42.74757),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Meeting School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.371622,42.493361),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Middlesex School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.07054,42.25648),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Milton Academy",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-73.254221,42.447408),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Miss Hall's School",'girls=' + girls.length);
girls[girls.length] = createMarker(new GPoint(-72.829305,41.722305),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Miss Porter's School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-71.652138,43.605723),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New Hampton School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.488606,42.673004),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northfield Mount Hermon School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.057533,44.04341),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oliverian School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.134868,42.648486),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Phillips Academy Andover",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.952346,42.981339),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Phillips Exeter Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.960109,41.897689),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pomfret School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.253192,41.588797),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Portsmouth Abbey School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.823119,43.436695),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Proctor Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.540423,42.97163),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Putney School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.960109,41.897689),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Rectory School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.324712,41.748702),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Andrew's School - RI",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.311849,41.49655),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. George's School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.015709,44.418512),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Johnsbury Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.531945,42.305764),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Mark's School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.567187,43.197562),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Paul's School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-72.213849,41.514501),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("St. Thomas More School",'boys=' + boys.length);
boys[boys.length] = createMarker(new GPoint(-73.392929,42.000938),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Salisbury School",'boys=' + boys.length);
boys[boys.length] = createMarker(new GPoint(-73.408287,41.730679),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("South Kent School",'boys=' + boys.length);
girls[girls.length] = createMarker(new GPoint(-72.582667,42.612559),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stoneleigh-Burnham School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-72.649803,41.985481),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Suffield Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.761159,41.697687),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tabor Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.12333,41.602959),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Taft School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-70.438973,43.505211),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Thornton Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.588921,43.444297),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tilton School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.5086,43.141777),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Vermont Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-67.263828,44.772224),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Washington Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.798108,41.885944),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Westminster School",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-73.123138,41.527244),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Westover School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-71.751681,44.278798),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The White Mountain School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.431297,42.125207),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wilbraham & Monson Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.672417,42.266543),"",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),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Winchendon School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-71.210672,43.585433),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wolfeboro: The Summer Boarding 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);
}
}