
function reloadPage() {
	if (document.layers) document.location.reload();
}

function openPopUp(url,winName,width,height,scroll,left,top)
{
	var scrollbars = (scroll != null) ? scroll : "auto";
	var left = (left != null) ? ',left='+left : '';
	var top = (top != null) ? ',top='+top : '';
	var popUp = window.open(url,winName,'width='+width+',height='+height+',scrollbars='+scrollbars+',resizable=no,status=yes'+left+top);
	return void(0);
}

function showHide(divID,imgID,hideGif,showGif) {
	if (document.layers) { // Browser is NS 4
		var hide = (document.layers[divID].visibility == "hide") ? false : true;
		if (hide) {
			document.layers[divID].visibility = "hide";
		} else {
			document.layers[divID].visibility = "show";
		}
	} else if (document.all) { // Browser is IE
		var hide = (document.all[divID].style.visibility == "hidden") ? false : true;
		if (hide) {
			document.all[divID].style.visibility = "hidden";
		} else {
			document.all[divID].style.visibility = "visible";
		}
	} else { // Browser is NS 6
		var hide = (document.getElementById(divID).style.visibility == "hidden") ? false : true;
		if (hide) {
			document.getElementById(divID).style.visibility = "hidden";
		} else {
			document.getElementById(divID).style.visibility = "visible";
		}
	}
	if (hide) document.images[imgID].src = showGif;
	else document.images[imgID].src = hideGif;
	return void(0);
}

function changeTab(theName,theTab)
{
	eval("oldContentLayer = "+theName+"Tab + 'Content';");
	newContentLayer = theTab + "Content";
	eval("document.all["+theName+"Tab].className = 'page-tab-unselected';");
	document.all[theTab].className = "page-tab-selected";
	document.all[oldContentLayer].style.display = "none";
	document.all[newContentLayer].style.display = "";
	eval(theName+"Tab = theTab;");
}

function getPrintDate() {
	var printDate = "";
	var today = new Date();
	printDate += (today.getMonth()+1) + "-" + today.getDate() + "-" +
		today.getYear().toString().substring((today.getYear().toString().length-2),(today.getYear().toString().length));
	return printDate;

}

function getPrintTime() {
	var printTime = "";
	var today = new Date();
	if (today.getHours()>12) {
		printTime = today.getHours()-12 + ":"
	} else {
		printTime = today.getHours() + ":"
	}
	printTime += today.getMinutes();
	if (today.getHours()>=12) {
		printTime += "pm";
	} else {
		printTime += "am";
	}
	return printTime;
}

function getPrintUrl() {
	return window.location.href;
}


function changeTab(theName,theTab)
{
	eval("oldContentLayer = "+theName+"Tab + 'Content';");
	newContentLayer = theTab + "Content";
	eval("document.all["+theName+"Tab].className = 'page-tab-unselected';");
	document.all[theTab].className = "page-tab-selected";
	document.all[oldContentLayer].style.display = "none";
	document.all[newContentLayer].style.display = "";
	eval(theName+"Tab = theTab;");
}

