/*
This code is from Dynamic Web Coding
www.dyn-web.com
*/
dom = (document.getElementById) ? true : false;
ns5 = ((navigator.userAgent.indexOf("Gecko")>-1) && dom) ? true: false;
ie5 = ((navigator.userAgent.indexOf("MSIE")>-1) && dom) ? true : false;
ns4 = (document.layers && !dom) ? true : false;
ie4 = (document.all && !dom) ? true : false;
nodyn = (!ns5 && !ns4 && !ie4 && !ie5) ? true : false;

// resize fix from http://www.webreference.com/dhtml/diner/resize/
var origWidth, origHeight;
if (ns4) {
	origWidth = window.innerWidth;
  origHeight = window.innerHeight;
 }
 
function reDo() {
 if (window.innerWidth != origWidth || window.innerHeight != origHeight) 
    window.location.reload();
}
if (ns4) window.onresize = reDo; 

var curPg = '';		// put id of first layer here
function showLyr(pg) {
	var oldPg = curPg;
	if (oldPg){hide(oldPg)}
	curPg = pg;
	show(pg);
}

function show(lyr) {
	var theLyr = (ns4)? document.layers[lyr] : (ie4)? document.all[lyr].style : (ie5||ns5)? document.getElementById(lyr).style: null;
	if (!theLyr) return;
	theLyr.visibility = "visible";
}

function hide(lyr) {
	var theLyr = (ns4)? document.layers[lyr] : (ie4)? document.all[lyr].style : (ie5||ns5)? document.getElementById(lyr).style: null;
	if (!theLyr) return true;
	theLyr.visibility = "hidden";	
}

function GetLayer(lyr){
	var theLyr = (ns4)? document.layers[lyr] : (ie4)? document.all[lyr] : (ie5||ns5)? document.getElementById(lyr): null;
	return theLyr;
}
 
