// Version 2 Beta

// Object Constructor
function ConstructObject (obj, parent) {
	if (parent=='htmlbody') {
		this.parent=null;
		this.ns4obj='document.'+obj;
	} else {
		this.parent=eval(parent+'Obj');
		this.ns4obj=this.parent.ns4obj+'.document.'+obj;
	}
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(this.ns4obj):0;
	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(this.ns4obj):0;
	this.childName=obj+'ContentObj';

// For Basic Properties ------------------------------------------------------------------------------------------------------
    this.scrollHeight=bw.ns4?this.css.document.height:this.el.offsetHeight;
    this.clipHeight=bw.ns4?this.css.clip.height:this.el.offsetHeight;
    this.scrollWidth=bw.ns4?this.css.document.width:this.el.offsetWidth;
    this.clipWidth=bw.ns4?this.css.clip.width:this.el.offsetWidth;

// For Basic Functions ------------------------------------------------------------------------------------------------------
	this.MoveObjH=MoveObjH;
	this.MoveObjV=MoveObjV;
	this.MoveObj=MoveObj;
	this.ShowObj=ShowObj;
	this.HideObj=HideObj;

// For Scroller Functions ------------------------------------------------------------------------------------------------------
	this.ScrollObj=ScrollObj;
	this.ScrollV=ScrollV;
	this.ScrollH=ScrollH;
	this.StartScroll=StartScroll;
	this.StopScroll=StopScroll;

	this.x; this.y; this.loop=false;
	this.obj = obj + "Object";
	eval(this.obj + "=this");
	return this;
}