function addStateMarkers()
{
mySelect = document.getElementById('selection');
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);
coEd[coEd.length] = createMarker(new GPoint(-85.332423,35.085592),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Baylor 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);
coEd[coEd.length] = createMarker(new GPoint(-79.799334,36.659673),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Carlisle School",'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(-85.18276,34.224318),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Darlington 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);
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(-74.895923,40.26181),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("George School",'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);
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(-78.161082,42.425488),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Houghton Academy",'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(-87.890068,42.248175),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lake Forest Academy",'coEd=' + coEd.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);
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(-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.674845,28.596677),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Montverde Academy",'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(-78.359392,38.023452),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Oakland School",'coEd=' + coEd.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);
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(-72.240799,40.970161),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ross School",'coEd=' + coEd.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(-72.015709,44.418512),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Johnsbury Academy",'coEd=' + coEd.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);
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(-79.075981,38.150288),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Stuart Hall School",'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(-0.536077,51.406358),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("TASIS The American School in England",'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);
coEd[coEd.length] = createMarker(new GPoint(-111.457461,39.544885),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wasatch Academy",'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);
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);
}
}