function detectBrowser(){
	agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
	this.OP    = (agent.indexOf('opera')       !=   -1);
	this.NS = ((agent.indexOf('mozilla')   !=   -1) &&
		((agent.indexOf('spoofer')   ==   -1) &&
		(agent.indexOf('compatible') ==   -1)));
	this.KO = ((navigator.appName.indexOf('Konquerer')!=-1) ? true : false);
	this.NS4 = (document.layers ? true : false);
	this.NS6 = (this.NS && (this.major     >=    5));
	this.DOM = (document.getElementById ? true : false);
	//this.IE4 = ((document.all && !(document.getElementById ? true : false)) ? true : false);
	//this.IE5 = ((document.all) && (document.getElementById) ? true : false);

    this.IE    = ((!this.OP                           ) &&
                  (agent.indexOf("msie")       !=   -1));
    this.IE3   = (this.IE && (this.major       <     4));
    this.IE4   = (this.IE && (this.major       ==    4) &&
                 (agent.indexOf("msie 5.0")    ==   -1) &&
                 (agent.indexOf("msie 5.5")    ==   -1) &&
                 (agent.indexOf("msie 6.0")    ==   -1));
    this.IE5   = (this.IE && (this.major       ==    4) &&
                 (agent.indexOf("msie 5.0")    !=   -1));
    this.IE55  = (this.IE && (this.major       ==    4) &&
                 (agent.indexOf("msie 5.5")    !=   -1));
    this.IE6   = (this.IE && (this.major       ==    4) &&
                 (agent.indexOf("msie 6.0")    !=   -1));

	strOut = "is.DOM ? " + this.DOM + "\n";
	strOut += "is.IE4 ? " + this.IE4 + "\n";
	strOut += "is.NS4 ? " + this.NS4 + "\n";
	strOut += "is.NS6 ? " + this.NS6 + "\n";
	}
	
var is = new detectBrowser();

function showLayer(id){
	getObject(id).visibility = "visible";
}
function hideLayer(id){
	getObject(id).visibility = "hidden";
}
function getObject(id){
	if(is.DOM){
		layer_obj = document.getElementById(id).style;
	}
	if(is.IE4){
		layer_obj = document.all[id].style;
	}
	if(is.IE5){
		layer_obj = document.all[id].style;
	}
	if(is.Konquerer){
		layer_obj = document.all[id].style;
	}
	if(is.NS4){
		layer_obj = findNNObject(window,id);
	}
	return(layer_obj);
}
function findNNObject(node,id){
	var objFound;
	if(node.name == id){
		return(node);
	}
	for(var i = 0; i < node.document.layers.length; i++ ){
		if(objFound = findNNObject(node.document.layers[i],id)){
			return(objFound)
		}
	}
	return(false);
}
