<!--
var ie = document.all ? true : false;
var ns = document.layers ? true : false;
//var ns6 = (document.getElementById && (!document.all)) ? true : false;
var ns6 = (document.getElementById) ? 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 clipPos = this.ref.clip.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(left, top, right, bottom){
		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() {
		return this.ref.visibility;
	}
	
	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;
		}
		if (ns){
			this.ref.document.open();
			this.ref.document.write(what);
			this.ref.document.close();
		}
	}


//	this.ref = ns ? LyrObjGetRef(lyrName) : LyrObjGetRef(lyrName);
//	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;

	return this;
}
//-->
