function BrowserCheck() {
	var b = navigator.appName;
	if (b=="Netscape") this.b = "ns";
	else if (b=="Microsoft Internet Explorer") this.b = "ie";
	else this.b = b;
	this.v = parseInt(navigator.appVersion);
	this.ns = (this.b=="ns" && this.v>=4);
	this.ns4 = (this.b=="ns" && this.v==4);
	this.ns5 = (this.b=="ns" && this.v>=5);
	this.ie = (this.b=="ie" && this.v>=4);
	this.ie4 = (navigator.userAgent.indexOf('MSIE 4')>0);
	this.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0);
	this.ie6 = (navigator.userAgent.indexOf('MSIE 6')>0);
	if (this.ie5) this.v >= 5;
	if (this.ie6) this.v >= 6;
	this.min = (this.ns||this.ie);
}
is = new BrowserCheck();

function LayerObj(lyr,nestref) {
		if (is.ns4) {
			if (!nestref)
				this.obj = this.css = document.layers[lyr];
			else
				this.obj = this.css = eval("document." +nestref+ ".document." +lyr);
		}
		else if(is.ie && is.v < 6) {
			this.obj = document.all[lyr];
			this.css = this.obj.style;
		}
		else if(is.ie6 || is.ns5) {
			this.obj = document.getElementById(lyr);
			this.css = this.obj.style;
		}
		this.v = this.css.visibility = (is.ns4)? "hide" : "hidden";
		this.id = lyr;
		this.zdx = this.css.zIndex;
	
		this.show = ShowLayer;
		this.hide = HideLayer;
		this.togglev = ToggleLayerVisibility;
		this.moveto = MoveLayerTo;
		this.setzdx = SetLayerZIndex;
		}
	
	
	function ShowLayer() {
		this.v = this.css.visibility = "visible";
	}
	
	function HideLayer() {
		this.v = this.css.visibility = "hidden";
	}
	
	function ToggleLayerVisibility() {
		if (this.v == "hidden")
			this.show();
		else
			this.hide();
	}
	
	function MoveLayerTo(x,y) {
		if (x != null)
			this.x = this.css.left = x;
		if (y != null)
			this.y = this.css.top = y;
	}
	
	function SetLayerZIndex(value) {
		if (value != null)
			this.zdx = this.css.zIndex = value;
	}	
