<!--
//var ie = document.all ? true : false;
var ie = document.all ? true : false;
var ns = document.layers ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;

// Problem: After starting Netscape 4.x, the first
// call to the constructor fails, throwing an error.
// This is a fix that simply causes a reload of the
// page in case the test layer couldn't be accessed.
// To apply, make sure the page contains the line
// <div id="fixnetscape"style="position:absolute;visibility:hidden"></div>
// and call this function in your onLoad-handler.

function fixNetscape() {
	if (!LyrObj("fixnetscape")) document.location.reload();
}
//  Steiler Contructor
function LyrObj(lyrName) {
	
	function LyrObjGetRef(layerName){
		if (ns) return eval("document." + layerName);
		if (ie) return eval("document.all." + layerName);
		if (ns6) return document.getElementById(layerName);
	}
	
	function LyrObjGetPos(which) {
		if (ns) {
			return this.ref[which];
		}
		if (ie || ns6){
			return this.ref[which].split("px")[0];
		}
	}	
	
	function LyrObjSetPos(which, pos) {
		this.ref[which] = pos;
	}
	
	
	function LyrObjGetClip(which) {
		if (ns) { return this.ref.clip[which]; }
		
		if (ie || ns6){
			var myclip = this.ref.clip;
			myclip = myclip.replace(/,/g,"");
			var clipPos = myclip.split("rect(")[1].split(")")[0].split("px");
			switch (which) {
				case "top" : return Number(clipPos[0]);
				case "right" : return Number(clipPos[1]);
				case "bottom" : return Number(clipPos[2]);
				case "left" : return Number(clipPos[3]);
			}
		}
	}
	
	function LyrObjSetClip(top, right, bottom, left){
		if (ns){
			this.ref.clip.top = top;
			this.ref.clip.right = right;
			this.ref.clip.bottom = bottom;
			this.ref.clip.left = left;
		}
		if (ie || ns6)
			this.ref.clip = "rect(" + top +"px " + right +"px " + bottom +"px " + left +"px)";
	}
	
	function LyrObjGetVisibility() {
		if (this.ref.visibility == "visible" || this.ref.visibility == "show")
			return true;
		else
			return false;
	}
	
	function LyrObjSetVisibility(visible){
		if (ns)
			this.ref.visibility = visible ? "show" : "hide";
	
		if (ie || ns6)
			this.ref.visibility = visible ? "visible" : "hidden";
	}
	
	
	function LyrObjGetzIndex() {
		return this.ref.zIndex;
	}
	
	function LyrObjSetzIndex(zIndex){
		this.ref.zIndex = zIndex;
	}
	
	function LyrObjSetText(what){
		if (ie || ns6){
			this.ref = LyrObjGetRef(lyrName);
			this.ref.innerHTML = what;
			this.ref = LyrObjGetRef(lyrName).style;
		}
		if (ns){
			this.ref.document.open();
			this.ref.document.write(what);
			this.ref.document.close();
		}
	}
	
	function LyrObjGetHeight() {
		if (ie || ns6){
			this.ref = LyrObjGetRef(lyrName);
			var height = this.ref.offsetHeight;
			this.ref = LyrObjGetRef(lyrName).style;
			return height;
		}
		if (ns){
			return "";
		}
	}

	function LyrObjGetWidth() {
		if (ie || ns6){
			this.ref = LyrObjGetRef(lyrName);
			var width = this.ref.offsetWidth;
			return width;
			this.ref = LyrObjGetRef(lyrName).style;
		}
		if (ns){
			return "";
		}
	}


	this.ref = ns ? LyrObjGetRef(lyrName) : LyrObjGetRef(lyrName).style;
	
	this.getPos = LyrObjGetPos;
	this.setPos = LyrObjSetPos;
	
	this.getClip = LyrObjGetClip;
	this.setClip = LyrObjSetClip;
	
	this.getVisibility = LyrObjGetVisibility;
	this.setVisibility = LyrObjSetVisibility;
	
	this.getzIndex = LyrObjGetzIndex;
	this.setzIndex = LyrObjSetzIndex;

	this.setText = LyrObjSetText;

	this.getHeight = LyrObjGetHeight;
	this.getWidth = LyrObjGetWidth;

	return this;
}
//-->