function DHTMLLayer(divName, parentLayer) {
	if (is_nav4) {
		if (parentLayer) {
			this.objRef = this.objStyleRef = (parentLayer.objRef).eval('document.' + divName);
			this.objContentRef = (parentLayer.objRef).eval('document.' + divName + '.document');
			this.objStringRef = parentLayer.objStringRef + '.document.' + divName;
		} else {
			this.objRef = this.objStyleRef = eval('document.' + divName);
			this.objContentRef = eval('document.' + divName + '.document');
			this.objStringRef = 'document.' + divName;
		}
		this.x = this.objRef.left;
		this.y = this.objRef.top;
		this.width = this.objRef.clip.width;
		this.height = this.objRef.clip.height;
		this.bgColor = this.objRef.bgColor;
		this.vis = this.objRef.visibility;
		
	} else if (is_ie4up) {
		this.objRef = this.objContentRef = document.all[divName];
		this.objStyleRef = document.all[divName].style;
		
		this.objStringRef = 'document.all.' + divName;
		
		this.x = this.objRef.pixelLeft;
		this.y = this.objRef.pixelTop;
		this.width = this.objStyleRef.posWidth;
		this.height = this.objStyleRef.posHeight;
		this.bgColor = this.objRef.backgroundColor;
		
	} else if (is_nav5up) {
		this.objRef = this.objContentRef = document.getElementById(divName);
		this.objStyleRef = this.objRef.style;
		this.objStringRef = 'document.' + divName;
		
		this.x = parseInt(this.objStyleRef.left);
		this.y = parseInt(this.objStyleRef.top);
		this.width = parseInt(this.objStyleRef.width);
		this.height = parseInt(this.objStyleRef.height);
		this.bgColor = this.objStyleRef.backgroundColor;
		this.vis = this.objStyleRef.visibility;
		this.zIndex = this.objStyleRef.zIndex;
	}
	
	this.parent = parentLayer || null;
	this.divName = divName;
	
	this.zIndex = this.objRef.zIndex;
	this.vis = this.objRef.visibility;
	this.stringName = divName;
	this.childArray = new Array();
	
	this.addChild = DHTMLAddChild;
	
	var parentObj = this.parent;
	while (parentObj) {
		for (var i=0; i<parentObj.childArray.length; i++) {
			parentObj.addChild(this);
		}
		parentObj = parentObj.parent;
	}
	
}

function DHTMLAddChild(child) {
	if (!this.childArray) { this.childArray = new Array(); }
	this.childArray[this.childArray.length] = child;
}

function moveTo(layerObj,x,y) {
	if (is_nav4) {
		layerObj.objStyleRef.left = layerObj.x = x;
		layerObj.objStyleRef.top = layerObj.y = y;
	} else if (is_ie4up) {
		layerObj.x = x; layerObj.objStyleRef.pixelLeft = x;
		layerObj.y = y; layerObj.objStyleRef.pixelTop = y;
	}
}

function moveBy(layerObj,offX,offY) {
	if (is_nav4) {
		layerObj.objStyleRef.left = layerObj.x += offX;
		layerObj.objStyleRef.top = layerObj.y += offY;
	} else if (is_ie4up) {
		layerObj.x += offX; layerObj.objStyleRef.pixelLeft += offX;
		layerObj.y += offY; layerObj.objStyleRef.pixelTop += offY;
	} else if (is_nav5up) {
		layerObj.objStyleRef.left = (layerObj.x + offX)+"px";
		layerObj.x += offX;
		layerObj.objStyleRef.top = (layerObj.y + offY)+"px";
		layerObj.y += offY;
	}
}

function show(layer,autoInherit) {
	if (arguments.length == 2) {
		autoFillInherit(layer.children);
	}
	layer.objStyleRef.visibility = "visible";
}

function hide(layer,autoInherit) {
	if (arguments.length == 2) {
		autoFillInherit(layer.children);
	}
	layer.objStyleRef.visibility = "hidden";
}

function inherit(layer) {
	layer.objStyleRef.visibility = "inherit";
}

function autoFillInherit(layer) {
	for (var i=0; i<layer.children.length; i++) {
		inherit(layer.children[i]);
	}
}

function getWidth(layer) {
	if (is_nav4) {
		return layer.objStyleRef.clip.width;
	} else if (is_ie4up) {
		return layer.objStyleRef.width;
	}
}

function getX(layer) {
	if (is_nav4up) {
		return parseInt(layer.objStyleRef.left);
	} else if (is_ie4up) {
		return parseInt(layer.objStyleRef.pixelLeft);
	}
}


function getY(layer) {
	if (is_nav4up) {
		return layer.objStyleRef.top;
	} else if (is_ie4up) {
		return layer.objStyleRef.pixelTop;
	}
}