// the infamous Danny Goodman stuff, adapted by Greg Pitter

var isNav, isIE, isNav6;
var styleObj = "";
var marksOn = false;
// will need a third case for isNav6... but why worry about that now?
if (parseInt(navigator.appVersion) >= 4) {
  if (navigator.appName == "Netscape") {
	if (parseInt(navigator.appVersion) >= 5) {
		isNav6 = true;
	} else {
		isNav = true;
	}
  } else {
    isIE = true;
    styleObj = ".style";
  }
}

function coll(masterspan) {
  var theColl = "";
  if (isNav) {
    if (masterspan != "") theColl = masterspan + ".document.";
    else theColl="";
  }
  else theColl = "all.";
  return theColl;
}

function getObject(obj, masterspan) {
  if (obj == "") {
    alert("obj empty in getObject!");
    return false;
  }

// The CSS1 DOM takes care of all this for us if we're in nav 6
  if (isNav6) return document.getElementById(obj).style;

  var theObj;
  var theColl = coll(masterspan);
  if (typeof obj == "string") {
    theObj = eval("document."+theColl+obj+styleObj);
  } else {
    theObj = obj;
  }
  return theObj;
}

// this is a slightly changed getObject for objects in other frames
function frameObject(obj, masterspan, frameName) {
  if (obj == "") {
    alert("obj empty in getObject!");
    return false;
  }
// The CSS1 DOM takes care of all this for us if we're in nav 6
  if (isNav6) {
	theObj = eval(frameName + ".document.getElementById(obj).style");
	return theObj;
	}

  var theObj;
  var theColl = coll(masterspan);
  if (typeof obj == "string") {
    theObj = eval(frameName+".document."+theColl+obj+styleObj);
  } else {
    theObj = obj;
  }
  return theObj;
}

function show(spanName,masterspan) {
  var spanObj = getObject(spanName,masterspan);
  spanObj.visibility = "visible";
}

function frameShow(spanName,masterspan,framename) {
  var spanObj = frameObject(spanName,masterspan,framename);
  spanObj.visibility = "visible";
}

function hide(spanName,masterspan) {
  var spanObj = getObject(spanName,masterspan);
  spanObj.visibility = "hidden";
}

function frameHide(spanName,masterspan,framename) {
  var spanObj = frameObject(spanName,masterspan,framename);
  spanObj.visibility = "hidden";
}

function setZIndex(spanName, masterspan, z) {
  var spanObj = getObject(spanName,masterspan);
  spanObj.zIndex = z;
}

function frameSetZIndex(spanName,masterspan, framename, z) {
  var spanObj = frameObject(spanName,masterspan,framename);
  spanObj.zIndex = z;
  }
  
