/* Simple version detection */
var oldNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);

function popIncident(strIncidentNum)
	{
	strURL = strRelativeRoot + strCurrentDir + "/incidents/" + strIncidentNum + ".htm";
	thisPopIncident = window.open(strURL,"Incident","height=200,width=400,scrollbars=1");
	thisPopIncident.focus();
	}

function popRestArea(RestAreaName)
	{
	strURL = strRelativeRoot + "restareas/" + RestAreaName + ".htm";
	thisPopRestArea = window.open(strURL,"RestArea","height=380,width=675,scrollbars=1");
	thisPopRestArea.focus();
	}

function popMPass(PassName)
	{
	strURL = strRelativeRoot + "mountainpass/passes.asp?pass=" + PassName;
	thisPopMPass = window.open(strURL,"MountainPass","height=600,width=680,scrollbars=0");
	thisPopMPass.focus();
	}
function popMPassAlt(PassName)
	{
	strURL = strRelativeRoot + "mountainpass/passes.asp?pass=" + PassName;
	thisPopMPass = window.open(strURL,"MountainPassA","height=370,width=680,scrollbars=0");
	thisPopMPass.focus();
	}

function popTRamp(PassName)
	{
	strURL = strRelativeRoot + "mountainpass/tramp.asp?pass=" + PassName;
	thisPopTruckRamp = window.open(strURL,"TruckRamp","height=120,width=450,scrollbars=0");
	thisPopTruckRamp.focus();
	}

function popMarker(MarkerName)
	{
	strURL = strRelativeRoot + "markers.asp?marker=" + MarkerName;
	thisPopMarker = window.open(strURL,"HistoricMarker","height=400,width=480,scrollbars=0");
	thisPopMarker.focus();
	}

function popMPassCam(camera)
	{
	strURL = camera;
	thisPopRestArea = window.open(strURL,"MountainPass","height=500,width=750,scrollbars=1");
	thisPopRestArea.focus();
	}

function popByway(BywayURL)
	{
	thisPopByway = window.open(BywayURL,"Byways","height=500,width=800,scrollbars=1");
	thisPopByway.focus();
	}

function popAirport(AeroUrl)
	{
	thisAirport = window.open(AeroUrl,"Airport","height=600,width=800,scrollbars=1");
	thisAirport.focus();
	}

function popCam(CameraUrl)
	{
	thisPopCam = window.open(CameraUrl,"Camera","height=550,width=800,resizable=yes,scrollbars=1");
	thisPopCam.focus();
	}

function popCCTV(cameraPath, imgName, eastDir, westDir, northDir, southDir, strTitle, strType)
	{
	strURL = strRelativeRoot + "cctvDisplay.asp?url=" + cameraPath + "&path="+ cameraPath + "&image=" + imgName + "&east=" + eastDir + "&west=" + westDir + "&north=" + northDir + "&south=" + southDir + "&title=" + strTitle + "&type=" + strType;
	thisPopIncident = window.open(strURL,"Incident","height=510,width=550,scrollbars=1,resizable=1");
	thisPopIncident.focus();
	}

function popWeather(strZone, strZoneName)
	{
	strURL = strRelativeRoot + strCurrentDir + "/incidents/" + strZone + ".htm?zone=" + escape(strZoneName);
	thisPopIncident = window.open(strURL,"Weather","height=200,width=400,scrollbars=1");
	thisPopIncident.focus();
	}

function popWatchWarn(strIncidentNum)
	{
	strURL = strRelativeRoot + strCurrentDir + "/incidents/" + strIncidentNum + ".htm";
	thisPopIncident = window.open(strURL,"Incident","height=400,width=600,scrollbars=1");
	thisPopIncident.focus();
	}
	
function changeViewArea()
	{
	intIdx = document.forms.view.viewArea.selectedIndex;
	strNewArea = document.forms.view.viewArea[intIdx].value;
	if (strNewArea != "") document.location.href = strRelativeRoot + "default.asp?display=" + strDisplay + "&area=" + strNewArea + "&date=" + strDate + "&textOnly=" + strTextOnly;
	}

/* Show an object  */
function showObject(object)
	{
	if (oldNS == true)
		{
		var changeVis = "document." + object + ".visibility = 'show';"
		eval(changeVis);
		}
	else
		{
		toshow = document.getElementById(object);
		toshow.style.visibility = "visible";
		}
	}

/* Hide an object */
function hideObject(object)
	{
	if (oldNS == true)
		{
		var changeVis = "document." + object + ".visibility = 'hide';"
		eval(changeVis);
		}
	else
		{
		toshow = document.getElementById(object);
		toshow.style.visibility = "hidden";
		}
	}
