function addMarkers() { mySelect = document.getElementById('selection'); Andover = [];Mansfield_Cent = [];Storrs = [];Tolland = [];Bolton = [];Stafford_Sprin = [];Coventry = [];Somers = [];Vernon = [];Ellington = [];West_Willingto = [];Hebron = [];Columbia = [];Rockville = [];Staffordville = [];Union = [];mySelect.options[mySelect.options.length] = new Option("Andover schools",'all=Andover'); mySelect.options[mySelect.options.length] = new Option("Bolton schools",'all=Bolton'); mySelect.options[mySelect.options.length] = new Option("Columbia schools",'all=Columbia'); mySelect.options[mySelect.options.length] = new Option("Coventry schools",'all=Coventry'); mySelect.options[mySelect.options.length] = new Option("Ellington schools",'all=Ellington'); mySelect.options[mySelect.options.length] = new Option("Hebron schools",'all=Hebron'); mySelect.options[mySelect.options.length] = new Option("Mansfield Cent schools",'all=Mansfield_Cent'); mySelect.options[mySelect.options.length] = new Option("Rockville schools",'all=Rockville'); mySelect.options[mySelect.options.length] = new Option("Somers schools",'all=Somers'); mySelect.options[mySelect.options.length] = new Option("Stafford Sprin schools",'all=Stafford_Sprin'); mySelect.options[mySelect.options.length] = new Option("Staffordville schools",'all=Staffordville'); mySelect.options[mySelect.options.length] = new Option("Storrs schools",'all=Storrs'); mySelect.options[mySelect.options.length] = new Option("Tolland schools",'all=Tolland'); mySelect.options[mySelect.options.length] = new Option("Union schools",'all=Union'); mySelect.options[mySelect.options.length] = new Option("Vernon schools",'all=Vernon'); mySelect.options[mySelect.options.length] = new Option("West Willingto schools",'all=West_Willingto'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Andover[Andover.length] = createMarker(new GPoint(-72.36891174,41.72769165),"
Andover Elementary School
35 School Rd.
Andover, CT 06232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Andover Elementary School",'Andover=' + Andover.length); Mansfield_Cent[Mansfield_Cent.length] = createMarker(new GPoint(-72.26058960,41.75123596),"
Annie E. Vinton School
306 Stafford Rd.
Mansfield Cent, CT 06250

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Annie E. Vinton School",'Mansfield_Cent=' + Mansfield_Cent.length); Storrs[Storrs.length] = createMarker(new GPoint(-72.29473877,41.81383514),"
Bergin Correctional Institute High School
251 Middle Tpke.
Storrs, CT 06268

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bergin Correctional Institute High School",'Storrs=' + Storrs.length); Tolland[Tolland.length] = createMarker(new GPoint(-72.33277893,41.85942078),"
Birch Grove Primary School
247 Rhodes Rd.
Tolland, CT 06084

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Birch Grove Primary School",'Tolland=' + Tolland.length); Bolton[Bolton.length] = createMarker(new GPoint(-72.44311523,41.77575684),"
Bolton Center School
108 Notch Rd.
Bolton, CT 06043

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bolton Center School",'Bolton=' + Bolton.length); Bolton[Bolton.length] = createMarker(new GPoint(-72.42290497,41.76201248),"
Bolton High School
72 Brandy St.
Bolton, CT 06043

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bolton High School",'Bolton=' + Bolton.length); Stafford_Sprin[Stafford_Sprin.length] = createMarker(new GPoint(-72.30711365,41.95617676),"
Borough Elementary School
36 Prospect St.
Stafford Sprin, CT 06076

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Borough Elementary School",'Stafford_Sprin=' + Stafford_Sprin.length); Coventry[Coventry.length] = createMarker(new GPoint(-72.31410217,41.78084946),"
Capt. Nathan Hale School
1776 Main St.
Coventry, CT 06238

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Capt. Nathan Hale School",'Coventry=' + Coventry.length); Somers[Somers.length] = createMarker(new GPoint(-72.49874878,42.03273392),"
Cci/somers - Osborne High School
P.o. Box 100
Somers, CT 06071

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cci/somers - Osborne High School",'Somers=' + Somers.length); Vernon[Vernon.length] = createMarker(new GPoint(-72.46672821,41.83893967),"
Center Road School
20 Center Rd.
Vernon, CT 06066

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center Road School",'Vernon=' + Vernon.length); Ellington[Ellington.length] = createMarker(new GPoint(-72.46685028,41.90319443),"
Center School
49 Main St.
Ellington, CT 06029

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center School",'Ellington=' + Ellington.length); West_Willingto[West_Willingto.length] = createMarker(new GPoint(-72.26214600,41.87359238),"
Center School
12 Old Farms Rd.
West Willingto, CT 06279

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Center School",'West_Willingto=' + West_Willingto.length); Coventry[Coventry.length] = createMarker(new GPoint(-72.30025200,41.76799000),"
Coventry Early Education Development (ceed)
1171 Main Street
Coventry, CT 06238

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Coventry Early Education Development (ceed)",'Coventry=' + Coventry.length); Coventry[Coventry.length] = createMarker(new GPoint(-72.36619568,41.79552841),"
Coventry Grammar School
3453 Main St.
Coventry, CT 06238

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Coventry Grammar School",'Coventry=' + Coventry.length); Coventry[Coventry.length] = createMarker(new GPoint(-72.31333923,41.78261948),"
Coventry High School
78 Ripley Hill Rd.
Coventry, CT 06238

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Coventry High School",'Coventry=' + Coventry.length); Ellington[Ellington.length] = createMarker(new GPoint(-72.37872314,41.93190765),"
Crystal Lake School
284 Sandy Beach Rd.
Ellington, CT 06029

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Crystal Lake School",'Ellington=' + Ellington.length); Storrs[Storrs.length] = createMarker(new GPoint(-72.28267670,41.81798553),"
Dorothy C. Goodwin Elementary School
321 Hunting Lodge Rd.
Storrs, CT 06268

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dorothy C. Goodwin Elementary School",'Storrs=' + Storrs.length); Storrs[Storrs.length] = createMarker(new GPoint(-72.24376678,41.80469131),"
E. O. Smith High School
1235 Storrs Rd.
Storrs, CT 06268

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("E. O. Smith High School",'Storrs=' + Storrs.length); Ellington[Ellington.length] = createMarker(new GPoint(-72.46056366,41.90788269),"
Ellington High School
37 Maple St.
Ellington, CT 06029

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ellington High School",'Ellington=' + Ellington.length); Ellington[Ellington.length] = createMarker(new GPoint(-72.46034241,41.87836838),"
Ellington Middle School
46 Middle Butcher Rd.
Ellington, CT 06029

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ellington Middle School",'Ellington=' + Ellington.length); Coventry[Coventry.length] = createMarker(new GPoint(-72.31230927,41.75963211),"
George Hersey Robertson School
227 Cross St.
Coventry, CT 06238

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("George Hersey Robertson School",'Coventry=' + Coventry.length); Hebron[Hebron.length] = createMarker(new GPoint(-72.40384674,41.67425537),"
Gilead Hill School
580 Gilead St.
Hebron, CT 06248

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gilead Hill School",'Hebron=' + Hebron.length); West_Willingto[West_Willingto.length] = createMarker(new GPoint(-72.30163574,41.85106277),"
Hall Memorial School
111 River Rd.
West Willingto, CT 06279

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hall Memorial School",'West_Willingto=' + West_Willingto.length); Hebron[Hebron.length] = createMarker(new GPoint(-72.36078644,41.65123749),"
Hebron Elementary School
92 Church St.
Hebron, CT 06248

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hebron Elementary School",'Hebron=' + Hebron.length); Coventry[Coventry.length] = createMarker(new GPoint(-72.32849884,41.77799988),"
Homebound Elementary School
1700 Main Street
Coventry, CT 06238

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Homebound Elementary School",'Coventry=' + Coventry.length); Somers[Somers.length] = createMarker(new GPoint(-72.45349884,41.99679947),"
Homebound Elementary School
Ninth District Road
Somers, CT 06071

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Homebound Elementary School",'Somers=' + Somers.length); Storrs[Storrs.length] = createMarker(new GPoint(-72.24407196,41.80458069),"
Homebound High School
1235 Storrs Road
Storrs, CT 06268

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Homebound High School",'Storrs=' + Storrs.length); Columbia[Columbia.length] = createMarker(new GPoint(-72.30329895,41.70370102),"
Horace W. Porter School
P.o. Box 166
Columbia, CT 06237

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Horace W. Porter School",'Columbia=' + Columbia.length); Vernon[Vernon.length] = createMarker(new GPoint(-72.46949005,41.80998611),"
Lake Street School
201 Lake St.
Vernon, CT 06066

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake Street School",'Vernon=' + Vernon.length); Somers[Somers.length] = createMarker(new GPoint(-72.44721222,41.98560715),"
Mabelle B. Avery Middle School
Ninth District Rd.
Somers, CT 06071

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mabelle B. Avery Middle School",'Somers=' + Somers.length); Storrs[Storrs.length] = createMarker(new GPoint(-72.22898102,41.77540588),"
Mansfield Middle School
205 Spring Hill Rd.
Storrs, CT 06268

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mansfield Middle School",'Storrs=' + Storrs.length); Rockville[Rockville.length] = createMarker(new GPoint(-72.46232605,41.86929703),"
Maple Street School
20 Maple St.
Rockville, CT 06066

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Maple Street School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-72.43177032,41.86135101),"
Northeast School
69 East St.
Rockville, CT 06066

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northeast School",'Rockville=' + Rockville.length); Somers[Somers.length] = createMarker(new GPoint(-72.49874878,42.03273392),"
Northern Correctional Institute High School
287 Bilton Rd.
Somers, CT 06071

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northern Correctional Institute High School",'Somers=' + Somers.length); Tolland[Tolland.length] = createMarker(new GPoint(-72.37262726,41.86921692),"
Parker Memorial School
104 Old Post Rd.
Tolland, CT 06084

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parker Memorial School",'Tolland=' + Tolland.length); Hebron[Hebron.length] = createMarker(new GPoint(-72.36773682,41.66193771),"
Rham High School
85 Wall Street
Hebron, CT 06248

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rham High School",'Hebron=' + Hebron.length); Hebron[Hebron.length] = createMarker(new GPoint(-72.36486816,41.66159439),"
Rham Middle School
25 Rham Rd.
Hebron, CT 06248

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rham Middle School",'Hebron=' + Hebron.length); Rockville[Rockville.length] = createMarker(new GPoint(-72.44867400,41.86745500),"
Rockville High School
70 Loveland Hill
Rockville, CT 06066

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rockville High School",'Rockville=' + Rockville.length); Vernon[Vernon.length] = createMarker(new GPoint(-72.49287415,41.85576248),"
Skinner Road School
90 Skinner Rd.
Vernon, CT 06066

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Skinner Road School",'Vernon=' + Vernon.length); Somers[Somers.length] = createMarker(new GPoint(-72.44721222,41.98560715),"
Somers Elementary School
Ninth District Rd.
Somers, CT 06071

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Somers Elementary School",'Somers=' + Somers.length); Somers[Somers.length] = createMarker(new GPoint(-72.44721222,41.98560715),"
Somers High School
Ninth District Rd.
Somers, CT 06071

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Somers High School",'Somers=' + Somers.length); Mansfield_Cent[Mansfield_Cent.length] = createMarker(new GPoint(-72.19288635,41.77365494),"
Southeast Elementary School
134 Warrenville Rd.
Mansfield Cent, CT 06250

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southeast Elementary School",'Mansfield_Cent=' + Mansfield_Cent.length); Stafford_Sprin[Stafford_Sprin.length] = createMarker(new GPoint(-72.28320312,41.97800064),"
Stafford High School
P.o. Box 87
Stafford Sprin, CT 06076

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stafford High School",'Stafford_Sprin=' + Stafford_Sprin.length); Stafford_Sprin[Stafford_Sprin.length] = createMarker(new GPoint(-72.28320312,41.97800064),"
Stafford Middle School
P.o. Box 106
Stafford Sprin, CT 06076

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Stafford Middle School",'Stafford_Sprin=' + Stafford_Sprin.length); Staffordville[Staffordville.length] = createMarker(new GPoint(-72.28320312,41.97800064),"
Staffordville School
P.o. Box 216
Staffordville, CT 06077

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Staffordville School",'Staffordville=' + Staffordville.length); Tolland[Tolland.length] = createMarker(new GPoint(-72.34839630,41.87363434),"
Tolland High School
1 Eagle Hill Rd.
Tolland, CT 06084

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tolland High School",'Tolland=' + Tolland.length); Tolland[Tolland.length] = createMarker(new GPoint(-72.37182617,41.86929321),"
Tolland Middle School
96 Old Post Rd.
Tolland, CT 06084

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Tolland Middle School",'Tolland=' + Tolland.length); Columbia[Columbia.length] = createMarker(new GPoint(-72.17148590,41.74429703),"
Transitional Educational Alt Middle/high School
14 Route 66
Columbia, CT 06237

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Transitional Educational Alt Middle/high School",'Columbia=' + Columbia.length); Union[Union.length] = createMarker(new GPoint(-72.15808105,41.98492813),"
Union Elementary School
18 Kinney Hollow Rd.
Union, CT 06076

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Union Elementary School",'Union=' + Union.length); Vernon[Vernon.length] = createMarker(new GPoint(-72.46177673,41.84094620),"
Vernon Center Middle School
777 Hartford Tpke.
Vernon, CT 06066

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Vernon Center Middle School",'Vernon=' + Vernon.length); Stafford_Sprin[Stafford_Sprin.length] = createMarker(new GPoint(-72.34635925,41.96889496),"
West Stafford School
153 West Stafford Rd.
Stafford Sprin, CT 06076

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Stafford School",'Stafford_Sprin=' + Stafford_Sprin.length); Ellington[Ellington.length] = createMarker(new GPoint(-72.49883270,41.86959839),"
Windermere School
2 Abbott Rd.
Ellington, CT 06029

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Windermere School",'Ellington=' + Ellington.length); Columbia[Columbia.length] = createMarker(new GPoint(-72.24700928,41.71715927),"
Windham Early Childhood Center
10 Commerce Dr.
Columbia, CT 06237

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Windham Early Childhood Center",'Columbia=' + Columbia.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(Andover); map.removeOverlays(Bolton); map.removeOverlays(Columbia); map.removeOverlays(Coventry); map.removeOverlays(Ellington); map.removeOverlays(Hebron); map.removeOverlays(Mansfield_Cent); map.removeOverlays(Rockville); map.removeOverlays(Somers); map.removeOverlays(Stafford_Sprin); map.removeOverlays(Staffordville); map.removeOverlays(Storrs); map.removeOverlays(Tolland); map.removeOverlays(Union); map.removeOverlays(Vernon); map.removeOverlays(West_Willingto); 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(Andover);map.removeOverlays(Andover); map.removeOverlays(Bolton); map.removeOverlays(Columbia); map.removeOverlays(Coventry); map.removeOverlays(Ellington); map.removeOverlays(Hebron); map.removeOverlays(Mansfield_Cent); map.removeOverlays(Rockville); map.removeOverlays(Somers); map.removeOverlays(Stafford_Sprin); map.removeOverlays(Staffordville); map.removeOverlays(Storrs); map.removeOverlays(Tolland); map.removeOverlays(Union); map.removeOverlays(Vernon); map.removeOverlays(West_Willingto); map.addOverlays(Andover); centerByArray(Andover, false, false); cntMarker += Andover.length; map.addOverlays(Bolton); centerByArray(Bolton, false, false); cntMarker += Bolton.length; map.addOverlays(Columbia); centerByArray(Columbia, false, false); cntMarker += Columbia.length; map.addOverlays(Coventry); centerByArray(Coventry, false, false); cntMarker += Coventry.length; map.addOverlays(Ellington); centerByArray(Ellington, false, false); cntMarker += Ellington.length; map.addOverlays(Hebron); centerByArray(Hebron, false, false); cntMarker += Hebron.length; map.addOverlays(Mansfield_Cent); centerByArray(Mansfield_Cent, false, false); cntMarker += Mansfield_Cent.length; map.addOverlays(Rockville); centerByArray(Rockville, false, false); cntMarker += Rockville.length; map.addOverlays(Somers); centerByArray(Somers, false, false); cntMarker += Somers.length; map.addOverlays(Stafford_Sprin); centerByArray(Stafford_Sprin, false, false); cntMarker += Stafford_Sprin.length; map.addOverlays(Staffordville); centerByArray(Staffordville, false, false); cntMarker += Staffordville.length; map.addOverlays(Storrs); centerByArray(Storrs, false, false); cntMarker += Storrs.length; map.addOverlays(Tolland); centerByArray(Tolland, false, false); cntMarker += Tolland.length; map.addOverlays(Union); centerByArray(Union, false, false); cntMarker += Union.length; map.addOverlays(Vernon); centerByArray(Vernon, false, false); cntMarker += Vernon.length; map.addOverlays(West_Willingto); centerByArray(West_Willingto, false, false); cntMarker += West_Willingto.length; centerByArray(Andover,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'); } }