﻿var whichDom = "", styleObj = ""
var isNav4, isNav6, isIE
var isBrand = navigator.appName
var agt = navigator.userAgent.toLowerCase()
var navVer = parseInt(navigator.appVersion)

//these variables are handy for determining which styles to load
isNav4 = (isBrand == "Netscape" && navVer < 5) ? true : false
isNav6 = (isBrand == "Netscape" && navVer >= 5) ? true : false
isIE = ((agt.indexOf("msie") != - 1) && (parseInt(navVer) >= 4)) ? true : false

//construct object reference
if(isNav6)  {
  whichDom = '.getElementById("'
  styleObj = '").style'
} else if (isNav4)  {
  whichDom = '["'
  styleObj = '"]'
} else {
  whichDom = ".all."
  styleObj = ".style"
}

//API object reference
function theObject(obj) {
var theObj
	if (typeof obj == "string")
		theObj = eval("document" + whichDom + obj + styleObj)
	else
		theObj = obj
		return theObj
}

function show(obj) {
var theObj = theObject(obj)
	theObj.visibility = "visible";
	theObj.display = "block";
	
}

function hide(obj) {
var theObj = theObject(obj)
	theObj.visibility = "hidden"
	theObj.display = "none";
}

