function addMarkers(){
mySelect = document.getElementById('selection');
Madison = [];Appleton = [];Wauwatosa = [];Milwaukee = [];New_London = [];Green_Bay = [];Eau_Claire = [];Manitowoc = [];Watertown = [];Rice_Lake = [];Wausau = [];Menomonee_Falls = [];Stoughton = [];Plover = [];Racine = [];Brookfield = [];Lake_Geneva = [];Stevens_Point = [];Sheboygan = [];Rosholt = [];Juneau = [];Cadott = [];Stratford = [];Janesville = [];Sturgeon_Bay = [];Sturtevant = [];Wisconsin_Rapids = [];mySelect.options[mySelect.options.length] = new Option("Appleton schools",'all=Appleton');
mySelect.options[mySelect.options.length] = new Option("Brookfield schools",'all=Brookfield');
mySelect.options[mySelect.options.length] = new Option("Cadott schools",'all=Cadott');
mySelect.options[mySelect.options.length] = new Option("Eau Claire schools",'all=Eau_Claire');
mySelect.options[mySelect.options.length] = new Option("Green Bay schools",'all=Green_Bay');
mySelect.options[mySelect.options.length] = new Option("Janesville schools",'all=Janesville');
mySelect.options[mySelect.options.length] = new Option("Juneau schools",'all=Juneau');
mySelect.options[mySelect.options.length] = new Option("Lake Geneva schools",'all=Lake_Geneva');
mySelect.options[mySelect.options.length] = new Option("Madison schools",'all=Madison');
mySelect.options[mySelect.options.length] = new Option("Manitowoc schools",'all=Manitowoc');
mySelect.options[mySelect.options.length] = new Option("Menomonee Falls schools",'all=Menomonee_Falls');
mySelect.options[mySelect.options.length] = new Option("Milwaukee schools",'all=Milwaukee');
mySelect.options[mySelect.options.length] = new Option("New London schools",'all=New_London');
mySelect.options[mySelect.options.length] = new Option("Plover schools",'all=Plover');
mySelect.options[mySelect.options.length] = new Option("Racine schools",'all=Racine');
mySelect.options[mySelect.options.length] = new Option("Rice Lake schools",'all=Rice_Lake');
mySelect.options[mySelect.options.length] = new Option("Rosholt schools",'all=Rosholt');
mySelect.options[mySelect.options.length] = new Option("Sheboygan schools",'all=Sheboygan');
mySelect.options[mySelect.options.length] = new Option("Stevens Point schools",'all=Stevens_Point');
mySelect.options[mySelect.options.length] = new Option("Stoughton schools",'all=Stoughton');
mySelect.options[mySelect.options.length] = new Option("Stratford schools",'all=Stratford');
mySelect.options[mySelect.options.length] = new Option("Sturgeon Bay schools",'all=Sturgeon_Bay');
mySelect.options[mySelect.options.length] = new Option("Sturtevant schools",'all=Sturtevant');
mySelect.options[mySelect.options.length] = new Option("Watertown schools",'all=Watertown');
mySelect.options[mySelect.options.length] = new Option("Wausau schools",'all=Wausau');
mySelect.options[mySelect.options.length] = new Option("Wauwatosa schools",'all=Wauwatosa');
mySelect.options[mySelect.options.length] = new Option("Wisconsin Rapids schools",'all=Wisconsin_Rapids');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Madison[Madison.length] = createMarker(new GPoint(-89.29814200,43.07323900),"
",iconGr);
mySelect.options[mySelect.options.length] = new Option("Abundant Life Christian School",'Madison=' + Madison.length);
Appleton[Appleton.length] = createMarker(new GPoint(-88.44615200,44.26777800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Academy Of The Fox Cities",'Appleton=' + Appleton.length);
Wauwatosa[Wauwatosa.length] = createMarker(new GPoint(-88.02731100,43.06680400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Christ King School",'Wauwatosa=' + Wauwatosa.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-87.91446200,43.06376300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Clara Mohammed School, Inc.",'Milwaukee=' + Milwaukee.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-87.90985500,43.11869400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Dominican High School",'Milwaukee=' + Milwaukee.length);
New_London[New_London.length] = createMarker(new GPoint(-88.73789900,44.38575400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Emanuel Lutheran School",'New_London=' + New_London.length);
Green_Bay[Green_Bay.length] = createMarker(new GPoint(-88.05731400,44.48693700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Enterprise Academy Inc",'Green_Bay=' + Green_Bay.length);
Green_Bay[Green_Bay.length] = createMarker(new GPoint(-87.89012100,44.55311400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Holy Cross Catholic School",'Green_Bay=' + Green_Bay.length);
Eau_Claire[Eau_Claire.length] = createMarker(new GPoint(-91.47708100,44.80806300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Immaculate Conception School",'Eau_Claire=' + Eau_Claire.length);
Manitowoc[Manitowoc.length] = createMarker(new GPoint(-87.69794700,44.11091300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Manitowoc Lutheran High School",'Manitowoc=' + Manitowoc.length);
Watertown[Watertown.length] = createMarker(new GPoint(-88.73534300,43.19542700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Maranatha Baptist Academy",'Watertown=' + Watertown.length);
Rice_Lake[Rice_Lake.length] = createMarker(new GPoint(-91.73527500,45.45478500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Meadow Creek Adventist School",'Rice_Lake=' + Rice_Lake.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-87.98805500,43.10493700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mt Lebanon Ev Lutheran School",'Milwaukee=' + Milwaukee.length);
Wausau[Wausau.length] = createMarker(new GPoint(-89.62286300,44.96753700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Newman Catholic School At St Michael",'Wausau=' + Wausau.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-87.94957000,42.98654600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Our Lady Queen Of Peace School",'Milwaukee=' + Milwaukee.length);
Menomonee_Falls[Menomonee_Falls.length] = createMarker(new GPoint(-88.10629900,43.11625900),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pilgrim Lutheran School",'Menomonee_Falls=' + Menomonee_Falls.length);
Green_Bay[Green_Bay.length] = createMarker(new GPoint(-87.90615300,44.48763700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Prince Of Peace School",'Green_Bay=' + Green_Bay.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-88.02929600,43.17791400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Risen Savior Lutheran School",'Milwaukee=' + Milwaukee.length);
Manitowoc[Manitowoc.length] = createMarker(new GPoint(-87.63055400,44.12304300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Roncalli High School",'Manitowoc=' + Manitowoc.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-87.93744200,43.07323500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sa'rai & Zigler Upper Excellerated Academy",'Milwaukee=' + Milwaukee.length);
Stoughton[Stoughton.length] = createMarker(new GPoint(-89.22968600,42.92071200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Ann Elementary School",'Stoughton=' + Stoughton.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-87.92288700,43.01167600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Anthony School Of Milwaukee",'Milwaukee=' + Milwaukee.length);
Watertown[Watertown.length] = createMarker(new GPoint(-88.72965400,43.19465500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Bernard School",'Watertown=' + Watertown.length);
Plover[Plover.length] = createMarker(new GPoint(-89.55759500,44.45522700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Bronislava Elementary School",'Plover=' + Plover.length);
Racine[Racine.length] = createMarker(new GPoint(-87.78618600,42.71836300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Catherines High School",'Racine=' + Racine.length);
Brookfield[Brookfield.length] = createMarker(new GPoint(-88.13670900,43.09023800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Dominic Elementary School",'Brookfield=' + Brookfield.length);
Lake_Geneva[Lake_Geneva.length] = createMarker(new GPoint(-88.42069000,42.59199800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Francis De Sales School",'Lake_Geneva=' + Lake_Geneva.length);
Brookfield[Brookfield.length] = createMarker(new GPoint(-88.13698500,43.01782800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Luke Elementary School",'Brookfield=' + Brookfield.length);
Eau_Claire[Eau_Claire.length] = createMarker(new GPoint(-91.49600200,44.78541800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Mark Lutheran School",'Eau_Claire=' + Eau_Claire.length);
Stevens_Point[Stevens_Point.length] = createMarker(new GPoint(-89.56865700,44.52661500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Stanislaus School",'Stevens_Point=' + Stevens_Point.length);
Stevens_Point[Stevens_Point.length] = createMarker(new GPoint(-89.57978000,44.52234100),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Stephen Elementary School",'Stevens_Point=' + Stevens_Point.length);
Green_Bay[Green_Bay.length] = createMarker(new GPoint(-88.00272500,44.50100600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St. Thomas More School",'Green_Bay=' + Green_Bay.length);
Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.70664100,43.76847700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sheboygan Christian School",'Sheboygan=' + Sheboygan.length);
Rosholt[Rosholt.length] = createMarker(new GPoint(-89.32501100,44.62510800),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Adalbert School",'Rosholt=' + Rosholt.length);
Juneau[Juneau.length] = createMarker(new GPoint(-88.70589700,43.40156900),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Johns Lutheran School",'Juneau=' + Juneau.length);
Cadott[Cadott.length] = createMarker(new GPoint(-91.16670000,44.96110000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Joseph School",'Cadott=' + Cadott.length);
Stratford[Stratford.length] = createMarker(new GPoint(-90.07370000,44.80413700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Joseph School",'Stratford=' + Stratford.length);
Janesville[Janesville.length] = createMarker(new GPoint(-89.02132000,42.68511600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Mary Elementary School",'Janesville=' + Janesville.length);
Sturgeon_Bay[Sturgeon_Bay.length] = createMarker(new GPoint(-87.38708700,44.82913700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Peters Lutheran School",'Sturgeon_Bay=' + Sturgeon_Bay.length);
Sturtevant[Sturtevant.length] = createMarker(new GPoint(-87.90115200,42.69752600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Sebastian School",'Sturtevant=' + Sturtevant.length);
Wisconsin_Rapids[Wisconsin_Rapids.length] = createMarker(new GPoint(-89.81190700,44.38359300),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("St Vincent De Paul School/celebrations Children'",'Wisconsin_Rapids=' + Wisconsin_Rapids.length);
Madison[Madison.length] = createMarker(new GPoint(-89.43313200,43.05447200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wingra School",'Madison=' + Madison.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-88.01625500,43.03434200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wisconsin Lutheran High School",'Milwaukee=' + Milwaukee.length);
Milwaukee[Milwaukee.length] = createMarker(new GPoint(-87.90934000,43.08943700),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("The Woodson Academy",'Milwaukee=' + Milwaukee.length);
map.removeOverlays(Appleton);
map.removeOverlays(Brookfield);
map.removeOverlays(Cadott);
map.removeOverlays(Eau_Claire);
map.removeOverlays(Green_Bay);
map.removeOverlays(Janesville);
map.removeOverlays(Juneau);
map.removeOverlays(Lake_Geneva);
map.removeOverlays(Madison);
map.removeOverlays(Manitowoc);
map.removeOverlays(Menomonee_Falls);
map.removeOverlays(Milwaukee);
map.removeOverlays(New_London);
map.removeOverlays(Plover);
map.removeOverlays(Racine);
map.removeOverlays(Rice_Lake);
map.removeOverlays(Rosholt);
map.removeOverlays(Sheboygan);
map.removeOverlays(Stevens_Point);
map.removeOverlays(Stoughton);
map.removeOverlays(Stratford);
map.removeOverlays(Sturgeon_Bay);
map.removeOverlays(Sturtevant);
map.removeOverlays(Watertown);
map.removeOverlays(Wausau);
map.removeOverlays(Wauwatosa);
map.removeOverlays(Wisconsin_Rapids);
setTimeout(function(){map.addOverlays(Appleton)},1000);
setTimeout(function(){map.addOverlays(Brookfield)},1000);
setTimeout(function(){map.addOverlays(Cadott)},1000);
setTimeout(function(){map.addOverlays(Eau_Claire)},1000);
setTimeout(function(){map.addOverlays(Green_Bay)},1000);
setTimeout(function(){map.addOverlays(Janesville)},1000);
setTimeout(function(){map.addOverlays(Juneau)},1000);
setTimeout(function(){map.addOverlays(Lake_Geneva)},1000);
setTimeout(function(){map.addOverlays(Madison)},1000);
setTimeout(function(){map.addOverlays(Manitowoc)},1000);
setTimeout(function(){map.addOverlays(Menomonee_Falls)},1000);
setTimeout(function(){map.addOverlays(Milwaukee)},1000);
setTimeout(function(){map.addOverlays(New_London)},1000);
setTimeout(function(){map.addOverlays(Plover)},1000);
setTimeout(function(){map.addOverlays(Racine)},1000);
setTimeout(function(){map.addOverlays(Rice_Lake)},1000);
setTimeout(function(){map.addOverlays(Rosholt)},1000);
setTimeout(function(){map.addOverlays(Sheboygan)},1000);
setTimeout(function(){map.addOverlays(Stevens_Point)},1000);
setTimeout(function(){map.addOverlays(Stoughton)},1000);
setTimeout(function(){map.addOverlays(Stratford)},1000);
setTimeout(function(){map.addOverlays(Sturgeon_Bay)},1000);
setTimeout(function(){map.addOverlays(Sturtevant)},1000);
setTimeout(function(){map.addOverlays(Watertown)},1000);
setTimeout(function(){map.addOverlays(Wausau)},1000);
setTimeout(function(){map.addOverlays(Wauwatosa)},1000);
setTimeout(function(){map.addOverlays(Wisconsin_Rapids)},1000);
maxLng = -87.38708700;
maxLat = 45.45478500;
minLng = -91.73527500;
minLat = 42.59199800;
reCenterMap();
} // End addStateMarkers JavaScript Function
// 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].getPoint().x;
var markLat = myArray[i].getPoint().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].getPoint().x;
maxLat = myArray[0].getPoint().y;
minLng = myArray[0].getPoint().x;
minLat = myArray[0].getPoint().y;
}
// Recenter map based on global max/mins
function reCenterMap()
{
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,11);
/*
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)
{
var myVal = selection.options[selection.selectedIndex].value;
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('nearby_schools.php') == -1)
window.open(location.href + '/map/' + showArray);
else
window.open('/search//////' + showArray);
map.removeOverlays(Appleton);
map.removeOverlays(Brookfield);
map.removeOverlays(Cadott);
map.removeOverlays(Eau_Claire);
map.removeOverlays(Green_Bay);
map.removeOverlays(Janesville);
map.removeOverlays(Juneau);
map.removeOverlays(Lake_Geneva);
map.removeOverlays(Madison);
map.removeOverlays(Manitowoc);
map.removeOverlays(Menomonee_Falls);
map.removeOverlays(Milwaukee);
map.removeOverlays(New_London);
map.removeOverlays(Plover);
map.removeOverlays(Racine);
map.removeOverlays(Rice_Lake);
map.removeOverlays(Rosholt);
map.removeOverlays(Sheboygan);
map.removeOverlays(Stevens_Point);
map.removeOverlays(Stoughton);
map.removeOverlays(Stratford);
map.removeOverlays(Sturgeon_Bay);
map.removeOverlays(Sturtevant);
map.removeOverlays(Watertown);
map.removeOverlays(Wausau);
map.removeOverlays(Wauwatosa);
map.removeOverlays(Wisconsin_Rapids);
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(Madison);map.removeOverlays(Appleton);
map.removeOverlays(Brookfield);
map.removeOverlays(Cadott);
map.removeOverlays(Eau_Claire);
map.removeOverlays(Green_Bay);
map.removeOverlays(Janesville);
map.removeOverlays(Juneau);
map.removeOverlays(Lake_Geneva);
map.removeOverlays(Madison);
map.removeOverlays(Manitowoc);
map.removeOverlays(Menomonee_Falls);
map.removeOverlays(Milwaukee);
map.removeOverlays(New_London);
map.removeOverlays(Plover);
map.removeOverlays(Racine);
map.removeOverlays(Rice_Lake);
map.removeOverlays(Rosholt);
map.removeOverlays(Sheboygan);
map.removeOverlays(Stevens_Point);
map.removeOverlays(Stoughton);
map.removeOverlays(Stratford);
map.removeOverlays(Sturgeon_Bay);
map.removeOverlays(Sturtevant);
map.removeOverlays(Watertown);
map.removeOverlays(Wausau);
map.removeOverlays(Wauwatosa);
map.removeOverlays(Wisconsin_Rapids);
map.addOverlays(Appleton);
centerByArray(Appleton, false, false);
cntMarker += Appleton.length;
map.addOverlays(Brookfield);
centerByArray(Brookfield, false, false);
cntMarker += Brookfield.length;
map.addOverlays(Cadott);
centerByArray(Cadott, false, false);
cntMarker += Cadott.length;
map.addOverlays(Eau_Claire);
centerByArray(Eau_Claire, false, false);
cntMarker += Eau_Claire.length;
map.addOverlays(Green_Bay);
centerByArray(Green_Bay, false, false);
cntMarker += Green_Bay.length;
map.addOverlays(Janesville);
centerByArray(Janesville, false, false);
cntMarker += Janesville.length;
map.addOverlays(Juneau);
centerByArray(Juneau, false, false);
cntMarker += Juneau.length;
map.addOverlays(Lake_Geneva);
centerByArray(Lake_Geneva, false, false);
cntMarker += Lake_Geneva.length;
map.addOverlays(Madison);
centerByArray(Madison, false, false);
cntMarker += Madison.length;
map.addOverlays(Manitowoc);
centerByArray(Manitowoc, false, false);
cntMarker += Manitowoc.length;
map.addOverlays(Menomonee_Falls);
centerByArray(Menomonee_Falls, false, false);
cntMarker += Menomonee_Falls.length;
map.addOverlays(Milwaukee);
centerByArray(Milwaukee, false, false);
cntMarker += Milwaukee.length;
map.addOverlays(New_London);
centerByArray(New_London, false, false);
cntMarker += New_London.length;
map.addOverlays(Plover);
centerByArray(Plover, false, false);
cntMarker += Plover.length;
map.addOverlays(Racine);
centerByArray(Racine, false, false);
cntMarker += Racine.length;
map.addOverlays(Rice_Lake);
centerByArray(Rice_Lake, false, false);
cntMarker += Rice_Lake.length;
map.addOverlays(Rosholt);
centerByArray(Rosholt, false, false);
cntMarker += Rosholt.length;
map.addOverlays(Sheboygan);
centerByArray(Sheboygan, false, false);
cntMarker += Sheboygan.length;
map.addOverlays(Stevens_Point);
centerByArray(Stevens_Point, false, false);
cntMarker += Stevens_Point.length;
map.addOverlays(Stoughton);
centerByArray(Stoughton, false, false);
cntMarker += Stoughton.length;
map.addOverlays(Stratford);
centerByArray(Stratford, false, false);
cntMarker += Stratford.length;
map.addOverlays(Sturgeon_Bay);
centerByArray(Sturgeon_Bay, false, false);
cntMarker += Sturgeon_Bay.length;
map.addOverlays(Sturtevant);
centerByArray(Sturtevant, false, false);
cntMarker += Sturtevant.length;
map.addOverlays(Watertown);
centerByArray(Watertown, false, false);
cntMarker += Watertown.length;
map.addOverlays(Wausau);
centerByArray(Wausau, false, false);
cntMarker += Wausau.length;
map.addOverlays(Wauwatosa);
centerByArray(Wauwatosa, false, false);
cntMarker += Wauwatosa.length;
map.addOverlays(Wisconsin_Rapids);
centerByArray(Wisconsin_Rapids, false, false);
cntMarker += Wisconsin_Rapids.length;
centerByArray(Madison,true, false);
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///36146,25909,29680,29838,29473,29502,30304,30069,29924,29682,36146,29934,30054,30036,29630,30065,29522,29601,29613,30223,30075,30016,29948,25909,30298,29797,29473,29726,29774,36148,36149,29906,30309,29520,29920,29831,30203,29876,30190,30191,29903,30040,30172,30188,29916,30117,29462,30200,/all');
//window.open('/map.php?type=2&schools=36146,25909,29680,29838,29473,29502,30304,30069,29924,29682,36146,29934,30054,30036,29630,30065,29522,29601,29613,30223,30075,30016,29948,25909,30298,29797,29473,29726,29774,36148,36149,29906,30309,29520,29920,29831,30203,29876,30190,30191,29903,30040,30172,30188,29916,30117,29462,30200,&school_level=&radius=&zipcode=&school_type_search=&school_type_code=');
}
}
function createMarker(point, label, icon)
{
var marker = new GMarker(point, icon);
var html = label;
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}