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);
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);
coEd[coEd.length] = createMarker(new GPoint(-82.620004,35.568684),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Asheville 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(-74.96288,40.983113),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Blair Academy",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-78.556044,38.265762),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Blue Ridge School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-95.412997,32.107838),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Brook Hill School",'coEd=' + coEd.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.412634,41.585649),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Canterbury School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-75.594869,40.031928),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("CFS, The School at Church Farm",'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);
boys[boys.length] = createMarker(new GPoint(-76.546749,37.609504),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Christchurch School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-91.666417,44.052916),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cotter Schools",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-81.436658,26.337618),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Donahue Academy of Ave Maria",'coEd=' + coEd.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);
coEd[coEd.length] = createMarker(new GPoint(-80.086059,42.043896),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Family First Academy",'coEd=' + coEd.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(-74.895923,40.26181),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("George School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-77.107054,39.034361),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Georgetown Preparatory 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);
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(-71.688166,43.757797),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Holderness School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.328892,42.862203),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hoosac School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-78.161082,42.425488),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Houghton Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-85.425795,41.724904),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Howe Military School & Summer Camp",'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(-83.743895,35.87612),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The King's Academy",'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(-105.938609,48.407325),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lustre Christian High School",'coEd=' + coEd.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(-72.048629,42.74757),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Meeting School",'coEd=' + coEd.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(-121.767949,36.982081),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Monte Vista Christian School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-81.395846,36.610731),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oak Hill Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-79.987261,36.174596),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oak Ridge Military Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-83.422144,37.554539),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oakdale Christian Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-73.925175,41.658549),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oakwood Friends 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(-122.757684,45.475098),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oregon Episcopal 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(-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(-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(-65.99284,45.380232),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rothesay Netherwood School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-77.092873,38.937851),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("St. Albans School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-80.147156,26.385019),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Saint Andrew's School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-75.697925,39.473931),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Andrew's School, DE",'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);
boys[boys.length] = createMarker(new GPoint(-117.920165,33.835379),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("St. Catherine's Military Academy",'boys=' + boys.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);
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(-77.737759,39.57571),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Saint James School",'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);
girls[girls.length] = createMarker(new GPoint(-76.899868,37.905395),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("St. Margaret's School",'girls=' + girls.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);
girls[girls.length] = createMarker(new GPoint(-78.65225,35.781285),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Saint Mary's School",'girls=' + girls.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);
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(-89.328006,30.307026),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("St. Stanislaus College",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-97.815209,30.333792),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Stephen's Episcopal 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);
girls[girls.length] = createMarker(new GPoint(-122.585449,38.013182),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("San Domenico School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-97.992536,29.903601),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("San Marcos Baptist Academy",'coEd=' + coEd.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);
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(-73.128543,40.921678),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Stony Brook School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-79.075981,38.150288),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Stuart Hall School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-93.627202,35.297455),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Subiaco Academy",'boys=' + boys.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(-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(-73.592985,41.570816),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Trinity Pawling School",'boys=' + boys.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(-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(-75.552894,39.930675),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Westtown School",'coEd=' + coEd.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);
boys[boys.length] = createMarker(new GPoint(-79.288435,37.362861),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Woodberry Forest School",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-122.215246,37.37478),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Woodside Priory School (The Priory)",'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);
}
}