/* 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 popStatic(strName)
	{
	strURL = strRelativeRoot + "staticPopups/" + strName + ".htm";
	thisPopIncident = window.open(strURL,"Incident","height=200,width=400,scrollbars=1");
	thisPopIncident.focus();
	}

function popCamera(strCamera, strTitle)
	{
	strURL = strRelativeRoot + "cameraImage.asp?camera=" + strCamera + "&title=" + strTitle;
	thisPopIncident = window.open(strURL,"Incident","height=350,width=400,scrollbars=1");
	thisPopIncident.focus();
	}
function popCameraRemote(strCamera, strTitle)
	{
	strURL = strRelativeRoot + "cameraImageRemote.asp?camera=" + strCamera + "&title=" + strTitle;
	thisPopIncident = window.open(strURL,"Incident","height=350,width=400,scrollbars=1");
	thisPopIncident.focus();
	}
function popCameraDuluth(strCamera, strTitle)
	{
	strURL = strRelativeRoot + "cameraImageDuluth.asp?camera=" + strCamera + "&title=" + strTitle;
	thisPopIncident = window.open(strURL,"Incident","height=350,width=400,scrollbars=1");
	thisPopIncident.focus();
	}
function popCameraMetro(strCamera, strTitle)
	{
	strURL = strRelativeRoot + "cameraImageMetro.asp?camera=" + strCamera + "&title=" + strTitle;
	thisPopIncident = window.open(strURL,"Incident","height=350,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;
	}

/* 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";
		}
	}
