<!--
/*
This code is from Dynamic Web Coding 
at http://www.dyn-web.com/
Copyright 2002 by Sharon Paine 
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code 
as long as this entire notice is included.
*/

// resize fix for ns4
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 zTop=1000, docLoaded, curObjId, curObj, newObj;
function doWipeTrans(id,wp) {
	// check if ready or if same link clicked again
	if (!docLoaded || id == curObjId) return;	
	if (newObj && newObj.wiping) return;	// if previous still wiping
	newObj = new dynObj(id);	
	if (!newObj) return;
	newObj.css.zIndex=zTop; // put on top
	if (curObj) curObj.css.zIndex=zTop-1;	// put current just below it
	curObjId=id;	// save id for checking 
	// set a default wipe here
	if (!wp) wp="in corner";
	// wipe args: which wipe, delay, duration, what next
	newObj.wipe(wp,100,300,"finishTrans()");
}

function finishTrans() {
	if (curObj) curObj.css.zIndex=zTop-2; // move down in stack
	curObj=newObj;	// hold ref
}
//-->

/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2001-3 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// onresize for ns4
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 cur_lyr = 'homeDHTML';	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_lyr) hideLayer(cur_lyr);
  showLayer(id);
  cur_lyr = id;
}

function showLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "visible";
}

function hideLayer(id) {
  var lyr = getElemRefs(id);
  if (lyr && lyr.css) lyr.css.visibility = "hidden";
}

function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}
