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(-82.745501,27.777543),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Admiral Farragut Academy",'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);
boys[boys.length] = createMarker(new GPoint(-117.354441,33.1624),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Army and Navy Academy",'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);
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(-81.627032,30.243634),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Bolles School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-84.302559,33.983755),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brandon Hall School",'coEd=' + coEd.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);
boys[boys.length] = createMarker(new GPoint(-80.559302,34.280661),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Camden Military Academy",'boys=' + boys.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);
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);
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);
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(-85.955658,10.40543),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Country Day School, Costa Rica",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-123.429467,45.108043),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Delphian 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);
coEd[coEd.length] = createMarker(new GPoint(-79.75551,43.427365),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("EduKick Academic Soccer (Sports) Boarding School Academies",'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);
coEd[coEd.length] = createMarker(new GPoint(-71.532888,42.305315),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fay 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);
coEd[coEd.length] = createMarker(new GPoint(-80.628174,28.079631),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Florida Air Academy",'coEd=' + coEd.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);
girls[girls.length] = createMarker(new GPoint(-76.758345,39.41163),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Garrison Forest School",'girls=' + girls.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);
boys[boys.length] = createMarker(new GPoint(-78.583241,42.708586),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("The Gow School",'boys=' + boys.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);
girls[girls.length] = createMarker(new GPoint(-78.252693,40.656276),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Grier School",'girls=' + girls.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(-71.939744,42.740273),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hampshire Country School",'boys=' + boys.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);
coEd[coEd.length] = createMarker(new GPoint(-155.700776,20.029304),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hawaii Preparatory Academy",'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);
girls[girls.length] = createMarker(new GPoint(-96.829562,32.907256),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("The Hockaday School",'girls=' + girls.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(-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(-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(-73.187752,40.915613),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Knox 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);
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(-80.694328,40.075265),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Linsly 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);
coEd[coEd.length] = createMarker(new GPoint(-78.702172,38.007926),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Miller 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(-81.674845,28.596677),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Montverde Academy",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-122.626962,40.811028),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Nawa Academy",'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(-73.983217,44.27901),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North Country School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-111.763818,34.865979),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oak Creek Ranch 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(-78.359392,38.023452),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oakland School",'coEd=' + coEd.length);
coEd[coEd.length] = createMarker(new GPoint(-119.255147,34.445829),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ojai Valley School",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-76.627298,39.553815),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oldfields School",'girls=' + girls.length);
coEd[coEd.length] = createMarker(new GPoint(-112.150548,34.348552),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Orme School of Arizona",'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);
boys[boys.length] = createMarker(new GPoint(-75.521681,40.02323),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("The Phelps School",'boys=' + boys.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(-71.960109,41.897689),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Rectory School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-83.832271,34.336459),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Riverside Military Academy",'boys=' + boys.length);
coEd[coEd.length] = createMarker(new GPoint(-72.240799,40.970161),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ross School",'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(-65.99284,45.380232),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Rothesay Netherwood School",'coEd=' + coEd.length);
boys[boys.length] = createMarker(new GPoint(-79.471016,44.013292),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("St. Andrew's College",'boys=' + boys.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(-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);
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(-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(-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);
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);
coEd[coEd.length] = createMarker(new GPoint(-74.939054,45.6502),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sedbergh 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(-118.133084,34.115249),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Southwestern Academy",'coEd=' + coEd.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);
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(-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(-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(-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(-90.396519,38.539627),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson 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(-86.389888,35.610794),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Webb 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);
}
}