<!--
/*
This code is from Dynamic Web Coding 
www.dyn-web.com 
Permission granted to use this code as long as this 
entire notice is included.
*/

var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

var doc_loaded = false;	// set true onload
window.onload = function () {
	doc_loaded = true;	// ready for layers to be shown
// If you want a layer to be visible when the document is loaded, 
// put its id below.	
	loadLyr('lyr1') ;
// other onload function calls can go here
	
}

var cur_lyr;
function loadLyr(lyr) {
	if (!doc_loaded) return;
	if (cur_lyr) hide_lyr(cur_lyr);
  cur_lyr = lyr;
	show_lyr(cur_lyr);
}

function show_lyr(lyr) {
	var theLyr = (document.layers)? getLyrRef(lyr,document) : (document.all)? document.all[lyr].style : (document.getElementById)? document.getElementById(lyr).style: null;
	if (!theLyr) return;
	theLyr.zIndex=100;
	theLyr.visibility = "visible";
}

function hide_lyr(lyr) {
	var theLyr = (document.layers)? getLyrRef(lyr,document) : (document.all)? document.all[lyr].style : (document.getElementById)? document.getElementById(lyr).style: null;
	if (!theLyr) return;
	theLyr.zIndex=1;
	theLyr.visibility = "hidden";	
}

// get reference to nested layer for ns4
// from old dhtmllib.js by Mike Hall of www.brainjar.com
function getLyrRef(lyr,doc) {
	if (document.layers) {
		var theLyr;
		for (var i=0; i<doc.layers.length; i++) {
	  	theLyr = doc.layers[i];
			if (theLyr.name == lyr) return theLyr;
			else if (theLyr.document.layers.length > 0) 
	    	if ((theLyr = getLyrRef(lyr,theLyr.document)) != null)
					return theLyr;
	  }
		return null;
  }
}
//-->
