
var cityLatitudeCenter=40.700722;var cityLongitudeCenter=-111.885452;var cityZoomLevel=11;var _upDating=true;function GetElementByID(obj)
{return document.getElementById(obj);}
function GetElementByClientId(obj)
{return document.getElementById('<%='+obj+'.ClientID%>');}
function CreateMarkerGroups(input){UpdatePage(true);}
function CreateMarkerGroupsAndToggleGoogleLinks(input,linkRequestType){UpdateRoadWeatherPage(true,linkRequestType);}
function MultiDimensionalArray(iRows,iCols)
{try
{var i;var j;var a=new Array(iRows);for(i=0;i<iRows;i++)
{a[i]=new Array(iCols);for(j=0;j<iCols;j++)
{a[i][j]="";}}
return(a);}
catch(e)
{var sErr=e.message;}}
function DisplayRwisOnDashBoard(id,dir,title,longitude,latitude,html1,html2,html3,html4,selectedIndexMapArea,selectedIndexCamera,mesoWestURL){try{GetElementByID('rwisImg').src=_rwisChartFolder+'RwisChart_'+id+".gif";GetElementByID('DivMesoWestURL').style.display='block';GetElementByID('mesoWestURL').href=mesoWestURL;SetSelectedTab('ds_three');var input="Rwis"+","+
id+" ,' ' ,"+
title.replace(","," ")+","+
selectedIndexMapArea+","+
selectedIndexCamera+","+
mesoWestURL;AsyncCallServerSide(input);}
catch(e){alert(e.message+" - DisplayRwisOnDashBoard");}}
function DisplayCameraOnDashBoard(id,direction,title,selectedIndexMapArea,selectedIndexCamera,url){try{GetElementByID('cameraImg').src=url;SetSelectedTab('ds_one');var input="Camera"+","+
id+","+
direction+","+
title.replace(","," ")+","+
selectedIndexMapArea+","+
selectedIndexCamera+","+
url;AsyncCallServerSide(input);}
catch(e)
{alert(e.message+" - DisplayCameraOnDashBoard");}}
function DisplaySignOnDashBoard(id,direction,title,selectedIndexMapArea,selectedIndexCamera)
{try{GetElementByID('signImage').src=_tisAnimatedFolder+id+'-'+title.replace("`","'")+".gif";SetSelectedTab('ds_two');var input="Sign"+","+
id+","+
direction+","+
title.replace(","," ").replace("`","'")+","+
selectedIndexMapArea+","+
selectedIndexCamera+" , ' '"
AsyncCallServerSide(input);}
catch(e)
{alert(e.message+" - DisplaySignOnDashBoard");}}
function ZoomGoogleMapToParticularCoordinates(LatitudeNorth,LongitudeWest,selectedTrafficMapIndex,zoomLevel){googleMap.setCenter(new GLatLng(LatitudeNorth,LongitudeWest),zoomLevel);FillMapAreasList(selectedTrafficMapIndex,0);}
function SetCoordinatesGoogleMap(LatitudeNorth,LongitudeWest,selectedTrafficMapIndex,zoomLevel){cityLatitudeCenter=LatitudeNorth;cityLongitudeCenter=LongitudeWest;cityZoomLevel=zoomLevel;FillMapAreasList(selectedTrafficMapIndex,0);}
function CheckZoom(oldZ,newZ){setCookie('ZoomLevel',newZ/1);var maxZoomLevelReached=false;if(newZ>_maxZoomLevel||newZ<_minZoomLevel){maxZoomLevelReached=true;googleMap.setZoom(oldZ);}}
function SetTextByElement(element,text){if(document.all){GetElementByID(element).innerText=text;}else{GetElementByID(element).textContent=text;}}
function SetImages(){try{if(GetElementByID('cameraImg').src.split('?').length>1){GetElementByID('cameraImg').src=GetElementByID('cameraImg').src.split('?')[0]+'?rand='+Math.random().toString();}else{GetElementByID('cameraImg').src=GetElementByID('cameraImg').src+'?rand='+Math.random().toString();}
if(GetElementByID('signImage').src.split('?').length>1){GetElementByID('signImage').src=GetElementByID('signImage').src.split('?')[0]+'?rand='+Math.random().toString();}else{GetElementByID('signImage').src=GetElementByID('signImage').src+'?rand='+Math.random().toString();}
if(GetElementByID('rwisImg').src.split('?').length>1){GetElementByID('rwisImg').src=GetElementByID('rwisImg').src.split('?')[0]+'?rand='+Math.random().toString();}else{GetElementByID('rwisImg').src=GetElementByID('rwisImg').src+'?rand='+Math.random().toString();}}catch(e){}}
function Dispose(data){data.d.length=0;data.d=null;data=null;EndAJAXResponse();if(BrowserDetect.browser=="Explorer")
CollectGarbage();}
function RemoveEscapeChars(str)
{str=str.replace("'","").replace("\"","").replace("`","").replace("-","").replace("\\","").replace("/","");str=str.replace("<","&lt;").replace("\n","").replace("\r","");str=str.replace(">","&gt;").replace("{","&lt;").replace("}","&gt;").replace("&amp;amp;","&").replace("&amp;","").replace("amp;","").replace(","," ");return str;}
button_one=new Image();button_two=new Image();button_one.src="/images/camera_tab.JPG";button_two.src="/images/sign_tab.JPG";function SetSelectedTab(tabindex)
{SetTabButton(tabindex);}
function SetTabButton(x){if(document.getElementById('ds_one'))
document.getElementById('ds_one').style.display='none';if(document.getElementById('ds_two')){document.getElementById('ds_two').style.height="220px";document.getElementById('ds_two').style.display='none';}
if(document.getElementById('ds_three')){document.getElementById('ds_three').style.height="220px";document.getElementById('ds_three').style.display='none';}
document.getElementById(x).style.display='block';document.getElementById('tabs_Ds').className='tabs_'+x;}
function IncreaseFontSize(link){try{try{GetElementByID('linkReportedConditions').style.fontSize='10px';}
catch(e){}
GetElementByID('linkCurrentForecast').style.fontSize='10px';GetElementByID('linkNext').style.fontSize='10px';GetElementByID('linkNextPlus').style.fontSize='10px';link.style.fontSize='12px';}
catch(e){}}