/* 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 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 popMPass(PassName)
	{
	strURL = strRelativeRoot + "mountainpass/passes.asp?pass=" + PassName;
	thisPopMPass = window.open(strURL,"MountainPass","height=300,width=680,scrollbars=0");
	thisPopMPass.focus();
	}

function popStatic(strName)
	{
	strURL = strRelativeRoot + "/staticPopups/" + strName + ".htm";
	thisPopIncident = window.open(strURL,"Incident","height=200,width=400,scrollbars=1");
	thisPopIncident.focus();
	}

function changeViewArea()
	{
	intIdx = document.forms.view.viewArea.selectedIndex;
	strNewArea = document.forms.view.viewArea[intIdx].value;
	if (strNewArea.substring(0,4) == "http") window.open(strNewArea,"otherStates");
	else if (strNewArea != "") document.location.href = strRelativeRoot + "default.asp?display=" + strDisplay + "&area=" + strNewArea + "&date=" + strDate + "&textOnly=" + strTextOnly;
	}
function changePassView()
	{
	intIdx = document.forms.view.viewArea.selectedIndex;
	strNewArea = document.forms.view.viewArea[intIdx].value;
	if (strNewArea != "") { document.location.href = strRelativeRoot + "mountainpass.asp?area=" + strNewArea;}
	}

/* 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";
		}
	}
