function addMarkers() { mySelect = document.getElementById('selection'); Lake_Charles = [];Bell_City = [];Sulphur = [];Dequincy = [];Iowa = [];Westlake = [];Starks = [];Vinton = [];mySelect.options[mySelect.options.length] = new Option("Bell City schools",'all=Bell_City'); mySelect.options[mySelect.options.length] = new Option("Dequincy schools",'all=Dequincy'); mySelect.options[mySelect.options.length] = new Option("Iowa schools",'all=Iowa'); mySelect.options[mySelect.options.length] = new Option("Lake Charles schools",'all=Lake_Charles'); mySelect.options[mySelect.options.length] = new Option("Starks schools",'all=Starks'); mySelect.options[mySelect.options.length] = new Option("Sulphur schools",'all=Sulphur'); mySelect.options[mySelect.options.length] = new Option("Vinton schools",'all=Vinton'); mySelect.options[mySelect.options.length] = new Option("Westlake schools",'all=Westlake'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.23487854,30.16856384),"
A. A. Nelson Elementary School
1001 Country Club Road
Lake Charles, LA 70605

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("A. A. Nelson Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.24945831,30.17623711),"
Alfred M. Barbe High School
2200 West Mcneese Street
Lake Charles, LA 70605

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alfred M. Barbe High School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.22425842,30.20793724),"
Barbe Elementary School
400 Penn Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Barbe Elementary School",'Lake_Charles=' + Lake_Charles.length); Bell_City[Bell_City.length] = createMarker(new GPoint(-92.96266174,30.11509323),"
Bell City High School
7161 Highway 14 East
Bell City, LA 70630

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bell City High School",'Bell_City=' + Bell_City.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20053864,30.18865585),"
Brentwood Elementary School
3825 Brentwood Avenue
Lake Charles, LA 70607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brentwood Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.23583221,30.20573616),"
Calcasieu Career Center
2903 Opelousas Street
Lake Charles, LA 70615

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calcasieu Career Center",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.18853760,30.22482109),"
Calcasieu Pm High School
1015 Sixth Avenue
Lake Charles, LA 70601

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calcasieu Pm High School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.22335815,30.19220352),"
College Oaks Elementary School
3618 Ernest Street
Lake Charles, LA 70605

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("College Oaks Elementary School",'Lake_Charles=' + Lake_Charles.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.38085937,30.24254799),"
D. S. Perkins Elementary School
565 North Crocker Street
Sulphur, LA 70663

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("D. S. Perkins Elementary School",'Sulphur=' + Sulphur.length); Dequincy[Dequincy.length] = createMarker(new GPoint(-93.42833710,30.45216942),"
Dequincy Elementary School
304 Mcneese Street
Dequincy, LA 70633

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dequincy Elementary School",'Dequincy=' + Dequincy.length); Dequincy[Dequincy.length] = createMarker(new GPoint(-93.44435883,30.45326233),"
Dequincy High School
207 North Overton Street
Dequincy, LA 70633

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dequincy High School",'Dequincy=' + Dequincy.length); Dequincy[Dequincy.length] = createMarker(new GPoint(-93.45040894,30.45086479),"
Dequincy Middle School
1603 West Fourth Street
Dequincy, LA 70633

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Dequincy Middle School",'Dequincy=' + Dequincy.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.22165680,30.16841507),"
Dolby Elementary School
817 Jefferson Drive
Lake Charles, LA 70605

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dolby Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.17635345,30.24243736),"
Doretha A. Combre Elementary School
2903 Opelousas Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Doretha A. Combre Elementary School",'Lake_Charles=' + Lake_Charles.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.36762238,30.24213791),"
E. K. Key Elementary School
1201 East Burton Street
Sulphur, LA 70663

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("E. K. Key Elementary School",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20682526,30.17606354),"
F. K. White Middle School
1000 East Mcneese Street
Lake Charles, LA 70607

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("F. K. White Middle School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.17974091,30.18433571),"
Fairview Elementary School
3955 Gerstner Memorial Drive
Lake Charles, LA 70607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fairview Elementary School",'Lake_Charles=' + Lake_Charles.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.37724304,30.23405647),"
Frasch Elementary School
540 South Huntington Street
Sulphur, LA 70663

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Frasch Elementary School",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.21040344,30.15086174),"
Gillis Elementary School
916 Topsy Road
Lake Charles, LA 70611

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gillis Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20565796,30.19246292),"
Henry Heights Elementary School
3600 Louisiana Avenue
Lake Charles, LA 70607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Henry Heights Elementary School",'Lake_Charles=' + Lake_Charles.length); Iowa[Iowa.length] = createMarker(new GPoint(-93.01699829,30.24613762),"
Iowa High School
401 Miller Avenue
Iowa, LA 70647

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Iowa High School",'Iowa=' + Iowa.length); Iowa[Iowa.length] = createMarker(new GPoint(-93.01192474,30.23676300),"
J. I. Watson Middle School
201 East First Street
Iowa, LA 70647

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("J. I. Watson Middle School",'Iowa=' + Iowa.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.38049316,30.24814606),"
Jake Drost School For Exceptional Children
1100 North Crocker Street
Sulphur, LA 70663

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jake Drost School For Exceptional Children",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.19284058,30.23884010),"
Jessie D. Clifton Elementary School
100 North Prater Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jessie D. Clifton Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.17607880,30.21303177),"
John F. Kennedy Elementary School
2001 Russell Street
Lake Charles, LA 70615

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John F. Kennedy Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.19854736,30.23156357),"
John J. Johnson Ii, Elementary School
1618 Mill Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John J. Johnson Ii, Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20575714,30.19528580),"
Lagrange High School
3420 Louisiana Avenue
Lake Charles, LA 70605

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lagrange High School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20404053,30.21979141),"
Lake Charles/boston High School
1509 Enterprise Boulevard
Lake Charles, LA 70601

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Charles/boston High School",'Lake_Charles=' + Lake_Charles.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.38049316,30.24814606),"
Leblanc Middle School
1100 North Crocker Street
Sulphur, LA 70663

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Leblanc Middle School",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.08090210,30.27633667),"
Lebleu Settlement Elementary School
6509 Highway 3059
Lake Charles, LA 70615

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lebleu Settlement Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.21398163,30.15596962),"
M. J. Kaufman Elementary School
301 Tekel Road
Lake Charles, LA 70607

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("M. J. Kaufman Elementary School",'Lake_Charles=' + Lake_Charles.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.32051086,30.22706223),"
Maplewood Middle School
4401 Maplewood Drive
Sulphur, LA 70663

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Maplewood Middle School",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20266724,30.29876328),"
Moss Bluff Elementary School
215 School Street
Lake Charles, LA 70611

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Moss Bluff Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.22100830,30.30443764),"
Moss Bluff Middle School
1104 Recreation Boulevard
Lake Charles, LA 70611

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Moss Bluff Middle School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.19351959,30.20583725),"
Oak Park Elementary School
2001 18th Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Park Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.18914032,30.20336342),"
Oak Park Middle School
2200 Oak Park Boulevard
Lake Charles, LA 70601

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Oak Park Middle School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20404053,30.22136307),"
Pearl Watson Elementary School
1300 5th Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pearl Watson Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.24940491,30.18913651),"
Prien Lake Elementary School
3741 Nelson Road
Lake Charles, LA 70605

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prien Lake Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.20133972,30.24206352),"
Ralph F. Wilson Elementary School
1400 Opelousas Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ralph F. Wilson Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.18673706,30.25656319),"
Ray D. Molo Middle Magnet School
2300 Medora Street
Lake Charles, LA 70601

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ray D. Molo Middle Magnet School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.19714355,30.22908020),"
Reynaud Middle School
745 South Shattuck Street
Lake Charles, LA 70601

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Reynaud Middle School",'Lake_Charles=' + Lake_Charles.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.35823822,30.21917534),"
Richard W. Vincent Elementary School
1634 Beglis Parkway
Sulphur, LA 70663

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Richard W. Vincent Elementary School",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.24325562,30.17643738),"
S. J. Welsh Middle School
1500 West Mcneese Street
Lake Charles, LA 70605

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("S. J. Welsh Middle School",'Lake_Charles=' + Lake_Charles.length); Westlake[Westlake.length] = createMarker(new GPoint(-93.25176239,30.24253654),"
S. P. Arnett Middle School
400 Sulphur Avenue
Westlake, LA 70669

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("S. P. Arnett Middle School",'Westlake=' + Westlake.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.25785828,30.16288567),"
Saint John Elementary School
5282 Weaver Road
Lake Charles, LA 70605

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Saint John Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.21694946,30.22620010),"
Sam Houston High School
880 S H Jones Parkway
Lake Charles, LA 70611

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sam Houston High School",'Lake_Charles=' + Lake_Charles.length); Starks[Starks.length] = createMarker(new GPoint(-93.66299438,30.32170105),"
Starks High School
137 Highway 109
Starks, LA 70661

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Starks High School",'Starks=' + Starks.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.37439728,30.23266220),"
Sulphur High School
100 Sycamore Street
Sulphur, LA 70663

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sulphur High School",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.18504333,30.20735741),"
T. H. Watkins Elementary School
2501 Seventh Avenue
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("T. H. Watkins Elementary School",'Lake_Charles=' + Lake_Charles.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.21391296,30.20484352),"
T. S. Cooley Elementary Magnet School
2711 Common Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("T. S. Cooley Elementary Magnet School",'Lake_Charles=' + Lake_Charles.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.35925293,30.14806366),"
Vincent Settlement Elementary School
1072 Vincent Settlement Road
Sulphur, LA 70663

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vincent Settlement Elementary School",'Sulphur=' + Sulphur.length); Vinton[Vinton.length] = createMarker(new GPoint(-93.58335876,30.19283676),"
Vinton Elementary School
1610 Hampton Street
Vinton, LA 70668

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vinton Elementary School",'Vinton=' + Vinton.length); Vinton[Vinton.length] = createMarker(new GPoint(-93.58287048,30.18136215),"
Vinton High School
1603 Grace Street
Vinton, LA 70668

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Vinton High School",'Vinton=' + Vinton.length); Vinton[Vinton.length] = createMarker(new GPoint(-93.58155823,30.19806290),"
Vinton Middle School
900 Horridge Street
Vinton, LA 70668

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Vinton Middle School",'Vinton=' + Vinton.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.37037659,30.21853638),"
W. T. Henning Elementary School
774 Henning Drive
Sulphur, LA 70663

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("W. T. Henning Elementary School",'Sulphur=' + Sulphur.length); Sulphur[Sulphur.length] = createMarker(new GPoint(-93.35995483,30.23123741),"
W. W. Lewis Middle School
1752 Cypress Street
Sulphur, LA 70663

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("W. W. Lewis Middle School",'Sulphur=' + Sulphur.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.17710876,30.25171280),"
Washington/marion Magnet High School
2802 Pineview Street
Lake Charles, LA 70601

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Washington/marion Magnet High School",'Lake_Charles=' + Lake_Charles.length); Westlake[Westlake.length] = createMarker(new GPoint(-93.26676178,30.25383759),"
Western Heights Elementary School
1100 Elizabeth Street
Westlake, LA 70669

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Western Heights Elementary School",'Westlake=' + Westlake.length); Westlake[Westlake.length] = createMarker(new GPoint(-93.26255798,30.26063728),"
Westlake High School
1000 Garden Drive
Westlake, LA 70669

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westlake High School",'Westlake=' + Westlake.length); Westlake[Westlake.length] = createMarker(new GPoint(-93.25794220,30.25603676),"
Westwood Elementary School
1900 Sampson Street
Westlake, LA 70669

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westwood Elementary School",'Westlake=' + Westlake.length); Lake_Charles[Lake_Charles.length] = createMarker(new GPoint(-93.18972500,30.23285100),"
Wonderland Of Play Head Start
2200 Elder Street
Lake Charles, LA 70601

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wonderland Of Play Head Start",'Lake_Charles=' + Lake_Charles.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(Bell_City); map.removeOverlays(Dequincy); map.removeOverlays(Iowa); map.removeOverlays(Lake_Charles); map.removeOverlays(Starks); map.removeOverlays(Sulphur); map.removeOverlays(Vinton); map.removeOverlays(Westlake); 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(Lake_Charles);map.removeOverlays(Bell_City); map.removeOverlays(Dequincy); map.removeOverlays(Iowa); map.removeOverlays(Lake_Charles); map.removeOverlays(Starks); map.removeOverlays(Sulphur); map.removeOverlays(Vinton); map.removeOverlays(Westlake); map.addOverlays(Bell_City); centerByArray(Bell_City, false, false); cntMarker += Bell_City.length; map.addOverlays(Dequincy); centerByArray(Dequincy, false, false); cntMarker += Dequincy.length; map.addOverlays(Iowa); centerByArray(Iowa, false, false); cntMarker += Iowa.length; map.addOverlays(Lake_Charles); centerByArray(Lake_Charles, false, false); cntMarker += Lake_Charles.length; map.addOverlays(Starks); centerByArray(Starks, false, false); cntMarker += Starks.length; map.addOverlays(Sulphur); centerByArray(Sulphur, false, false); cntMarker += Sulphur.length; map.addOverlays(Vinton); centerByArray(Vinton, false, false); cntMarker += Vinton.length; map.addOverlays(Westlake); centerByArray(Westlake, false, false); cntMarker += Westlake.length; centerByArray(Lake_Charles,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'); } }