/* Simple version detection */
var oldNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);

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 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 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;
	var tURL = ""
	if (strNewArea != "") {
		if(strNewArea != "IA_DesMoines"){
			tURL = "default.asp" ;
		}else{
			tURL = "DM_Metro.asp" ;
		}
		document.location.href = strRelativeRoot + tURL + "?display=" + strDisplay + "&area=" + strNewArea + "&date=" + strDate + "&textOnly=" + strTextOnly;
	}
}

function changeViewAreaRoadCond(){
	intIdx = document.forms.view.viewArea.selectedIndex;
	strNewArea = document.forms.view.viewArea[intIdx].value;
	var tURL = ""
	if (strNewArea != "") {
		tURL = "roadConditions.asp" ;
		document.location.href = strRelativeRoot + tURL + "?area=" + strNewArea + "&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";
		}
	}
