
function dynLayer(id,nestref,drag) {
n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
                if (n) {
                        if (nestref) {
                                this.css = eval("document." + nestref + ".document." + id)
                                this.ref = eval("document." + nestref + ".document." + id + ".document")
                        }
                        else {
                                this.css = document.layers[id]
                                this.ref = document.layers[id].document
                        }
                        this.x = this.css.left
                        this.y = this.css.top
                        this.w = this.css.clip.width
                        this.h = this.css.clip.height
                }
                else if (ie) {
                        this.css = document.all[id].style
                        this.ref = document
                        this.x = this.css.pixelLeft
                        this.y = this.css.pixelTop
                        this.w = this.css.pixelWidth
                        this.h = this.css.pixelHeight
                }
                this.obj = id + "Object"
                eval(this.obj + "=this")
                this.moveBy = dynLayerMoveBy
                this.moveTo = dynLayerMoveTo
                this.show = dynLayerShow
                this.hide = dynLayerHide
                if (drag) {
                        dragArray[dragArray.length] = this
                        dragLayerZ++
                }
        }
  
/*function dynLayer(id,nestref) {
	if (n) {
		if (nestref) {
			this.css = eval("document." + nestref + ".document." + id)
			this.ref = eval("document." + nestref + ".document." + id + ".document")
		}
		else {
			this.css = document.layers[id]
			this.ref = document.layers[id].document
		}
		this.x = this.css.left
		this.y = this.css.top
	}
	else if (ie) {
		this.css = document.all[id].style
		this.ref = document
		this.x = this.css.pixelLeft
		this.y = this.css.pixelTop
	}
	this.obj = id + "Object"
	eval(this.obj + "=this")
	this.moveBy = dynLayerMoveBy
	this.moveTo = dynLayerMoveTo
	this.show = dynLayerShow
	this.hide = dynLayerHide
}*/


function dynLayerMoveBy(x,y) {
	this.x += x
	this.css.left = this.x
	this.y += y
	this.css.top = this.y
}
function dynLayerMoveTo(x,y) {
	this.x = x
	this.css.left = this.x
	this.y = y
	this.css.top = this.y
}
function dynLayerShow() {
	if (n) this.css.visibility = "show"
	else if (ie) this.css.visibility = "visible"
}
function dynLayerHide() {
	if (n) this.css.visibility = "hide"
	else if (ie) this.css.visibility = "hidden"
}