function addMarkers(){
mySelect = document.getElementById('selection');
Tifton = [];Cuthbert = [];Atlanta = [];Athens = [];Augusta = [];Bainbridge = [];Macon = [];Marietta = [];Brunswick = [];Columbus = [];Dalton = [];Albany = [];Clarkston = [];Swainsboro = [];Oakwood = [];Rome = [];Milledgeville = [];Decatur = [];Barnesville = [];Griffin = [];Lawrenceville = [];Chamblee = [];Cochran = [];Rock_Spring = [];Savannah = [];Douglas = [];Thomasville = [];Cleveland = [];Waycross = [];Waco = [];Lagrange = [];mySelect.options[mySelect.options.length] = new Option("Albany Schools",'all=Albany');
mySelect.options[mySelect.options.length] = new Option("Athens Schools",'all=Athens');
mySelect.options[mySelect.options.length] = new Option("Atlanta Schools",'all=Atlanta');
mySelect.options[mySelect.options.length] = new Option("Augusta Schools",'all=Augusta');
mySelect.options[mySelect.options.length] = new Option("Bainbridge Schools",'all=Bainbridge');
mySelect.options[mySelect.options.length] = new Option("Barnesville Schools",'all=Barnesville');
mySelect.options[mySelect.options.length] = new Option("Brunswick Schools",'all=Brunswick');
mySelect.options[mySelect.options.length] = new Option("Chamblee Schools",'all=Chamblee');
mySelect.options[mySelect.options.length] = new Option("Clarkston Schools",'all=Clarkston');
mySelect.options[mySelect.options.length] = new Option("Cleveland Schools",'all=Cleveland');
mySelect.options[mySelect.options.length] = new Option("Cochran Schools",'all=Cochran');
mySelect.options[mySelect.options.length] = new Option("Columbus Schools",'all=Columbus');
mySelect.options[mySelect.options.length] = new Option("Cuthbert Schools",'all=Cuthbert');
mySelect.options[mySelect.options.length] = new Option("Dalton Schools",'all=Dalton');
mySelect.options[mySelect.options.length] = new Option("Decatur Schools",'all=Decatur');
mySelect.options[mySelect.options.length] = new Option("Douglas Schools",'all=Douglas');
mySelect.options[mySelect.options.length] = new Option("Griffin Schools",'all=Griffin');
mySelect.options[mySelect.options.length] = new Option("Lagrange Schools",'all=Lagrange');
mySelect.options[mySelect.options.length] = new Option("Lawrenceville Schools",'all=Lawrenceville');
mySelect.options[mySelect.options.length] = new Option("Macon Schools",'all=Macon');
mySelect.options[mySelect.options.length] = new Option("Marietta Schools",'all=Marietta');
mySelect.options[mySelect.options.length] = new Option("Milledgeville Schools",'all=Milledgeville');
mySelect.options[mySelect.options.length] = new Option("Oakwood Schools",'all=Oakwood');
mySelect.options[mySelect.options.length] = new Option("Rock Spring Schools",'all=Rock_Spring');
mySelect.options[mySelect.options.length] = new Option("Rome Schools",'all=Rome');
mySelect.options[mySelect.options.length] = new Option("Savannah Schools",'all=Savannah');
mySelect.options[mySelect.options.length] = new Option("Swainsboro Schools",'all=Swainsboro');
mySelect.options[mySelect.options.length] = new Option("Thomasville Schools",'all=Thomasville');
mySelect.options[mySelect.options.length] = new Option("Tifton Schools",'all=Tifton');
mySelect.options[mySelect.options.length] = new Option("Waco Schools",'all=Waco');
mySelect.options[mySelect.options.length] = new Option("Waycross Schools",'all=Waycross');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
var tmpLatLng=0;
var tmpLen=0;
tmpLatLng=new GLatLng(31.48570300000000088,-83.5262309999999956);
tmpLen=Tifton.length;
Tifton[tmpLen] = createMarker(tmpLatLng,"
",iconGr);
Tifton[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Abraham Baldwin Agricultural College",'Tifton=' + Tifton.length);
tmpLatLng=new GLatLng(31.77179200000000136,-84.7962940000000031);
tmpLen=Cuthbert.length;
Cuthbert[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Cuthbert[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Andrew College",'Cuthbert=' + Cuthbert.length);
tmpLatLng=new GLatLng(33.74865700000000146,-84.3877109999999959);
tmpLen=Atlanta.length;
Atlanta[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Atlanta[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Art Institute Of Atlanta",'Atlanta=' + Atlanta.length);
tmpLatLng=new GLatLng(33.96110900000000043,-83.3779830000000004);
tmpLen=Athens.length;
Athens[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Athens[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Athens Technical College",'Athens=' + Athens.length);
tmpLatLng=new GLatLng(33.70959700000000225,-84.4075749999999942);
tmpLen=Atlanta.length;
Atlanta[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Atlanta[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Atlanta Metropolitan College",'Atlanta=' + Atlanta.length);
tmpLatLng=new GLatLng(33.42224900000000076,-82.0570740000000000);
tmpLen=Augusta.length;
Augusta[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Augusta[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Augusta Technical College",'Augusta=' + Augusta.length);
tmpLatLng=new GLatLng(30.90328900000000089,-84.5421159999999929);
tmpLen=Bainbridge.length;
Bainbridge[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Bainbridge[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Bainbridge College",'Bainbridge=' + Bainbridge.length);
tmpLatLng=new GLatLng(33.85255500000000239,-84.3597819999999956);
tmpLen=Atlanta.length;
Atlanta[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Atlanta[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Bauder College",'Atlanta=' + Atlanta.length);
tmpLatLng=new GLatLng(33.89431400000000138,-84.1965480000000070);
tmpLen=Atlanta.length;
Atlanta[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Atlanta[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Brown Mackie College-atlanta",'Atlanta=' + Atlanta.length);
tmpLatLng=new GLatLng(32.81563899999999733,-83.6905040000000042);
tmpLen=Macon.length;
Macon[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Macon[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Central Georgia Technical College",'Macon=' + Macon.length);
tmpLatLng=new GLatLng(33.92960200000000270,-84.5508319999999997);
tmpLen=Marietta.length;
Marietta[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Marietta[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Chattahoochee Technical College",'Marietta=' + Marietta.length);
tmpLatLng=new GLatLng(31.18161100000000018,-81.4890690000000006);
tmpLen=Brunswick.length;
Brunswick[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Brunswick[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("College Of Coastal Georgia",'Brunswick=' + Brunswick.length);
tmpLatLng=new GLatLng(32.50684100000000142,-84.9829320000000052);
tmpLen=Columbus.length;
Columbus[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Columbus[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Columbus Technical College",'Columbus=' + Columbus.length);
tmpLatLng=new GLatLng(34.77304500000000331,-85.0022560000000027);
tmpLen=Dalton.length;
Dalton[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Dalton[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Dalton State College",'Dalton=' + Dalton.length);
tmpLatLng=new GLatLng(31.58587299999999942,-84.2085079999999948);
tmpLen=Albany.length;
Albany[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Albany[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Darton College",'Albany=' + Albany.length);
tmpLatLng=new GLatLng(33.78829400000000049,-84.2351830000000063);
tmpLen=Clarkston.length;
Clarkston[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Clarkston[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Dekalb Technical College",'Clarkston=' + Clarkston.length);
tmpLatLng=new GLatLng(32.59580299999999653,-82.3396000000000043);
tmpLen=Swainsboro.length;
Swainsboro[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Swainsboro[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("East Georgia College",'Swainsboro=' + Swainsboro.length);
tmpLatLng=new GLatLng(34.23146799999999956,-83.8701020000000028);
tmpLen=Oakwood.length;
Oakwood[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Oakwood[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Gainesville State College",'Oakwood=' + Oakwood.length);
tmpLatLng=new GLatLng(34.25717900000000071,-85.1648330000000015);
tmpLen=Rome.length;
Rome[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Rome[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Georgia Highlands College",'Rome=' + Rome.length);
tmpLatLng=new GLatLng(33.08019699999999829,-83.2250200000000006);
tmpLen=Milledgeville.length;
Milledgeville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Milledgeville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Georgia Military College-milledgeville Campus",'Milledgeville=' + Milledgeville.length);
tmpLatLng=new GLatLng(33.68977600000000194,-84.2723799999999982);
tmpLen=Decatur.length;
Decatur[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Decatur[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Georgia Perimeter College",'Decatur=' + Decatur.length);
tmpLatLng=new GLatLng(33.04272100000000023,-84.1534709999999961);
tmpLen=Barnesville.length;
Barnesville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Barnesville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Gordon College",'Barnesville=' + Barnesville.length);
tmpLatLng=new GLatLng(33.25441899999999861,-84.2888789999999943);
tmpLen=Griffin.length;
Griffin[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Griffin[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Griffin Technical College",'Griffin=' + Griffin.length);
tmpLatLng=new GLatLng(33.71022800000000074,-84.1787280000000066);
tmpLen=Decatur.length;
Decatur[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Decatur[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Gupton Jones College Of Funeral Service",'Decatur=' + Decatur.length);
tmpLatLng=new GLatLng(33.96360399999999657,-84.0626380000000068);
tmpLen=Lawrenceville.length;
Lawrenceville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Lawrenceville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Gwinnett Technical College",'Lawrenceville=' + Lawrenceville.length);
tmpLatLng=new GLatLng(33.84607299999999696,-84.3590149999999994);
tmpLen=Atlanta.length;
Atlanta[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Atlanta[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Herzing College",'Atlanta=' + Atlanta.length);
tmpLatLng=new GLatLng(33.88913099999999900,-84.3021889999999984);
tmpLen=Chamblee.length;
Chamblee[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Chamblee[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Interactive College Of Technology",'Chamblee=' + Chamblee.length);
tmpLatLng=new GLatLng(32.80719599999999758,-83.7318999999999959);
tmpLen=Macon.length;
Macon[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Macon[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Macon State College",'Macon=' + Macon.length);
tmpLatLng=new GLatLng(32.37815100000000256,-83.3450009999999963);
tmpLen=Cochran.length;
Cochran[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Cochran[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Middle Georgia College",'Cochran=' + Cochran.length);
tmpLatLng=new GLatLng(34.81089800000000167,-85.2451400000000063);
tmpLen=Rock_Spring.length;
Rock_Spring[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Rock_Spring[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Northwestern Technical College",'Rock_Spring=' + Rock_Spring.length);
tmpLatLng=new GLatLng(32.02539000000000157,-81.1120460000000065);
tmpLen=Savannah.length;
Savannah[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Savannah[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Savannah Technical College",'Savannah=' + Savannah.length);
tmpLatLng=new GLatLng(31.49696300000000093,-82.8509600000000006);
tmpLen=Douglas.length;
Douglas[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Douglas[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("South Georgia College",'Douglas=' + Douglas.length);
tmpLatLng=new GLatLng(31.99947799999999986,-81.1041060000000015);
tmpLen=Savannah.length;
Savannah[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Savannah[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("South University-savannah",'Savannah=' + Savannah.length);
tmpLatLng=new GLatLng(30.85516900000000006,-83.9460150000000027);
tmpLen=Thomasville.length;
Thomasville[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Thomasville[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Southwest Georgia Technical College",'Thomasville=' + Thomasville.length);
tmpLatLng=new GLatLng(34.59470999999999918,-83.7485889999999955);
tmpLen=Cleveland.length;
Cleveland[tmpLen] = createMarker(tmpLatLng,"",iconRd);
Cleveland[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Truett-mcconnell College",'Cleveland=' + Cleveland.length);
tmpLatLng=new GLatLng(31.20869100000000173,-82.3748590000000007);
tmpLen=Waycross.length;
Waycross[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Waycross[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("Waycross College",'Waycross=' + Waycross.length);
tmpLatLng=new GLatLng(33.69151999999999702,-85.1881000000000057);
tmpLen=Waco.length;
Waco[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Waco[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("West Central Technical College",'Waco=' + Waco.length);
tmpLatLng=new GLatLng(33.01082799999999650,-85.0293860000000023);
tmpLen=Lagrange.length;
Lagrange[tmpLen] = createMarker(tmpLatLng,"",iconGr);
Lagrange[tmpLen].point = tmpLatLng;
mySelect.options[mySelect.options.length] = new Option("West Georgia Technical College",'Lagrange=' + Lagrange.length);
map.removeOverlays(Albany);
map.removeOverlays(Athens);
map.removeOverlays(Atlanta);
map.removeOverlays(Augusta);
map.removeOverlays(Bainbridge);
map.removeOverlays(Barnesville);
map.removeOverlays(Brunswick);
map.removeOverlays(Chamblee);
map.removeOverlays(Clarkston);
map.removeOverlays(Cleveland);
map.removeOverlays(Cochran);
map.removeOverlays(Columbus);
map.removeOverlays(Cuthbert);
map.removeOverlays(Dalton);
map.removeOverlays(Decatur);
map.removeOverlays(Douglas);
map.removeOverlays(Griffin);
map.removeOverlays(Lagrange);
map.removeOverlays(Lawrenceville);
map.removeOverlays(Macon);
map.removeOverlays(Marietta);
map.removeOverlays(Milledgeville);
map.removeOverlays(Oakwood);
map.removeOverlays(Rock_Spring);
map.removeOverlays(Rome);
map.removeOverlays(Savannah);
map.removeOverlays(Swainsboro);
map.removeOverlays(Thomasville);
map.removeOverlays(Tifton);
map.removeOverlays(Waco);
map.removeOverlays(Waycross);
setTimeout(function(){map.addOverlays(Albany)},1000);
setTimeout(function(){map.addOverlays(Athens)},1000);
setTimeout(function(){map.addOverlays(Atlanta)},1000);
setTimeout(function(){map.addOverlays(Augusta)},1000);
setTimeout(function(){map.addOverlays(Bainbridge)},1000);
setTimeout(function(){map.addOverlays(Barnesville)},1000);
setTimeout(function(){map.addOverlays(Brunswick)},1000);
setTimeout(function(){map.addOverlays(Chamblee)},1000);
setTimeout(function(){map.addOverlays(Clarkston)},1000);
setTimeout(function(){map.addOverlays(Cleveland)},1000);
setTimeout(function(){map.addOverlays(Cochran)},1000);
setTimeout(function(){map.addOverlays(Columbus)},1000);
setTimeout(function(){map.addOverlays(Cuthbert)},1000);
setTimeout(function(){map.addOverlays(Dalton)},1000);
setTimeout(function(){map.addOverlays(Decatur)},1000);
setTimeout(function(){map.addOverlays(Douglas)},1000);
setTimeout(function(){map.addOverlays(Griffin)},1000);
setTimeout(function(){map.addOverlays(Lagrange)},1000);
setTimeout(function(){map.addOverlays(Lawrenceville)},1000);
setTimeout(function(){map.addOverlays(Macon)},1000);
setTimeout(function(){map.addOverlays(Marietta)},1000);
setTimeout(function(){map.addOverlays(Milledgeville)},1000);
setTimeout(function(){map.addOverlays(Oakwood)},1000);
setTimeout(function(){map.addOverlays(Rock_Spring)},1000);
setTimeout(function(){map.addOverlays(Rome)},1000);
setTimeout(function(){map.addOverlays(Savannah)},1000);
setTimeout(function(){map.addOverlays(Swainsboro)},1000);
setTimeout(function(){map.addOverlays(Thomasville)},1000);
setTimeout(function(){map.addOverlays(Tifton)},1000);
setTimeout(function(){map.addOverlays(Waco)},1000);
setTimeout(function(){map.addOverlays(Waycross)},1000);
getPoly("","state","","GA");}
// End addStateMarkers JavaScript Function
//open all when map is defined
function openAll() {
if (map) {
selectChange("all");
} else {
setTimeout("openAll()",200);
}
}
// Takes an array of markers and centers/zooms map based on marker range
function centerByArray(myArray, recenter, newMaxMin){
if (newMaxMin == true)
reMaxMin(myArray);
for (var i = 0; i < myArray.length; i++){
var markLng = myArray[i].point.x;
var markLat = myArray[i].point.y;
if (markLat > maxLat) maxLat = markLat;
if (markLng > maxLng) maxLng = markLng;
if (markLat < minLat) minLat = markLat;
if (markLng < minLng) minLng = markLng;
}
if (recenter)
reCenterMap();
}
// Reinit max/mins
function reMaxMin(myArray){
maxLng = myArray[0].point.x;
maxLat = myArray[0].point.y;
minLng = myArray[0].point.x;
minLat = myArray[0].point.y;
}
// Recenter map based on global max/mins
function reCenterMap(){
//alert('#' + minLat + '#' + minLng + '#' + maxLat + '#' + maxLng);
var bounds = new GLatLngBounds();
bounds.extend(new GLatLng(minLat, minLng));
bounds.extend(new GLatLng(maxLat, maxLng));
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 = map.getBoundsZoomLevel(bounds);
map.setCenter(center,zoom);
//map.setCenter(center,10);
/*
var center = new GPoint( (maxLng + minLng)/2, (maxLat+minLat)/2 );
var delta = new GSize(maxLng - minLng, maxLat - minLat);
var minZoom = map.spec.getLowestZoomLevel(center, delta, map.viewSize);
if (minZoom < 4) minZoom = 4; // Lowest possible zoom is 4
map.centerAndZoom(center, minZoom);
*/
}
// Fires when drop down list of schools changes
function selectChange(selection) {
if (selection.options) {
var _openNewWindow=true;
var myVal = selection.options[selection.selectedIndex].value;
} else {
var _openNewWindow=false;
var myVal=selection;
}
map.closeInfoWindow();
// Add entire array based on variable type
if (myVal.indexOf('all') != -1 && myVal != 'all'){
var temp = myVal.split('=');
var showArray = temp[1];
// If Array is > X amount of markers, then open in a new page
if (eval(showArray).length > 20)
// New window depends on whether or not we're on the search page
if (location.href.indexOf('schools-by-distance') == -1)
window.open(location.href + '/map/all');
else
window.open('/search////all');
map.removeOverlays(Albany);
map.removeOverlays(Athens);
map.removeOverlays(Atlanta);
map.removeOverlays(Augusta);
map.removeOverlays(Bainbridge);
map.removeOverlays(Barnesville);
map.removeOverlays(Brunswick);
map.removeOverlays(Chamblee);
map.removeOverlays(Clarkston);
map.removeOverlays(Cleveland);
map.removeOverlays(Cochran);
map.removeOverlays(Columbus);
map.removeOverlays(Cuthbert);
map.removeOverlays(Dalton);
map.removeOverlays(Decatur);
map.removeOverlays(Douglas);
map.removeOverlays(Griffin);
map.removeOverlays(Lagrange);
map.removeOverlays(Lawrenceville);
map.removeOverlays(Macon);
map.removeOverlays(Marietta);
map.removeOverlays(Milledgeville);
map.removeOverlays(Oakwood);
map.removeOverlays(Rock_Spring);
map.removeOverlays(Rome);
map.removeOverlays(Savannah);
map.removeOverlays(Swainsboro);
map.removeOverlays(Thomasville);
map.removeOverlays(Tifton);
map.removeOverlays(Waco);
map.removeOverlays(Waycross);
map.addOverlays(eval(showArray));
centerByArray(eval(showArray), true, true); // Center and zoom on set of markers
}
// Add individual markers
if (myVal.indexOf('all') == -1 && myVal != 'all' && myVal.length) {
var temp = myVal.split('=');
var myArray = temp[0];
var myIndex = parseInt(temp[1]) - 1;
document.getElementById('map').width = "750";
map.removeOverlay(eval(myArray)[myIndex]);
map.addOverlay(eval(myArray)[myIndex]);
GEvent.trigger(eval(myArray)[myIndex],'click');
}
// Show all markers
if (myVal == 'all') {
cntMarker = 0;
reMaxMin(Tifton);map.removeOverlays(Albany);
map.removeOverlays(Athens);
map.removeOverlays(Atlanta);
map.removeOverlays(Augusta);
map.removeOverlays(Bainbridge);
map.removeOverlays(Barnesville);
map.removeOverlays(Brunswick);
map.removeOverlays(Chamblee);
map.removeOverlays(Clarkston);
map.removeOverlays(Cleveland);
map.removeOverlays(Cochran);
map.removeOverlays(Columbus);
map.removeOverlays(Cuthbert);
map.removeOverlays(Dalton);
map.removeOverlays(Decatur);
map.removeOverlays(Douglas);
map.removeOverlays(Griffin);
map.removeOverlays(Lagrange);
map.removeOverlays(Lawrenceville);
map.removeOverlays(Macon);
map.removeOverlays(Marietta);
map.removeOverlays(Milledgeville);
map.removeOverlays(Oakwood);
map.removeOverlays(Rock_Spring);
map.removeOverlays(Rome);
map.removeOverlays(Savannah);
map.removeOverlays(Swainsboro);
map.removeOverlays(Thomasville);
map.removeOverlays(Tifton);
map.removeOverlays(Waco);
map.removeOverlays(Waycross);
map.addOverlays(Albany);
centerByArray(Albany, false, false);
cntMarker += Albany.length;
map.addOverlays(Athens);
centerByArray(Athens, false, false);
cntMarker += Athens.length;
map.addOverlays(Atlanta);
centerByArray(Atlanta, false, false);
cntMarker += Atlanta.length;
map.addOverlays(Augusta);
centerByArray(Augusta, false, false);
cntMarker += Augusta.length;
map.addOverlays(Bainbridge);
centerByArray(Bainbridge, false, false);
cntMarker += Bainbridge.length;
map.addOverlays(Barnesville);
centerByArray(Barnesville, false, false);
cntMarker += Barnesville.length;
map.addOverlays(Brunswick);
centerByArray(Brunswick, false, false);
cntMarker += Brunswick.length;
map.addOverlays(Chamblee);
centerByArray(Chamblee, false, false);
cntMarker += Chamblee.length;
map.addOverlays(Clarkston);
centerByArray(Clarkston, false, false);
cntMarker += Clarkston.length;
map.addOverlays(Cleveland);
centerByArray(Cleveland, false, false);
cntMarker += Cleveland.length;
map.addOverlays(Cochran);
centerByArray(Cochran, false, false);
cntMarker += Cochran.length;
map.addOverlays(Columbus);
centerByArray(Columbus, false, false);
cntMarker += Columbus.length;
map.addOverlays(Cuthbert);
centerByArray(Cuthbert, false, false);
cntMarker += Cuthbert.length;
map.addOverlays(Dalton);
centerByArray(Dalton, false, false);
cntMarker += Dalton.length;
map.addOverlays(Decatur);
centerByArray(Decatur, false, false);
cntMarker += Decatur.length;
map.addOverlays(Douglas);
centerByArray(Douglas, false, false);
cntMarker += Douglas.length;
map.addOverlays(Griffin);
centerByArray(Griffin, false, false);
cntMarker += Griffin.length;
map.addOverlays(Lagrange);
centerByArray(Lagrange, false, false);
cntMarker += Lagrange.length;
map.addOverlays(Lawrenceville);
centerByArray(Lawrenceville, false, false);
cntMarker += Lawrenceville.length;
map.addOverlays(Macon);
centerByArray(Macon, false, false);
cntMarker += Macon.length;
map.addOverlays(Marietta);
centerByArray(Marietta, false, false);
cntMarker += Marietta.length;
map.addOverlays(Milledgeville);
centerByArray(Milledgeville, false, false);
cntMarker += Milledgeville.length;
map.addOverlays(Oakwood);
centerByArray(Oakwood, false, false);
cntMarker += Oakwood.length;
map.addOverlays(Rock_Spring);
centerByArray(Rock_Spring, false, false);
cntMarker += Rock_Spring.length;
map.addOverlays(Rome);
centerByArray(Rome, false, false);
cntMarker += Rome.length;
map.addOverlays(Savannah);
centerByArray(Savannah, false, false);
cntMarker += Savannah.length;
map.addOverlays(Swainsboro);
centerByArray(Swainsboro, false, false);
cntMarker += Swainsboro.length;
map.addOverlays(Thomasville);
centerByArray(Thomasville, false, false);
cntMarker += Thomasville.length;
map.addOverlays(Tifton);
centerByArray(Tifton, false, false);
cntMarker += Tifton.length;
map.addOverlays(Waco);
centerByArray(Waco, false, false);
cntMarker += Waco.length;
map.addOverlays(Waycross);
centerByArray(Waycross, false, false);
cntMarker += Waycross.length;
reCenterMap();
//if (cntMarker > 20)
// New window depends on whether or not we're on the search page
if (location.href.indexOf('schools-by-distance') == -1)
window.open(location.href + '/map/all');
else
window.open('/search////all');
}
}
function createMarker(point, label, icon){
var marker = new GMarker(point, icon);
var html = label;
GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); });
return marker;
}