function addStateMarkers()
{
mySelect = document.getElementById('selection');
boys[boys.length] = createMarker(new GPoint(-95.198571,42.639483),"
",iconBl);
mySelect.options[mySelect.options.length] = new Option("Academy of St. Xavier",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-85.09829712,33.57210159),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Advanced Academy of Georgia",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-81.39728,41.643149),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Andrews Osborne Academy",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-122.458797,47.268113),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Annie Wright School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-75.676219,45.448593),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ashbury College",'coEd=' + coEd.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(-85.332423,35.085592),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Baylor School",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-79.409323,43.689616),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("The Bishop Strachan School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-123.558769,48.668178),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brentwood College School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-77.188705,40.422305),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Carson Long Military Institute",'boys=' + boys.length);
girls[girls.length] = createMarker(new GPoint(-79.390374,36.826967),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chatham Hall",'girls=' + girls.length);
boys[boys.length] = createMarker(new GPoint(-82.493542,35.464827),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Christ School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-83.245219,42.58384),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cranbrook Schools",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-86.407273,41.222456),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Culver Academies",'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);
coEd[coEd.length] = createMarker(new GPoint(-85.18276,34.224318),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Darlington School",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-73.665465,42.711862),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Emma Willard School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-77.088839,38.82517),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Episcopal High School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-78.890035,38.067391),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Fishburne Military School",'boys=' + boys.length);
girls[girls.length] = createMarker(new GPoint(-118.183414,34.180484),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Flintridge Sacred Heart Academy",'girls=' + girls.length);
boys[boys.length] = createMarker(new GPoint(-78.265719,37.78217),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Fork Union Military Academy",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-104.715236,38.739758),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fountain Valley School of Colorado",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-77.732499,38.9692),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Foxcroft School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-74.895923,40.26181),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("George School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-80.862222,41.772859),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Grand River Academy",'boys=' + boys.length);
girls[girls.length] = createMarker(new GPoint(-78.252693,40.656276),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Grier School",'girls=' + girls.length);
boys[boys.length] = createMarker(new GPoint(-79.400065,36.832311),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hargrave Military Academy",'boys=' + boys.length);
girls[girls.length] = createMarker(new GPoint(-79.414579,43.71831),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Havergal College",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-74.68237,40.337961),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Hun School of Princeton",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-85.767016,44.632601),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Interlochen Arts Academy",'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);
boys[boys.length] = createMarker(new GPoint(-79.456709,40.488088),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("The Kiski School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-73.187752,40.915613),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Knox School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-86.714133,41.704459),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("La Lumiere School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(7.008235,46.341739),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Leysin American School in Switzerland (LAS)",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-76.301985,40.156182),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Linden Hall",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-106.823878,40.538029),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lowell Whiteman 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(-78.510166,38.875789),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Massanutten Military Academy",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-85.273401,35.030406),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("McCallie School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-77.899955,39.828176),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mercersburg 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);
boys[boys.length] = createMarker(new GPoint(-91.869114,39.172054),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Missouri Military Academy",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-104.522939,33.408738),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New Mexico Military Institute",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-74.027129,41.44596),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("New York Military Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-80.186436,26.326055),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North Broward Preparatory School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-81.150569,39.988129),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Olney Friends School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-74.539664,40.276315),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Peddie School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-74.793636,40.327694),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Pennington School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-75.50335,40.398676),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Perkiomen 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(-83.390888,34.961812),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rabun Gap-Nacoochee School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-78.198376,38.922718),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Randolph-Macon Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-79.248669,43.156335),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ridley College",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-79.636436,45.252399),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rosseau Lake College",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-85.891144,35.217474),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Andrew's-Sewanee School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-93.075369,44.909599),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Croix Schools",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-88.404159,43.064276),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("St. John's Northwestern Military Academy",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-94.362095,45.594855),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Saint John's Preparatory School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-123.325727,48.450646),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Michaels University 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);
girls[girls.length] = createMarker(new GPoint(-76.685687,39.40758),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("St. Timothy's School",'girls=' + girls.length);
girls[girls.length] = createMarker(new GPoint(-80.237363,36.089291),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Salem Academy",'girls=' + girls.length);
boys[boys.length] = createMarker(new GPoint(-73.392929,42.000938),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Salisbury School",'boys=' + boys.length);
girls[girls.length] = createMarker(new GPoint(-121.871756,36.593685),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Santa Catalina School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-91.307874,41.66373),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Scattergood Friends School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-93.290045,44.298698),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Shattuck-St. Mary's School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-124.311341,49.088128),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Shawnigan Lake School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-74.988413,40.381852),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Solebury School",'coEd=' + coEd.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);
coEd[coEd.length] = createMarker(new GPoint(-120.22290039,39.18030167),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Squaw Valley Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-72.096062,45.011868),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Stanstead College",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-74.010774,41.423084),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Storm King School",'coEd=' + coEd.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(-83.390819,34.73498),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Tallulah Falls School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-90.396519,38.539627),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson School",'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(-98.601761,29.635594),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("TMI -The Episcopal School of Texas",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-75.384208,40.052801),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Valley Forge Military Academy",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-76.001053,45.339674),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Venta Preparatory School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-119.265681,34.432224),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Villanova Preparatory School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-79.187224,37.453353),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Virginia Episcopal School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-111.457461,39.544885),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wasatch Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-88.828846,43.456381),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wayland Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-86.389888,35.610794),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Webb School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-93.873143,39.186442),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wentworth Military Academy & College",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-81.43737,41.243839),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Western Reserve 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);
coEd[coEd.length] = createMarker(new GPoint(-75.897931,41.263129),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wyoming Seminary Upper 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);
}
}