
//	Object: DynObj
function DynObj (obj, text, visibility, x, y, height) {
	this.css		= B.dom?document.getElementById(obj).style:B.ie4?document.all[obj].style:B.ns4?document.layers[obj]:0;	
	this.writeref	= B.dom?document.getElementById(obj):B.ie4?document.all[obj]:B.ns4?document.layers[obj].document:0;	
	this.imageref	= B.dom?self:B.ie4?document.all[obj]:B.ns4?this.css:0;
	this.evnt		= B.dom?document.getElementById(obj):B.ie4?document.all[obj]:B.ns4?this.css:0;
	
	this.showRef	= B.dom?'visible':B.ie4?'visible':B.ns4?'show':'';
	this.hideRef	= B.dom?'hidden':B.ie4?'hidden':B.ns4?'hide':'';
	
	this.visibility	= d_visibility;
	this.show		= d_show;
	this.hide		= d_hide;
	this.move		= d_move;
	this.content	= d_content;
	this.clip		= d_clip;
	this.setimage	= d_setimage;
	
	this.text		= text;
	this.x			= x;
	this.y			= y;
	this.height		= height;
	
	this.obj		= obj + "Object";
	eval(this.obj + "=this");
	return this;
}

//	Obj-Functions
function d_visibility() {
	return B.dyn?this.css.visibility==this.showRef:0;
}

function d_show() {
	return B.dyn?this.css.visibility=this.showRef:0;
}

function d_hide() {
	return B.dyn?this.css.visibility=this.hideRef:0;
}

function d_move(x,y) {
	add				= B.ns4?"":"px";
	this.x			= x;
	this.y			= y;
	this.css.left	= this.x + add;
	this.css.top	= this.y + add;
}

function d_content(text) {
	this.text	= text;
	if (B.ns4) {
		this.writeref.open("text/html");
		this.writeref.write(this.text);
		this.writeref.close();
//	} else if (B.dom) {
//		this.writeref.replaceChild(document.createTextNode(this.text),this.writeref.childNodes[0]);
	} else if (B.ie4 || B.dom) {
		this.writeref.innerHTML = this.text;
	}
}

function d_clip(t,r,b,l) {
	if (B.ns4) {
		this.css.clip.top		= t;
		this.css.clip.right		= r;
		this.css.clip.bottom	= b;
		this.css.clip.left		= l;
	} else {
		this.css.clip			= "rect("+t+","+r+","+b+","+l+")";
	}
}

function d_setimage(name,source) {
	this.imageref.document.images[name].src = eval (source + ".src");
}

