function addMarkers() { mySelect = document.getElementById('selection'); Painesville = [];Mentor = [];Eastlake = [];Willoughby = [];Fairport_Harbor = [];Madison = [];Kirtland = [];Mentor_On_The_Lake = [];Perry = [];Willowick = [];Wickliffe = [];mySelect.options[mySelect.options.length] = new Option("Eastlake schools",'all=Eastlake'); mySelect.options[mySelect.options.length] = new Option("Fairport Harbor schools",'all=Fairport_Harbor'); mySelect.options[mySelect.options.length] = new Option("Kirtland schools",'all=Kirtland'); mySelect.options[mySelect.options.length] = new Option("Madison schools",'all=Madison'); mySelect.options[mySelect.options.length] = new Option("Mentor schools",'all=Mentor'); mySelect.options[mySelect.options.length] = new Option("Mentor On The Lake schools",'all=Mentor_On_The_Lake'); mySelect.options[mySelect.options.length] = new Option("Painesville schools",'all=Painesville'); mySelect.options[mySelect.options.length] = new Option("Perry schools",'all=Perry'); mySelect.options[mySelect.options.length] = new Option("Wickliffe schools",'all=Wickliffe'); mySelect.options[mySelect.options.length] = new Option("Willoughby schools",'all=Willoughby'); mySelect.options[mySelect.options.length] = new Option("Willowick schools",'all=Willowick'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Painesville[Painesville.length] = createMarker(new GPoint(-81.24060059,41.71089935),"
Auburn Vocational High School
8140 Auburn Rd
Painesville, OH 44077

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Auburn Vocational High School",'Painesville=' + Painesville.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.24320221,41.64904404),"
Auburn Vocational School
8140 Auburn Rd
Painesville, OH 44077

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Auburn Vocational School",'Painesville=' + Painesville.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.37771606,41.69007492),"
Bellflower Elementary School
6655 Reynolds Rd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bellflower Elementary School",'Mentor=' + Mentor.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.36766815,41.65010071),"
Brentmoor Elementary School
7671 Johnnycake Ridge Rd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brentmoor Elementary School",'Mentor=' + Mentor.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.26248169,41.69953537),"
Buckeye Elementary School
175 Buckeye Rd
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Buckeye Elementary School",'Painesville=' + Painesville.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.24838257,41.70963669),"
Cedarbrook Elementary School
350 Cedarbrook Dr
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cedarbrook Elementary School",'Painesville=' + Painesville.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.34015656,41.66706085),"
Center Street Village Elementary School
7482 Center St
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center Street Village Elementary School",'Mentor=' + Mentor.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.28385925,41.69408798),"
Clyde C Hadden Elementary School
1800 Mentor Ave
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clyde C Hadden Elementary School",'Painesville=' + Painesville.length); Eastlake[Eastlake.length] = createMarker(new GPoint(-81.42554474,41.67306137),"
Eastlake Middle School
35972 Lake Shore Blvd
Eastlake, OH 44095

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Eastlake Middle School",'Eastlake=' + Eastlake.length); Willoughby[Willoughby.length] = createMarker(new GPoint(-81.43463135,41.61916733),"
Edison Elementary School
5288 Karen Isle Dr
Willoughby, OH 44094

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edison Elementary School",'Willoughby=' + Willoughby.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.34889984,41.69596100),"
Fairfax Elementary School
6465 Curtiss Ct
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fairfax Elementary School",'Mentor=' + Mentor.length); Fairport_Harbor[Fairport_Harbor.length] = createMarker(new GPoint(-81.27194977,41.75502396),"
Fairport Harding High School
329 Vine St
Fairport Harbor, OH 44077

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fairport Harding High School",'Fairport_Harbor=' + Fairport_Harbor.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.31707001,41.67770767),"
Garfield Elementary School
7090 Hopkins Rd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Garfield Elementary School",'Mentor=' + Mentor.length); Willoughby[Willoughby.length] = createMarker(new GPoint(-81.40471649,41.66286469),"
Grant Elementary School
38281 Hurricane Dr
Willoughby, OH 44094

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Grant Elementary School",'Willoughby=' + Willoughby.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.20322418,41.75084686),"
Hale Road Elementary School
56 Hale Rd
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hale Road Elementary School",'Painesville=' + Painesville.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.24699402,41.72093964),"
Harvey High School
167 W Washington St
Painesville, OH 44077

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harvey High School",'Painesville=' + Painesville.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.32028198,41.73460770),"
Headlands Elementary School
5028 Forest Rd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Headlands Elementary School",'Mentor=' + Mentor.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.24272919,41.69102478),"
Henry F Lamuth Middle School
6700 Auburn Rd
Painesville, OH 44077

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Henry F Lamuth Middle School",'Painesville=' + Painesville.length); Madison[Madison.length] = createMarker(new GPoint(-81.04988861,41.76940918),"
Homer Nash Kimball Elementary School
94 River St
Madison, OH 44057

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Homer Nash Kimball Elementary School",'Madison=' + Madison.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.31559753,41.66445923),"
Hopkins Elementary School
7565 Hopkins Rd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hopkins Elementary School",'Mentor=' + Mentor.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.25737762,41.73973083),"
Huntington Elementary School
979 N Saint Clair St
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Huntington Elementary School",'Painesville=' + Painesville.length); Eastlake[Eastlake.length] = createMarker(new GPoint(-81.42573547,41.67356873),"
Jefferson Elementary School
35980 Lake Shore Blvd
Eastlake, OH 44095

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Eastlake=' + Eastlake.length); Eastlake[Eastlake.length] = createMarker(new GPoint(-81.44583893,41.65484238),"
Kennedy School
34050 Glen Dr
Eastlake, OH 44095

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kennedy School",'Eastlake=' + Eastlake.length); Kirtland[Kirtland.length] = createMarker(new GPoint(-81.36003113,41.62204361),"
Kirtland Elementary School
9140 Chillicothe Rd
Kirtland, OH 44094

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kirtland Elementary School",'Kirtland=' + Kirtland.length); Kirtland[Kirtland.length] = createMarker(new GPoint(-81.35977173,41.62157822),"
Kirtland High School
9150 Chillicothe Rd
Kirtland, OH 44094

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kirtland High School",'Kirtland=' + Kirtland.length); Kirtland[Kirtland.length] = createMarker(new GPoint(-81.35975647,41.62155151),"
Kirtland Middle School
9152 Chillicothe Rd
Kirtland, OH 44094

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kirtland Middle School",'Kirtland=' + Kirtland.length); Willoughby[Willoughby.length] = createMarker(new GPoint(-81.40110016,41.62409973),"
Lake Academy
25 Public Sq Bldg B
Willoughby, OH 44094

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Academy",'Willoughby=' + Willoughby.length); Mentor_On_The_Lake[Mentor_On_The_Lake.length] = createMarker(new GPoint(-81.36740875,41.71223831),"
Lake Elementary School
7625 Pinehurst Dr
Mentor On The Lake, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake Elementary School",'Mentor_On_The_Lake=' + Mentor_On_The_Lake.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.26567841,41.71044540),"
Lathrop Elementary School
61 Roosevelt Dr
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lathrop Elementary School",'Painesville=' + Painesville.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.14913940,41.66535568),"
Leroy Elementary School
13613 Painesville Warren Rd
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leroy Elementary School",'Painesville=' + Painesville.length); Eastlake[Eastlake.length] = createMarker(new GPoint(-81.43766022,41.64883804),"
Longfellow Elementary School
35200 Stevens Blvd
Eastlake, OH 44095

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Longfellow Elementary School",'Eastlake=' + Eastlake.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.22097778,41.72697449),"
Madison Avenue Elementary School
845 Madison Ave
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Madison Avenue Elementary School",'Painesville=' + Painesville.length); Madison[Madison.length] = createMarker(new GPoint(-81.06618500,41.79051971),"
Madison High School
3100 Burns Rd
Madison, OH 44057

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Madison High School",'Madison=' + Madison.length); Madison[Madison.length] = createMarker(new GPoint(-81.06135559,41.82122421),"
Madison Middle School
1941 Red Bird Rd
Madison, OH 44057

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Madison Middle School",'Madison=' + Madison.length); Willoughby[Willoughby.length] = createMarker(new GPoint(-81.39958191,41.69296265),"
Mckinley Elementary School
1200 Lost Nation Rd
Willoughby, OH 44094

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Willoughby=' + Willoughby.length); Fairport_Harbor[Fairport_Harbor.length] = createMarker(new GPoint(-81.27381134,41.75042343),"
Mckinley Elementary School
602 Plum St
Fairport Harbor, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Fairport_Harbor=' + Fairport_Harbor.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.26352692,41.68796921),"
Melridge Elementary School
6689 Melridge Dr
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Melridge Elementary School",'Painesville=' + Painesville.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.31871796,41.67515945),"
Memorial Junior High School
8979 Mentor Ave
Mentor, OH 44060

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Memorial Junior High School",'Mentor=' + Mentor.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.33898926,41.69392776),"
Mentor High School
6477 Center St
Mentor, OH 44060

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mentor High School",'Mentor=' + Mentor.length); Eastlake[Eastlake.length] = createMarker(new GPoint(-81.44631195,41.65019226),"
North High School
34041 Stevens Blvd
Eastlake, OH 44095

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North High School",'Eastlake=' + Eastlake.length); Madison[Madison.length] = createMarker(new GPoint(-81.04614258,41.80200195),"
North Madison Elementary School
6735 N Ridge Rd
Madison, OH 44057

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Madison Elementary School",'Madison=' + Madison.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.32784271,41.70486450),"
Orchard Hollow Elementary School
8700 Hendricks Rd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Orchard Hollow Elementary School",'Mentor=' + Mentor.length); Perry[Perry.length] = createMarker(new GPoint(-81.13388062,41.77153778),"
Perry Elementary School
1 Learning Ln
Perry, OH 44081

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Perry Elementary School",'Perry=' + Perry.length); Perry[Perry.length] = createMarker(new GPoint(-81.16690063,41.77122116),"
Perry High School
1 Success Blvd
Perry, OH 44081

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Perry High School",'Perry=' + Perry.length); Perry[Perry.length] = createMarker(new GPoint(-81.13391876,41.77126312),"
Perry Middle School
2 Learning Ln
Perry, OH 44081

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Perry Middle School",'Perry=' + Perry.length); Madison[Madison.length] = createMarker(new GPoint(-81.06171417,41.82080841),"
Red Bird Elementary School
1956 Red Bird Rd
Madison, OH 44057

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Red Bird Elementary School",'Madison=' + Madison.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.37788391,41.70341110),"
Reynolds Elementary School
6176 Reynolds Rd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Reynolds Elementary School",'Mentor=' + Mentor.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.36708069,41.70312119),"
Rice Elementary School
7640 Lake Shore Blvd
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rice Elementary School",'Mentor=' + Mentor.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.35915375,41.65512085),"
Ridge Junior High School
7860 Johnnycake Ridge Rd
Mentor, OH 44060

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ridge Junior High School",'Mentor=' + Mentor.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.21916199,41.71215439),"
Riverside Jr/sr High School
585 Riverside Dr
Painesville, OH 44077

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverside Jr/sr High School",'Painesville=' + Painesville.length); Willowick[Willowick.length] = createMarker(new GPoint(-81.46151733,41.63276291),"
Royalview Elementary School
31500 Royalview Dr
Willowick, OH 44095

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Royalview Elementary School",'Willowick=' + Willowick.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.24607086,41.71490097),"
Russell F Hobart Middle School
200 W Walnut Ave
Painesville, OH 44077

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Russell F Hobart Middle School",'Painesville=' + Painesville.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.34238434,41.71680832),"
Shore Junior High School
5670 Hopkins Rd
Mentor, OH 44060

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Shore Junior High School",'Mentor=' + Mentor.length); Willoughby[Willoughby.length] = createMarker(new GPoint(-81.41968536,41.62449265),"
South High School
5000 Shankland Rd
Willoughby, OH 44094

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South High School",'Willoughby=' + Willoughby.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.24547577,41.72994614),"
St Clair Elementary School
280 N Saint Clair St
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("St Clair Elementary School",'Painesville=' + Painesville.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.23677063,41.72043228),"
State Street Elementary School
348 S State St
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("State Street Elementary School",'Painesville=' + Painesville.length); Mentor[Mentor.length] = createMarker(new GPoint(-81.30510712,41.74489975),"
Sterling Morton Elementary School
9292 Jordan Dr
Mentor, OH 44060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sterling Morton Elementary School",'Mentor=' + Mentor.length); Painesville[Painesville.length] = createMarker(new GPoint(-81.24343600,41.72964000),"
Summit Academy Community School - Painesville
301 E Erie St
Painesville, OH 44077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Summit Academy Community School - Painesville",'Painesville=' + Painesville.length); Eastlake[Eastlake.length] = createMarker(new GPoint(-81.44511414,41.66106796),"
Washington Elementary School
503 Vegas Dr
Eastlake, OH 44095

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Eastlake=' + Eastlake.length); Wickliffe[Wickliffe.length] = createMarker(new GPoint(-81.47261047,41.60279083),"
Wickliffe Elementary School
1821 Lincoln Rd
Wickliffe, OH 44092

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wickliffe Elementary School",'Wickliffe=' + Wickliffe.length); Wickliffe[Wickliffe.length] = createMarker(new GPoint(-81.46504974,41.60011673),"
Wickliffe High School
2255 Rockefeller Rd
Wickliffe, OH 44092

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wickliffe High School",'Wickliffe=' + Wickliffe.length); Wickliffe[Wickliffe.length] = createMarker(new GPoint(-81.47423553,41.60580444),"
Wickliffe Middle School
29240 Euclid Ave
Wickliffe, OH 44092

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wickliffe Middle School",'Wickliffe=' + Wickliffe.length); Willoughby[Willoughby.length] = createMarker(new GPoint(-81.42279816,41.62051773),"
Willoughby Middle School
36901 Ridge Rd
Willoughby, OH 44094

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Willoughby Middle School",'Willoughby=' + Willoughby.length); Willoughby[Willoughby.length] = createMarker(new GPoint(-81.39990234,41.63140106),"
Willoughby-eastlake Technical Cente High School
25 Public Sq
Willoughby, OH 44094

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Willoughby-eastlake Technical Cente High School",'Willoughby=' + Willoughby.length); Willowick[Willowick.length] = createMarker(new GPoint(-81.46151733,41.63276291),"
Willowick Middle School
31500 Royalview Dr
Willowick, OH 44095

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Willowick Middle School",'Willowick=' + Willowick.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(Eastlake); map.removeOverlays(Fairport_Harbor); map.removeOverlays(Kirtland); map.removeOverlays(Madison); map.removeOverlays(Mentor); map.removeOverlays(Mentor_On_The_Lake); map.removeOverlays(Painesville); map.removeOverlays(Perry); map.removeOverlays(Wickliffe); map.removeOverlays(Willoughby); map.removeOverlays(Willowick); 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(Painesville);map.removeOverlays(Eastlake); map.removeOverlays(Fairport_Harbor); map.removeOverlays(Kirtland); map.removeOverlays(Madison); map.removeOverlays(Mentor); map.removeOverlays(Mentor_On_The_Lake); map.removeOverlays(Painesville); map.removeOverlays(Perry); map.removeOverlays(Wickliffe); map.removeOverlays(Willoughby); map.removeOverlays(Willowick); map.addOverlays(Eastlake); centerByArray(Eastlake, false, false); cntMarker += Eastlake.length; map.addOverlays(Fairport_Harbor); centerByArray(Fairport_Harbor, false, false); cntMarker += Fairport_Harbor.length; map.addOverlays(Kirtland); centerByArray(Kirtland, false, false); cntMarker += Kirtland.length; map.addOverlays(Madison); centerByArray(Madison, false, false); cntMarker += Madison.length; map.addOverlays(Mentor); centerByArray(Mentor, false, false); cntMarker += Mentor.length; map.addOverlays(Mentor_On_The_Lake); centerByArray(Mentor_On_The_Lake, false, false); cntMarker += Mentor_On_The_Lake.length; map.addOverlays(Painesville); centerByArray(Painesville, false, false); cntMarker += Painesville.length; map.addOverlays(Perry); centerByArray(Perry, false, false); cntMarker += Perry.length; map.addOverlays(Wickliffe); centerByArray(Wickliffe, false, false); cntMarker += Wickliffe.length; map.addOverlays(Willoughby); centerByArray(Willoughby, false, false); cntMarker += Willoughby.length; map.addOverlays(Willowick); centerByArray(Willowick, false, false); cntMarker += Willowick.length; centerByArray(Painesville,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'); } }