function srchformShow() {
	showSpan();
	t = window.setTimeout('hideSpan()', 5000);
}
function srchformReshow() {
	window.clearTimeout(t);
}
function srchformHide() {
	t = window.setTimeout('hideSpan()', 2500);
}

function showSpan() {
	document.all.span1.style.visibility = "visible";
}
function hideSpan() {
	document.all.span1.style.visibility = "hidden";
}
function rollAreas(i) {
	showSpan(aryAreaDesc[i], i);
}

if (document.images) version = "n4";  
else if (navigator.userAgent.indexOf("Mozilla/2.0") != -1) version = "n3";
else version = "n2";
function on_img(imgName) {
	if (version == "n4") {
		img = eval(imgName + "_on.src");
		document [imgName].src = img;
	}
}
function off_img(imgName) {
	if (version == "n4") {
		img = eval(imgName + "_off.src");
		document [imgName].src = img;
	}
}

function message(text) {
	window.status = text;
	return true;
}

function launchRemote(url) {
	popWin = window.open(url,"popWin","toolbar=no,location=0,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,width=425,height=476,left=35,top=15");
	if (!popWin.opener) popWin.opener = self;
	// popWin.opener.name = "opener";
	if (navigator.appVersion.indexOf("2.") == -1 && navigator.appVersion.indexOf("MSIE") == -1) popWin.focus();
}

var winOpts = "toolbar=no,location=0,directories=0,status=yes,menubar=yes,scrollbars=no,resizable=no,height=350,width=510,copyhistory=0,"
var smallwindow = null;
function setEvent() {
	return false;
}
function historywin(filename) {
	fileURL = filename;
	if (parseInt(navigator.appVersion) < 4) { if (smallwindow != null) smallwindow.close(); }  
	timerID= setTimeout('opener(fileURL)',100);
}
function windowFocus() {
	if (navigator.appVersion.indexOf("2.") == -1 && navigator.appVersion.indexOf("MSIE") == -1) {
		smallwindow.focus();
	}
}
function openit(winName) {
	filename = winName;
	winName = "historywin"
	smallwindow = window.open(filename,winName,winOpts)
	if (navigator.appVersion.indexOf("(X11") != -1  || navigator.appVersion.indexOf("(Mac") != -1)
		smallwindow = window.open(filename,winName,winOpts)
	if (navigator.appVersion.indexOf("MSIE") == -1)
		smallwindow.mainWin = this;
		windowFocus();
}

// CMS script needed for file management admin pages
function confirmDeleteRecord(aURL,descr) {
    if(confirm('Are you sure you want to Delete this record('+descr+')?')) {
      location.href = aURL;
    }
}

function changeDisplay(theChecked,theWhat) {
	var theNode;
	var theDisplay;
	/* alert("in changeDisplay. theWhat=" + theWhat + " theChecked = " + theChecked);  */
	if (theChecked == true) theDisplay = "";
	else theDisplay = "none";
	for (var i=1;;i++) {
		// Check if the getElementById method is available
		if (document.getElementById) {
			theNode = document.getElementById(theWhat + i);
			/* alert(theNode); */
			if (theNode == null) { return; }
		} else if (document.all) {
			// The alert lets me verify that I tested the path.
			alert("Running an older version of IE." + " May not be able to hide rows");
			theNode = document.all[theWhat+i];
			if (theNode == null){ return; }
		} else {
			alert("Cannot change visibility of the display element." + " Was " + theWhat);
			return;
		}
		theNode.style.display = theDisplay;
	}
}