/**/var locations = new Array(27);locations['230'] = new Array("230", "35.1366320", "-106.5880870", "", "", "", "", "", "Devon Self Storage", "Albuquerque", "4801  San Mateo Blvd. NE Albuquerque, NM 87109", "505-875-0005", "505-312-9594", "Pan American Frontage Rd S<br/>	<br/>	1. Head southwest on Pan American Frontage Rd S toward Jefferson St NE 0.4 mi<br/>	2. Turn left onto Jefferson St NE 0.4 mi<br/>	3. Turn left onto McLeod Rd NE 0.4 mi<br/>	4. Take the 2nd right onto San Mateo Blvd NE<br/><br/>Destination will be on the right", "Pan American Frontage Rd N<br/>	<br/>	1. Head northeast on Pan American Frontage Rd N toward Bogan Ave NE 0.5 mi<br/>	2. Take the 2nd right onto McLeod Rd NE 0.7 mi<br/>	3. Take the 3rd right onto San Mateo Blvd NE<br/><br/>Destination will be on the right", "McLeod Rd NE<br/>	<br/>	1. Head west on McLeod Rd NE toward El Camino Hermosa Dr NE 0.5 mi<br/>	2. Take the 3rd left onto San Mateo Blvd NE<br/><br/>Destination will be on the right", "McLeod Rd NE<br/>	<br/>	1. Head southeast on McLeod Rd NE toward Jefferson St NE  0.7 mi<br/>	2. Take the 3rd right onto San Mateo Blvd NE<br/>Destination will be on the right", "NM", "New Mexico", "87109", "4801 ", "San Mateo Blvd. NE"); locations['224'] = new Array("224", "42.2181336", "-83.7347236", "", "", "", "", "", "Devon Self Storage", "Ann Arbor", "4750  S. State Road Ann Arbor, MI 48108", "734-761-1787", "734-926-5776", "", "", "", "", "MI", "Michigan", "48108", "4750 ", "S. State Road"); locations['218'] = new Array("218", "39.3317369", "-76.6355590", "", "", "", "", "", "Devon Self Storage", "Baltimore", "3634  Falls Road Baltimore, MD 21211", "410-662-6464", "443-692-7143", "South on I-83 to Cold Springs Lane.  Turn Left onto Cold Springs Lane.  Turn right on Falls Road.  Devon Self Storage is approximately .8 miles on the right", "North on I-83 to Falls Road.  Devon Self Storage is approximately .5 miles on the left", "West on Cold Springs Lane.  Turn left on Falls Road.  Devon Self Storage is approximately .8 miles on the right", "East on Cold Springs Lane.  Turn right on Falls Road.  Devon Self Storage is approximately .8 miles on the right", "MD", "Maryland", "21211", "3634 ", "Falls Road"); locations['219'] = new Array("219", "39.2967400", "-76.5685740", "", "", "", "", "", "Devon Self Storage", "Baltimore", "3500  Pulaski Hwy. Baltimore, MD 21224", "410-276-3300", "410-609-6414", "From North<br/>Frankford Ave<br/>Head southeast Frankford Ave toward Barbara Ave<br/>Turn left onto Moravia Park Dr.<br/>Turn right US-40W<br/>Destination on the right hand side<br/>", "From South<br/>Boston St.<br/>Head west onto Boston St. toward S. Haven St.<br/>Take first right onto S. Haven St.<br/>Turn left onto US-40W<br/>Destination on the right hand side<br/>", "From East<br/>John Hopkins Bayview Medical Center<br/>Head south on Mason Lord Dr. toward Bayview Blvd<br/>Turn right onto E. Lombard St<br/>Turn right onto S. Haven St.<br/>Turn left US-40W<br/>Destination on the right hand side<br/>", "From West<br/>Harborplace & The Gallery<br/>Head east on E. Pratt St toward South St.<br/>Turn left onto S. Broadway<br/>Turn right onto US-40 E Orleans St.<br/>Continue to follow US-40W <br/>Destination on left hand side<br/>", "MD", "Maryland", "21224", "3500 ", "Pulaski Hwy."); locations['225'] = new Array("225", "42.2644949", "-83.5088260", "", "", "", "", "", "Devon Self Storage", "Canton", "47887  Michigan Avenue Canton, MI 48188", "734-487-0820", "734-219-3748", "", "", "", "", "MI", "Michigan", "48188", "47887 ", "Michigan Avenue"); locations['232'] = new Array("232", "35.1574630", "-80.8743040", "", "", "", "", "", "Devon Self Storage", "Charlotte", "5649  South Blvd. Charlotte, NC 28217", "704-556-9998", "704-631-9054", "", "", "", "", "NC", "North Carolina", "28217", "5649 ", "South Blvd."); locations['226'] = new Array("226", "42.5463120", "-82.8788860", "", "", "", "", "", "Devon Self Storage", "Clinton Township", "33985  Harper Avenue Clinton Township, MI 48035", "586-791-1530", "586-307-5386", "", "", "", "", "MI", "Michigan", "48035", "33985 ", "Harper Avenue"); locations['220'] = new Array("220", "39.4908959", "-76.6483134", "", "", "", "", "", "Devon Self Storage", "Cockeysville", "11150  York Road Cockeysville, MD 21030", "410-771-1211", "410-343-7056", "83S towards Timonium,  Take the Shawan Rd East exit, Exit 20 A, towards Cockeysville.  Turn slight right onto York Rd./MD-45.  Go .4 Miles, Devon Self Storage will be on your right.", "83N toward Timonium. Exit 20A Shawan Road. Merge onto Shawan Road. Turn slight right onto York Rd./MD-45. Go .4 Miles, Devon Self Storage will be on your right.", "Take 43 W to 695 W to 83N toward Timonium.  Exit 20A Shawan Road towards Cockeysville.  Merge onto Shawan Road.  Make a slight right onto York Road (MD-45)", "MD 140E to 695E on left toward Towson.  83N toward Timonium and Exit 20A Shawan Road.  Merge  on Shawan Road.  Make a slight right onto York Road (MD45) ", "MD", "Maryland", "21030", "11150 ", "York Road"); locations['242'] = new Array("242", "27.6676720", "-97.2799690", "", "", "", "", "", "Harbor Self Storage", "Corpus Christi", "10514 S. Padre Island Corpus Christi, TX 78418", "361-937-8673", "361-239-2762", "TX-358 E<br/> <br/> 1. Head southeast on TX-358 E  <br/> 2. Take the exit toward Waldron Rd/Laguna Shores Rd  <br/> 3. Merge onto S Padre Island Dr  <br/> 4. Turn left onto Waldron Rd  <br/> 5. Take the 1st right onto Fawn Dr  <br/> 6. Take the 1st left onto Cora Lee Dr <br/> 7. Take the 1st right onto Linnet Courts/Linnet Ct  <br/> 8. Turn right onto Mounts Dr  <br/> 9. Turn right onto S Padre Island Dr  ", "S Padre Island Dr<br/> <br/> 1. Head northwest on S Padre Island Dr<br/>Destination will be on the right ", "", "", "TX", "Texas", "78418", "10514", "S. Padre Island"); locations['227'] = new Array("227", "42.4011307", "-83.1177088", "", "", "", "", "", "Devon Self Storage", "Detroit", "1100  Oakman Blvd. Detroit, MI 48238", "313-868-3200", "313-312-9915", "", "", "", "", "MI", "Michigan", "48238", "1100 ", "Oakman Blvd."); locations['221'] = new Array("221", "39.4329071", "-76.3310554", "", "", "", "", "", "Devon Self Storage", "Edgewood", "1306  Pulaski Highway Edgewood, MD 21040", "410-676-4474", "410-417-7615", "From the North- Take route 24 to 95 south. Exit at the Mountain Road route 152 exit. Turn left onto Pulaski Highway", "From the South- Either take Route 40 directly to us or take 95 north and exit at Mountain road Route 152 then turn left onto Pulaski Highway", "From the East- You can get to us directly from Route 40 West", "From the West- Take Route 1 and turn right onto Jerusalem road. Take Jerusalem road to Mountain road route 152 then turn left onto Pulaski Highway", "MD", "Maryland", "21040", "1306 ", "Pulaski Highway"); locations['222'] = new Array("222", "39.1784600", "-76.7704370", "", "", "", "", "", "Devon Self Storage", "Elkridge", "7025  Kit Kat Road Elkridge, MD 21075", "410-799-5400", "443-296-3146", "	Take 95S toward Washington then take<br/>	Exit 43A-MD 100E toward Glen Burnie drive approx 1.0 mi. then take<br/>	Exit 6A US-1S toward South Laurel drive approx 1.2 mi <br/>	 Turn left on Kit Kat Rd. (Facility is on immediate left).<br/>", "	Take 95N to exit 13A (on left) toward Baltimore drive approx. 2.2 mi. then take<br/>	MD 175 exit which is exit 41 B-A toward Columbia/Jessup drive approx. .03 mi then<br/>	Merge on to MD 175 E/Waterloo Rd. via exit 41 A toward Jessup then<br/>	Turn left onto US- N/Washington Blvd. drive approx.  .09 mi. <br/>	Turn right on Kit Kat Rd. (Facility is on immediate left).<br/>", "	Take MD 100E via ramp toward Glen Burnie drive approx. 6.2 mi. then take<br/>	Exit 6A to merge onto US-1 S/Washington Blvd toward Laurel S drive approx. 1.2 mi. <br/>	Turn left on Kit Kat Rd. (Facility is on immediate left).<br/><br/>", "	Take MD 32W toward Columbia drive approx. 2.3 mi. then take<br/>	Exit toward US-1 N/Washington Blvd. approx.  .01 mi.<br/>	Keep right at the fork and merge onto US-1 N/Washington Blvd. drive approx. 3.9 mi <br/>	Turn right onto Kit Kat Rd. (Facility is on immediate left).<br/>", "MD", "Maryland", "21075", "7025 ", "Kit Kat Road"); locations['216'] = new Array("216", "26.5451059", "-81.8001279", "", "", "", "", "", "Devon Self Storage", "Fort Myers", "13701 Indian Paint Lane Fort Myers, FL 33912", "239-466-9200", "239-645-4701", "", "", "", "", "FL", "Florida", "33912", "13701", "Indian Paint Lane"); locations['223'] = new Array("223", "39.1655050", "-77.1576180", "", "", "", "", "", "Devon Self Storage", "Gaithersburg", "18830  Woodfield Road Gaithersburg, MD 20879", "301-963-7500", "240-252-7501", "North from Damascus-south on Woodfield Rd 6miles on the right<br/><br/>", "South from Rockville- North on Shady Grove Rd, left on Muncaster Mill, right on Woodfield Rd 1 mile on left", "West from Olney- Rt 108 west, left on Fieldcrest, left on Woodfield Rd 1.5 miles on right", "East from Gaithersburg- North on Montgomery Village, right on Mid-County, Left on Woodfield 2miles on left<br/>", "MD", "Maryland", "20879", "18830 ", "Woodfield Road"); locations['228'] = new Array("228", "42.8839720", "-85.7371740", "", "", "", "", "", "Devon Self Storage", "Grandville", "2940  44th Street SW Grandville, MI 49418", "616-249-0601", "616-828-4746", "", "", "", "", "MI", "Michigan", "49418", "2940 ", "44th Street SW"); locations['229'] = new Array("229", "42.7471869", "-84.5420660", "", "", "", "", "", "Devon Self Storage", "Lansing", "708  E. Grand River Avenue Lansing, MI 48906", "517-316-0518", "517-580-0381", "", "", "", "", "MI", "Michigan", "48906", "708 ", "E. Grand River Avenue"); locations['238'] = new Array("238", "36.2467250", "-86.7226840", "", "", "", "", "", "Devon Self Storage", "Madison", "1210  Gallatin Road S Madison, TN 37115", "615-865-2999", "615-208-7628", "From I-65 to Old Hickory Blvd. <br/>Left to Gallatin Rd.<br/>Right to Due West Ave.   We are 3 doors south<br/>", "Gallatin Rd. over Briley Pkwy.<br/>Continue North and we are 1 mile on left<br/>", "Off of Briley Pkwy @ Gallatin Rd. S. <br/>Bear to right getting in the left had lane. <br/>One mile on the left across from Wendys<br/>", "From the West   I-24 or I-40<br/>Off of Briley Pkwy. @ Gallatin Rd. <br/>Bear to the right getting in the left had lane<br/>One mile on theleft.<br/>", "TN", "Tennessee", "37115", "1210 ", "Gallatin Road S"); locations['263'] = new Array("263", "40.5480520", "-75.0708140", "", "", "", "", "", "Devon Self Storage", "Milford", "750 Frenchtown Rd Milford, NJ 08848", "908-996-2645", "908-628-0043", "From Milford NJ follow CR619 south for about 2 miles property is on the right behind the Valero gas station.", "Fron Frenchtown follow CR619 north about 1 mile property is on left behind the Valero gas station.", "Follow RT 12 into Frenchtown, follow CR 619 north about 1 mile, peoperty is on the left behind the Valero gas station.", "", "NJ", "New Jersey", "08848", "750", "Frenchtown Rd"); locations['213'] = new Array("213", "37.8025122", "-122.2708264", "", "", "", "", "", "Devon Self Storage", "Oakland", "1205 Franklin Street Oakland, CA 94612", "510-763-6000", "510-291-4903", "1. Head south on I-980 W toward Exit 1D 2. Take exit 1D for 18th St toward 14th St 3. Merge onto Brush St 4. Turn left onto 14th St 5. Turn right onto Webster St 6. Turn right at the 2nd cross street onto 12th St 7. Take the 1st right onto Franklin St Destination will be on the left", "", "1. Head east on I-880 S 2. Take exit 42 toward Broadway/Alameda 3. Turn right onto 5th St 4. Turn left onto Castro St 5. Turn right onto 11th St 6. Turn left onto Franklin St Destination will be on the left", "1. Head northwest on I-880 N 2. Take exit 41B toward Broadway/Downtown 3. Merge onto 6th St 4. Turn right onto Broadway 5. Turn right onto 11th St 6. Take the 1st left onto Franklin St Destination will be on the left", "CA", "California", "94612", "1205", "Franklin Street"); locations['214'] = new Array("214", "37.8158400", "-122.2687130", "", "", "", "", "", "Devon Self Storage", "Oakland", "2633 Telegraph Avenue Oakland, CA 94612", "510-763-6000", "510-291-4223", "CA-24 W 1. Head south on CA-24 W 2. Take the 27th St exit toward W Grand Ave 3. Turn left onto 27th St 4. Take the 1st right onto Telegraph Ave<br/>Destination will be on the right", "1. Head northeast toward 17th St 2. Merge onto Castro St 3. Slight right onto Martin Luther King Jr Way 4. Turn right onto W Grand Ave 5. Turn left onto Telegraph Ave Destination will be on the left", "1. Head northwest on I-580 W 2. Take exit 19D toward Downtown Oakland/I-980/I-880 3. Keep right at the fork, follow signs for 27th St/W Grand Ave 4. Turn left onto 27th St 5. Take the 1st right onto Telegraph Ave Destination will be on the right", "1. Head east on I-580 E toward Exit 19B 2. Take exit 19C toward Downtown Oakland/I-980 W 3. Keep right at the fork, follow signs for 27th St/W Grand 4. Turn left onto 27th St 5. Take the 1st right onto Telegraph Ave Destination will be on the right", "CA", "California", "94612", "2633", "Telegraph Avenue"); locations['217'] = new Array("217", "29.1712420", "-82.1658860", "", "", "", "", "", "Devon Self Storage", "Ocala", "2401  SW 17th Rd. Ocala, FL 34471", "352-873-0777", "352-547-4152", "From I-75, take Exit 350 (State Rd 200) and travel East. The facility is about one mile down on your left. Across from Caraba&#039;s Italian Restaurant.", "", "", "", "FL", "Florida", "34471", "2401 ", "SW 17th Rd."); locations['264'] = new Array("264", "29.6522970", "-95.1464020", "", "", "", "", "", "Devon Self Storage", "Pasadena", "6045 Fairmont Parkway Pasadena, TX 77505", "281-487-3000", "281-870-2095", "1. Head south on Sam Houston Tollway S 2. Take the exit toward Fairmont Pkwy/Genoa - Red Bluff Rd. 3. Merge onto East Sam Houston Pkwy S/Texas 8 Beltway S. 4. Turn left onto Fairmont Pkwy 5. Turn left onto Space Center Blvd. 6. Take the 1st left onto Fairmont Pkwy. Destination will be on the right.", "1. Head northeast on East Sam Houston Pkwy S/Texas 8 Beltway N. 2. Turn right onto Fairmont Pkwy. 3. Turn left onto Space Center Blvd. 4. Take the 1st left onto Fairmont Pkwy.", "1. Head west on W Fairmont Pkwy toward Red Bluff Rd<br/>Destination will be on the right", "1. Head east on Fairmont Pkwy toward Panama St Turn left onto Space Center Blvd. 3. Take the 1st left onto Fairmont Pkwy Destination will be on the right.", "TX", "Texas", "77505", "6045", "Fairmont Parkway"); locations['233'] = new Array("233", "40.0027219", "-75.1603158", "", "", "", "", "", "Devon Self Storage", "Philadelphia", "1831  W. Allegheny Ave. Philadelphia, PA 19132", "215-225-6500", "215-253-7527", "", "", "", "", "PA", "Pennsylvania", "19132", "1831 ", "W. Allegheny Ave."); locations['234'] = new Array("234", "39.9752033", "-75.2127924", "", "", "", "", "", "Devon Self Storage", "Philadelphia", "1300  Belmont Ave Philadelphia, PA 19104", "215-877-1750", "215-268-7436", "", "", "", "", "PA", "Pennsylvania", "19104", "1300 ", "Belmont Ave"); locations['235'] = new Array("235", "39.9136357", "-75.1474870", "", "", "", "", "", "Devon Self Storage", "Philadelphia", "12  E. Oregon Ave. Philadelphia, PA 19148", "215-462-9000", "215-253-3878", "Take I-95 South to Exit #19 (Oregon/Packer Avenue).  Bear right around the ramp to the light which is Front Street.  Make a left onto Front Street and follow to the next light (Oregon Avenue).  Make a right onto Oregon Aavenue and go under the underpass.  Devon is on the right.", "Take I-95 North to Exit #20 (Washington Avenue).  Make a right at the light onto Columbus Blvd.  Take Columbus Blvd to Oregan Avenue and make at the light.  Follow Oregon Avenue.  Devon is on the left, before the underpass.", "From NJ take the Walt Whitman Bridge. After toll take Exit# 1 to Front Street.  Make a left on Front Street to Oregon Avenue and make a right at the light.  Stay Oregon Avenue, go under the underpass and we will be to your right.", "Take I-76 East to Exit #350 (Packer Avenue).  Follow ramp to the light.  Make a left onto Packer Avenue.  Take Packer Avenue to Front Street.  Make a left a the light.  Follow Front Street to Oregon Avenue and make a right at the light.  Follow Oregon Avenue, go under underpass and Devon is on the right. ", "PA", "Pennsylvania", "19148", "12 ", "E. Oregon Ave."); locations['231'] = new Array("231", "40.6391080", "-74.1629490", "", "", "", "", "", "Devon Self Storage", "Staten Island", "3131  Richmond Terrace Staten Island, NY 10303", "718-442-0355", "917-397-3033", "From Staten island ferry area take Richmond terr  towards south ave we are two blocks before south.<br/><br/>", "", "Staten island expressway to south ave  make a right on south continue  on south to Richmond terr make right we are 2 blocks on left.", "West shore expressway to south ave make right on south continue on south to Richmond terr make right we  are two blocks on left.", "NY", "New York", "10303", "3131 ", "Richmond Terrace"); locations['262'] = new Array("262", "40.5954300", "-74.7602163", "", "", "", "", "", "Devon Self Storage", "Whitehouse Station", "34 42nd Street Whitehouse Station, NJ 08889", "908-534-4638", "908-691-2309", "From RT 22 West turn left onto Rt 523 follow to Pulaski Rd and turn left, follow to 42nd street and turn right property is on the left about 1/2 mile down road", "Follow Rt 31 north from Flemington, turn right on the RT 523 and follow to CR 620 and turn right, follow to 42nd street and turn left property is about 1/2 mile up road on right.", "", "", "NJ", "New Jersey", "08889", "34", "42nd Street"); var facilities = new Array(230,224,218,219,225,232,226,220,242,227,221,222,216,223,228,229,238,263,213,214,217,264,233,234,235,231,262)function ConvertPlatformID(id) {	var arrConvertID =  {		2012 : '101',		2013 : '102',		2014 : '103',		2015 : '104',		2016 : '105',		2017 : '106',		9011 : '107',		902 : '108',		903 : '109',		904 : '110',		905 : '111',		906 : '112',		907 : '113',		908 : '114',		909 : '115',		1391 : '116',		1691 : '117',		2280 : '118',		2281 : '119',		9012 : '120',		136  : '136',		137  : '137',		138  : '138',		139  : '139',		140  : '140',		163  : '163',		200  : '200',		201  : '201',		202  : '202',		203  : '203',		211 : '25',		212 : '44',		213 : '2744',		214 : '2745',		216 : '3566',		217 : '35',		218 : '17',		219 : '40',		220 : '12',		221 : '14',		222 : '15',		223 : '56',		224 : '1394',		225 : '1396',		226 : '1397',		227 : '34',		228 : '1399',		229 : '1401',		230 : '1',		231 : '1407',		232 : '11',		233 : '2',		234 : '7',		235 : '37',		237 : '4',		238 : '31',		242 : '242',		262 : '262',		263 : '263',		264 : '264'		}			var NewID = arrConvertID[id];		if (NewID)		return NewID;	else		return array_search(id, arrConvertID);		} //MAP//////////////var directionDisplay;  var directionsService = new google.maps.DirectionsService();  var markersArray = [];  var latlng;   var map;  var trafficLayer;  var bounds = new google.maps.LatLngBounds();  var infowindow = new google.maps.InfoWindow();         function createMarker(page, id) {    	var contentString = "<h3>"+ locations[id][8] +" - "+ locations[id][9] +"</h3>";		contentString += locations[id][20] +' '+locations[id][21]+'<br/>'+locations[id][9]+', '+locations[id][17]+'<br/>';	contentString += ((locations[id][12] !== "--" ) ? locations[id][12] : locations[id][11]) +'<br/>'		contentString += '<a href="/'+locations[id][9].replace(" ", "_")+'_'+locations[id][17]+'/zip_'+locations[id][19]+'/devon_self_storage/'+ConvertPlatformID(locations[id][0])+'">More Information</a>';		var position = new google.maps.LatLng(locations[id][1], locations[id][2])    var marker = new google.maps.Marker({        position: position,        map: map,        title: locations[id][8],		icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_letter_withshadow&chld=D|007fb3|ffffff'    });		/*var infowindow = new google.maps.InfoWindow({        content: contentString    });*/    if (page != 'facility') { google.maps.event.addListener(marker, 'click', function() {        infowindow.close()		infowindow.setContent(contentString);		infowindow.open(map, marker);    }); }	markersArray.push(marker);	bounds.extend(position)	//alert (id + locations[id])}      function initialize(page, id, state, city) {  	id = id.split("|");		// alert (id[0] +'------'+ id[1]);	var g_id = id[0];	id = id[1];      if (id) { latlng = new google.maps.LatLng(locations[id][1], locations[id][2]); }	else { latlng = new google.maps.LatLng(0,0) }     var myOptions = {      zoom: 15,      center: latlng,      mapTypeId: google.maps.MapTypeId.ROADMAP    };    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);		directionsDisplay = new google.maps.DirectionsRenderer();	directionsDisplay.setMap(map);    directionsDisplay.setPanel(document.getElementById("directionsPanel"));		if (id) {		createMarker(page, id)	} else {				for (var i=0; i<facilities.length; i++) {						if (state == locations[facilities[i]][18]) {				createMarker(page, facilities[i])			}						if (city == locations[facilities[i]][9]) {								createMarker(page, facilities[i]);			}						if (page == 'all_locations') {				createMarker(page, facilities[i])			}					}		map.fitBounds(bounds);	}		if (id) {	 // We get the map's default panorama and set up some defaults.    // Note that we don't yet set it visible.    panorama = map.getStreetView();    panorama.setPosition(((locations[id][6]) ? new google.maps.LatLng(locations[id][6], locations[id][7]) : latlng));	    panorama.setPov({      heading: ((locations[id][3]) ? parseFloat(locations[id][3]) : 16.5),       zoom: ((locations[id][5]) ? parseFloat(locations[id][5]) : 0),      pitch: ((locations[id][4]) ? parseFloat(locations[id][4]) : 7.658284707444938)} //    );		}	   trafficLayer = new google.maps.TrafficLayer();  	/*	google.maps.event.addListener(panorama, 'pov_changed', function() {	document.getElementById("directionsPanel").innerHTML =  panorama.getPosition()+' '+panorama.getPov().heading +' '+ panorama.getPov().pitch	    }); */		if (page == 'state_locations' || page == 'all_locations') {} else {// Create the DIV to hold the control and  // call the HomeControl() constructor passing  // in this DIV.  var streetControlDiv = document.createElement('DIV');  var streetControl = new StreetControl(streetControlDiv, map);  streetControlDiv.index = 1;  map.controls[google.maps.ControlPosition.TOP_RIGHT].push(streetControlDiv);    }		// if (page != 'facility') {	// Create the DIV to hold the control and  // call the HomeControl() constructor passing  // in this DIV.  var trafficControlDiv = document.createElement('DIV');  var trafficControl = new TrafficControl(trafficControlDiv, map);  trafficControlDiv.index = 1;  map.controls[google.maps.ControlPosition.TOP_RIGHT].push(trafficControlDiv);	  		// Create the DIV to hold the control and  // call the HomeControl() constructor passing  // in this DIV.  var homeControlDiv = document.createElement('DIV');  var homeControl = new HomeControl(homeControlDiv, map);  homeControlDiv.index = 1;  map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv);		// }      }  var traffic_state = 0;    function toggleTraffic() {	if (traffic_state == 0) {		trafficLayer.setMap(map);		traffic_state = 1;	} else {		trafficLayer.setMap(null);		traffic_state = 0;	}  }     function toggleStreetView() {    var toggle = panorama.getVisible();    if (toggle == false) {      panorama.setVisible(true);    } else {      panorama.setVisible(false);    }  }    function calcRoute(start, id) {    var end = locations[id][10];    var start = start;    var request = {        origin:start,         destination:end,        travelMode: google.maps.DirectionsTravelMode.DRIVING    };    directionsService.route(request, function(response, status) {      if (status == google.maps.DirectionsStatus.OK) {	    document.getElementById("directionsPanel").innerHTML = '';        directionsDisplay.setDirections(response);		 directionsDisplay.setMap(map);		 if (markersArray) {			// alert(markersArray.length);			//for(i in markersArray) {			for(var ib = 0; ib<markersArray.length; ib++) {				markersArray[ib].setMap(null);			}		 }      }    });  return false;  }    function clearDirections(id) { 	directionsDisplay.setMap(null);		if (markersArray) {		// for(i in markersArray) {		for(var ib = 0; ib<markersArray.length; ib++) {			markersArray[ib].setMap(map);		}	}	document.getElementById("directionsPanel").innerHTML = '';	document.getElementById("directionsPanel").innerHTML = '' + 		// 13 14 15 16		((locations[id][13]) ? '<p><b>From the north:</b></p><p>'+ locations[id][13] +'</p>' : '') +	((locations[id][14]) ? '<p><b>From the south:</b></p><p>'+ locations[id][14] +'</p>' : '') +	((locations[id][15]) ? '<p><b>From the east:</b></p><p>'+ locations[id][15] +'</p>' : '') +	((locations[id][16]) ? '<p><b>From the west:</b></p><p>'+ locations[id][16] +'</p>' : '') +			'';				map.setZoom(15)	map.panTo(latlng)  }  function HomeControl(controlDiv, map) {  // Set CSS styles for the DIV containing the control  // Setting padding to 5 px will offset the control  // from the edge of the map  controlDiv.style.padding = '5px';  // Set CSS for the control border  var controlUI = document.createElement('DIV');  controlUI.style.backgroundColor = 'white';  controlUI.style.borderStyle = 'solid';  controlUI.style.borderWidth = '2px';  controlUI.style.cursor = 'pointer';  controlUI.style.textAlign = 'center';  controlUI.title = 'Reset Map';  controlDiv.appendChild(controlUI);  // Set CSS for the control interior  var controlText = document.createElement('DIV');  controlText.style.fontFamily = 'Arial,sans-serif';  controlText.style.fontSize = '12px';  controlText.style.paddingLeft = '4px';  controlText.style.paddingRight = '4px';  controlText.innerHTML = 'Reset';  controlUI.appendChild(controlText);  // Setup the click event listeners: simply set the map to  google.maps.event.addDomListener(controlUI, 'click', function() { map.setCenter(latlng); map.setZoom(15) } );}    function StreetControl(controlDiv, map) {  // Set CSS styles for the DIV containing the control  // Setting padding to 5 px will offset the control  // from the edge of the map  controlDiv.style.padding = '5px';  // Set CSS for the control border  var controlUI = document.createElement('DIV');  controlUI.style.backgroundColor = 'white';  controlUI.style.borderStyle = 'solid';  controlUI.style.borderWidth = '2px';  controlUI.style.cursor = 'pointer';  controlUI.style.textAlign = 'center';  controlUI.title = 'Street View';  controlDiv.appendChild(controlUI);  // Set CSS for the control interior  var controlText = document.createElement('DIV');  controlText.style.fontFamily = 'Arial,sans-serif';  controlText.style.fontSize = '12px';  controlText.style.paddingLeft = '4px';  controlText.style.paddingRight = '4px';  controlText.innerHTML = 'Street View';  controlUI.appendChild(controlText);  // Setup the click event listeners: simply set the map to  google.maps.event.addDomListener(controlUI, 'click', function() { toggleStreetView(); } );}  function TrafficControl(controlDiv, map) {  // Set CSS styles for the DIV containing the control  // Setting padding to 5 px will offset the control  // from the edge of the map  controlDiv.style.padding = '5px';  // Set CSS for the control border  var controlUI = document.createElement('DIV');  controlUI.style.backgroundColor = 'white';  controlUI.style.borderStyle = 'solid';  controlUI.style.borderWidth = '2px';  controlUI.style.cursor = 'pointer';  controlUI.style.textAlign = 'center';  controlUI.title = 'Traffic';  controlDiv.appendChild(controlUI);  // Set CSS for the control interior  var controlText = document.createElement('DIV');  controlText.style.fontFamily = 'Arial,sans-serif';  controlText.style.fontSize = '12px';  controlText.style.paddingLeft = '4px';  controlText.style.paddingRight = '4px';  controlText.innerHTML = 'Traffic';  controlUI.appendChild(controlText);  // Setup the click event listeners: simply set the map to  google.maps.event.addDomListener(controlUI, 'click', function() { toggleTraffic() } );}function myclick(i) {			google.maps.event.trigger(markersArray[i], "click");	}
