<!--// damn the romulans and their cloaking technology //

// object oriented api by: morpheo@anti.nu 

//init & exit - global
	function objInit() {
//		brw = new chkBrw()
	}

	function objExit() {
	}


//	object class
function objCreate(id) {
	if (brw.w3c) {
		this.style = document.getElementById(id).style;
		this.obj = document.getElementById(id);
	}
	else if (brw.ns4) {
		this.obj = this.style = getNs4Obj(doc, id);
//		this.obj = this.style = document.layers[id];
	}
	else {
		this.style = document.all[id].style;
		this.obj = document.all[id];
	}
	this.x = objX;
	this.y = objY;
	this.z = objZ;
	this.width = objWidth;
	this.height = objHeight;
	this.moveBy = objMoveBy;
	this.moveTo = objMoveTo;
	this.clipTo = objClip;
	this.vis = objVis;
	this.txtIn = objWrite;
	this.src = objSrc;
}

function getNs4Obj(doc, id) {
	var x = obj.layers;
	var retval;
	for (var i=0;i<x.length;i++) {
		if (x[i].id == id) retval = x[i];
		else if (x[i].layers.length) var tmp = getNs4Obj(x[i], id);
		if (tmp) retval = tmp;
	}
	return retval;
}

function objX(X) {
	if (brw.w3c) { this.style.left = this.X = X; }
	else if (brw.ns4) { this.style.left = this.X = X; }
	else { this.style.pixelLeft = this.X = X; }
}

function objY(Y) {
	if (brw.w3c) { this.style.top = this.Y = Y; }
	else if (brw.ns4) { this.style.top = this.Y = Y; }
	else { this.style.pixelTop = this.Y = Y; }
}

function objZ(Z) {
	this.style.zIndex = this.Z = Z;
}

function objWidth(W) {
	this.style.width = this.W = W;
}

function objHeight(H) {
	this.style.height = this.H = H;
}

function objMoveBy(X,Y) {
	this.style.left = this.X += X;
	this.style.top = this.Y += Y;
}

function objMoveTo(X,Y) {
	this.style.left = this.X = X;
	this.style.top = this.Y = Y;
}

function objClip(TOP, RGT, BTM, LFT) {
	this.TOP = TOP;
	this.RGT = RGT;
	this.BTM = BTM;
	this.LFT = LFT;
	if (brw.ns4) {
		this.style.clip.top = this.TOP +"px";
		this.style.clip.right = this.RGT +"px";
		this.style.clip.bottom = this.BTM +"px";
		this.style.clip.left = this.LFT +"px";
	 }
	if (brw.w3c) { this.style.clip = "rect("+this.TOP+"px "+this.RGT+"px "+this.BTM+"px "+this.LFT+"px )"; }
	if (brw.ie) { this.style.clip = "rect("+this.TOP+"px "+this.RGT+"px "+this.BTM+"px "+this.LFT+"px )"; }
}

function objVis(VIS) {
	this.style.visibility = this.VIS = VIS;
}

function objWrite(TXT) {
	this.txt = TXT;
	if (brw.w3c) { this.obj.innerHTML = this.txt; }
	else if (brw.ns4) { this.obj.document.open(); this.obj.document.write(this.txt); this.obj.document.close(); }
	else { this.obj.innerHTML = this.txt; }
}

function objSrc(SRC) {
	this.obj.src = this.SRC = SRC;
}
//	end of object class

function imgCreate(obj, id, src) {
	if (w3c) {
		eval(obj+' = document.createElement("IMG")');
		eval(obj+'.setAttribute("id",'+id+')');
		eval(obj+'.setAttribute("src",'+src+')');
	}
}

function imgPreload(img,src) {
	if (document.images) {
		eval(img+' = new Image()')
		eval(img+'.src = "'+src+'"')
	}
}

function imgChange(layer,imgName,imgObj) {
	if (brw.ns4 && layer!=null) eval('document.'+layer+'.document.images["'+imgName+'"].src = '+imgObj+'.src');
	else document.images[imgName].src = eval(imgObj+".src");
}


// Mr. Zulu, fire phasers at will //-->
