// move.js - Make dynamic layers movable

// startup flag
var gMod_Move = true;

// prerequisites
var gMod_Layer;
if (!gMod_Layer){alert("You must load layer.js before move.js");}

/////////////////////////////////////////////////////////////////////////////////////////////

function DynLayerMoveTo(x,y) {
	if (x!=null) {
		this.x = x
		if (is.ns) this.css.left = this.x
		else this.css.pixelLeft = this.x
	}
	if (y!=null) {
		this.y = y
		if (is.ns) this.css.top = this.y
		else this.css.pixelTop = this.y
	}
}
function DynLayerMoveBy(x,y) {
	this.moveTo(this.x+x,this.y+y)
}
function DynLayerShow() {
	this.css.visibility = (is.ns4)? "show" : "visible";
}
function DynLayerHide() {
	this.css.visibility = (is.ns4)? "hide" : "hidden";
}
DynLayer.prototype.moveTo = DynLayerMoveTo
DynLayer.prototype.moveBy = DynLayerMoveBy
DynLayer.prototype.show = DynLayerShow
DynLayer.prototype.hide = DynLayerHide

/////////////////////////////////////////////////////////////////////////////////////////////

