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(-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(-82.620004,35.568684),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Asheville School",'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);
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(-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);
girls[girls.length] = createMarker(new GPoint(-83.822268,34.302017),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brenau Academy",'girls=' + girls.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);
coEd[coEd.length] = createMarker(new GPoint(-79.799334,36.659673),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Carlisle School",'coEd=' + coEd.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(-85.18276,34.224318),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Darlington School",'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);
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(-77.732499,38.9692),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Foxcroft 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);
coEd[coEd.length] = createMarker(new GPoint(-86.771296,33.342669),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Indian Springs 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(-80.694328,40.075265),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Linsly School",'coEd=' + coEd.length);
girls[girls.length] = createMarker(new GPoint(-77.232151,38.964335),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("The Madeira School",'girls=' + girls.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(-78.702172,38.007926),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Miller 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(-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.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(-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);
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(-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(-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(-78.512647,38.043096),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Anne's-Belfield 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);
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);
boys[boys.length] = createMarker(new GPoint(-89.328006,30.307026),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("St. Stanislaus College",'boys=' + boys.length);
girls[girls.length] = createMarker(new GPoint(-80.237363,36.089291),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Salem Academy",'girls=' + girls.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(-79.187224,37.453353),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Virginia Episcopal 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);
boys[boys.length] = createMarker(new GPoint(-79.288435,37.362861),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Woodberry Forest School",'boys=' + boys.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);
}
}