function addMarkers()
{
mySelect = document.getElementById('selection');
Acme = [];Bellingham = [];Lummi_Island = [];Blaine = [];Ferndale = [];_Custer_School_Road = [];Deming = [];_Everson_Goshen_Rd = [];Lynden = [];Everson = [];Maple_Falls = [];_Deming_Rd = [];Sumas = [];mySelect.options[mySelect.options.length] = new Option("Acme schools",'all=Acme');
mySelect.options[mySelect.options.length] = new Option("Bellingham schools",'all=Bellingham');
mySelect.options[mySelect.options.length] = new Option("Blaine schools",'all=Blaine');
mySelect.options[mySelect.options.length] = new Option("Deming schools",'all=Deming');
mySelect.options[mySelect.options.length] = new Option("Everson schools",'all=Everson');
mySelect.options[mySelect.options.length] = new Option("Ferndale schools",'all=Ferndale');
mySelect.options[mySelect.options.length] = new Option("Lummi Island schools",'all=Lummi_Island');
mySelect.options[mySelect.options.length] = new Option("Lynden schools",'all=Lynden');
mySelect.options[mySelect.options.length] = new Option("Maple Falls schools",'all=Maple_Falls');
mySelect.options[mySelect.options.length] = new Option("Sumas schools",'all=Sumas');
mySelect.options[mySelect.options.length] = new Option(" Custer School Road schools",'all=_Custer_School_Road');
mySelect.options[mySelect.options.length] = new Option(" Deming Rd schools",'all=_Deming_Rd');
mySelect.options[mySelect.options.length] = new Option(" Everson Goshen Rd schools",'all=_Everson_Goshen_Rd');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Acme[Acme.length] = createMarker(new GPoint(-122.20867157,48.71847534),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Acme Elementary School",'Acme=' + Acme.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.52549744,48.77763748),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Alderwood Early Childhood Center",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.52739716,48.78054428),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Alderwood Elementary School",'Bellingham=' + Bellingham.length);
Lummi_Island[Lummi_Island.length] = createMarker(new GPoint(-122.58891296,48.84693146),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Beach Elementary School",'Lummi_Island=' + Lummi_Island.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47489166,48.75683212),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bellingham High School",'Bellingham=' + Bellingham.length);
Blaine[Blaine.length] = createMarker(new GPoint(-122.74434000,48.99912100),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Birch Bay Home Connections",'Blaine=' + Blaine.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.50649261,48.77404022),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Birchwood Elementary School",'Bellingham=' + Bellingham.length);
Blaine[Blaine.length] = createMarker(new GPoint(-122.73100281,48.97430038),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Blaine At Timber Ridge",'Blaine=' + Blaine.length);
Blaine[Blaine.length] = createMarker(new GPoint(-122.74149323,48.99251556),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blaine Elementary School",'Blaine=' + Blaine.length);
Blaine[Blaine.length] = createMarker(new GPoint(-122.74149323,48.99341965),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Blaine High School",'Blaine=' + Blaine.length);
Blaine[Blaine.length] = createMarker(new GPoint(-122.73817444,48.99386215),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Blaine Middle School",'Blaine=' + Blaine.length);
Blaine[Blaine.length] = createMarker(new GPoint(-122.74888400,48.99404500),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Blaine Primary School",'Blaine=' + Blaine.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.46816254,48.73131943),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Carl Cozier Elementary School",'Bellingham=' + Bellingham.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.59230804,48.84513855),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'Ferndale=' + Ferndale.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49279022,48.76341248),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Columbia Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47179413,48.75684738),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Community Transitions 18-21 High School",'Bellingham=' + Bellingham.length);
_Custer_School_Road[_Custer_School_Road.length] = createMarker(new GPoint(-122.63827515,48.91891098),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Custer Elementary School",'_Custer_School_Road=' + _Custer_School_Road.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.45634460,48.75193787),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Discovery Center",'Bellingham=' + Bellingham.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.62520599,48.86256409),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eagleridge Elementary School",'Ferndale=' + Ferndale.length);
Deming[Deming.length] = createMarker(new GPoint(-122.22310100,48.82504500),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Educational Resource Center",'Deming=' + Deming.length);
_Everson_Goshen_Rd[_Everson_Goshen_Rd.length] = createMarker(new GPoint(-122.36029816,48.90900803),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Everson Elementary School",'_Everson_Goshen_Rd=' + _Everson_Goshen_Rd.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.50240326,48.71533585),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Fairhaven Middle School",'Bellingham=' + Bellingham.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.59329224,48.85183716),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ferndale High School",'Ferndale=' + Ferndale.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.46557617,48.94430923),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fisher Elementary School",'Lynden=' + Lynden.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.40190887,48.74814224),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Geneva Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48599243,48.72311401),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Happy Valley Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.33238220,48.82495499),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harmony Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48491669,48.75430298),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Home Port Learning Center",'Bellingham=' + Bellingham.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.62624359,48.86256409),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Horizon Middle School",'Ferndale=' + Ferndale.length);
Everson[Everson.length] = createMarker(new GPoint(-122.43951416,48.86265182),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Irene Reither Primary School",'Everson=' + Everson.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.46353149,48.94913101),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Isom Intermediate School",'Lynden=' + Lynden.length);
Maple_Falls[Maple_Falls.length] = createMarker(new GPoint(-122.16307831,48.96744156),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kendall Elementary School",'Maple_Falls=' + Maple_Falls.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.43469238,48.74534988),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Kulshan Middle School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49419403,48.71911240),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Larrabee Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49968719,48.72447586),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lowell Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.61919403,48.79399490),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lummi High School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.61957550,48.79399490),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lummi Tribal School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49188232,48.76216125),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lynden At Timber Ridge High School",'Bellingham=' + Bellingham.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.42475128,48.95306396),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lynden High School",'Lynden=' + Lynden.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.46798400,48.94062900),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lynden Learning Lifestyle",'Lynden=' + Lynden.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.45590973,48.94653702),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lynden Middle School",'Lynden=' + Lynden.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.45590973,48.94653702),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lynden Special Services",'Lynden=' + Lynden.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49188232,48.76216125),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Meridian At Timber Ridge High School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49119568,48.85528564),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Meridian High School",'Bellingham=' + Bellingham.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.44483185,48.87003708),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Meridian Middle School",'Lynden=' + Lynden.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49227905,48.85529709),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Meridian Special Programs Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.35387421,48.84397125),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mount Baker At Timber Ridge High School",'Bellingham=' + Bellingham.length);
Deming[Deming.length] = createMarker(new GPoint(-122.22279358,48.82543945),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mount Baker Junior High School",'Deming=' + Deming.length);
_Deming_Rd[_Deming_Rd.length] = createMarker(new GPoint(-122.20964050,48.82109833),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mount Baker Senior High School",'_Deming_Rd=' + _Deming_Rd.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.60659027,48.85003662),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'Ferndale=' + Ferndale.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47949982,48.75429916),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Nooksack At Timber Ridge High School",'Bellingham=' + Bellingham.length);
Everson[Everson.length] = createMarker(new GPoint(-122.30820465,48.92732620),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nooksack Elementary School",'Everson=' + Everson.length);
Everson[Everson.length] = createMarker(new GPoint(-122.30782318,48.96403885),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Nooksack Valley High School",'Everson=' + Everson.length);
Everson[Everson.length] = createMarker(new GPoint(-122.33985901,48.92020035),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Nooksack Valley Middle School",'Everson=' + Everson.length);
Everson[Everson.length] = createMarker(new GPoint(-122.32019806,48.92770004),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nooksack Valley Special Services Elementary School",'Everson=' + Everson.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.54029083,48.83230972),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Bellingham Elementary School",'Ferndale=' + Ferndale.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.42086029,48.78601456),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Northern Heights Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47100830,48.75679398),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Options High School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47820282,48.77003479),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Parkview Elementary School",'Bellingham=' + Bellingham.length);
Blaine[Blaine.length] = createMarker(new GPoint(-122.74149323,48.99341965),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Point Roberts Primary",'Blaine=' + Blaine.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.44239044,48.76718903),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48269653,48.72782135),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Sehome High School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.50103760,48.77976227),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Shuksan Middle School",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.41587830,48.76793671),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Silver Beach Elementary School",'Bellingham=' + Bellingham.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.60277557,48.86273193),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Skyline Elementary School",'Ferndale=' + Ferndale.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48691559,48.75891876),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Special Services",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.42414856,48.78233719),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Squalicum High School",'Bellingham=' + Bellingham.length);
Sumas[Sumas.length] = createMarker(new GPoint(-122.25530243,48.98949814),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sumas Elementary School",'Sumas=' + Sumas.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.46479034,48.76693726),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sunnyland Elementary School",'Bellingham=' + Bellingham.length);
Everson[Everson.length] = createMarker(new GPoint(-122.43917847,48.86265182),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Ten Mile Creek Elementary School",'Everson=' + Everson.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.45304871,48.76823807),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Visions (seamar Youth Center)",'Bellingham=' + Bellingham.length);
Ferndale[Ferndale.length] = createMarker(new GPoint(-122.60146332,48.86121368),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Vista Middle School",'Ferndale=' + Ferndale.length);
Lynden[Lynden.length] = createMarker(new GPoint(-122.42752075,48.95833588),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vossbeck Elementary School",'Lynden=' + Lynden.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48690033,48.75968170),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Whatcom Co Detention Center",'Bellingham=' + Bellingham.length);
Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48005676,48.75852966),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Whatcom Middle School",'Bellingham=' + Bellingham.length);
} // 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,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)
{
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(Acme);
map.removeOverlays(Bellingham);
map.removeOverlays(Blaine);
map.removeOverlays(Deming);
map.removeOverlays(Everson);
map.removeOverlays(Ferndale);
map.removeOverlays(Lummi_Island);
map.removeOverlays(Lynden);
map.removeOverlays(Maple_Falls);
map.removeOverlays(Sumas);
map.removeOverlays(_Custer_School_Road);
map.removeOverlays(_Deming_Rd);
map.removeOverlays(_Everson_Goshen_Rd);
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(Acme);map.removeOverlays(Acme);
map.removeOverlays(Bellingham);
map.removeOverlays(Blaine);
map.removeOverlays(Deming);
map.removeOverlays(Everson);
map.removeOverlays(Ferndale);
map.removeOverlays(Lummi_Island);
map.removeOverlays(Lynden);
map.removeOverlays(Maple_Falls);
map.removeOverlays(Sumas);
map.removeOverlays(_Custer_School_Road);
map.removeOverlays(_Deming_Rd);
map.removeOverlays(_Everson_Goshen_Rd);
map.addOverlays(Acme);
centerByArray(Acme, false, false);
cntMarker += Acme.length;
map.addOverlays(Bellingham);
centerByArray(Bellingham, false, false);
cntMarker += Bellingham.length;
map.addOverlays(Blaine);
centerByArray(Blaine, false, false);
cntMarker += Blaine.length;
map.addOverlays(Deming);
centerByArray(Deming, false, false);
cntMarker += Deming.length;
map.addOverlays(Everson);
centerByArray(Everson, false, false);
cntMarker += Everson.length;
map.addOverlays(Ferndale);
centerByArray(Ferndale, false, false);
cntMarker += Ferndale.length;
map.addOverlays(Lummi_Island);
centerByArray(Lummi_Island, false, false);
cntMarker += Lummi_Island.length;
map.addOverlays(Lynden);
centerByArray(Lynden, false, false);
cntMarker += Lynden.length;
map.addOverlays(Maple_Falls);
centerByArray(Maple_Falls, false, false);
cntMarker += Maple_Falls.length;
map.addOverlays(Sumas);
centerByArray(Sumas, false, false);
cntMarker += Sumas.length;
map.addOverlays(_Custer_School_Road);
centerByArray(_Custer_School_Road, false, false);
cntMarker += _Custer_School_Road.length;
map.addOverlays(_Deming_Rd);
centerByArray(_Deming_Rd, false, false);
cntMarker += _Deming_Rd.length;
map.addOverlays(_Everson_Goshen_Rd);
centerByArray(_Everson_Goshen_Rd, false, false);
cntMarker += _Everson_Goshen_Rd.length;
centerByArray(Acme,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////all');
}
}