function aObjectIE4(objectName){
	//THE self ATTRIBUTE IS THE RAW IE4 OBJECT, USUALLY
	newObject=new Object();
	if (typeof objectName == "string"){
		newObject.self=document.getElementById(objectName);
	}else{
		newObject.self=objectName;
	}//endif
	if (!newObject.self) error("aObjectIE4: "+objectName+" has not been found");

	//////////////////////////////////////////////////////////
	//INSTANCE METHODS////////////////////////////////////////
	//////////////////////////////////////////////////////////

	newObject.getArea=function(){
		//RETURN AN aArea OBJECT
		return aArea(this.getLeft(), this.getTop(), this.getWidth(), this.getHeight());
	}//getArea

	newObject.getLeft=function(){
		var left=this.self.offsetLeft;
		if (left==null) return error("aObjectIE4.getLeft: is not valid");
		left=parseInt(left);
		var curr=this.self;
		output="Start with "+left+"\n";
		for(;;){
			curr=curr.offsetParent;
			if (!curr) break;
			if (curr.bgProperties) break;	//IF body THEN EXIT NOW
			if (curr.offsetLeft) left+=parseInt(curr.offsetLeft);
			output+="Adding "+curr.offsetLeft+"\n";
		}//for
		//alert(output);
		return left;
	}//getLeft

	newObject.getTop=function(){
		var top=parseInt(this.self.offsetTop);
		if (top==null) return error("aObjectIE4.getTop: is not valid");
		var curr=this.self;
		for(;;){
			curr=curr.offsetParent;
			if (!curr) break;
			if (curr.offsetTop) top+=parseInt(curr.offsetTop);
		}//for
		return top;
	}//getTop

	newObject.getWidth=function(){
		var width=this.self.width;
		if (width) return parseInt(width);

		width=this.self.style.width;
		if (!width) return -1;
		if (right(width, 2)=="px") return parseInt(width);
		error("aObjectIE4.getWidth: "+width+" is not in pixel units (px)");
	}//getWidth

	newObject.setWidth=function(width){
		if (!width || width<0) width=0; //error("aObjectIE4.setWidth: width="+width+" is not a valid value");
		this.self.style.width=width+"px";
	}//setWidth

	newObject.getHeight=function(){
		var height=this.self.height;
		if (height) return parseInt(height);
		error("aObjectIE4.getHeight: is not valid");
	}//getHeight

	newObject.setBackgroundColor=function(color){
		this.self.style.backgroundColor=color;
	}//setBackgroundColor


	newObject.setVisible=function(isVisible){
		if (isVisible){
			this.self.style.visibility="visible";
		}else{
			this.self.style.visibility="hidden";
		}//endif
	}//showObject

	newObject.moveTo=function(x, y){
		this.self.style.left=x+"px";
		this.self.style.top=y+"px";
	}//moveTo

	newObject.moveBy=function(dx, dy){
		this.moveTo(this.getLeft()+dx, this.getTop()+dy);
	}//moveBy

	newObject.setZ=function(depth){
		this.oldZIndex=obj.style.zIndex;
		this.self.style.zIndex=depth;
	}//setZ

	newObject.resetZ=function(){
		if (this.oldZIndex) obj.style.zIndex=this.oldZIndex;
	}//setZ

	newObject.isDocument=function(){
		//RETURN TRUE ID THIS IS A DOCUMENT OBJECT
		if (this.self.defaultCharset) return true;
		return false;
	}//isDocument

	newObject.toString=function(){
		var output="DOM:\n";
		for(t=0;t<this.self.attributes.length;t++){
			a=this.self.attributes[t];
			output+=a.name+"="+a.value+";\t";
		}//for
		output+="\nProperties:\n";
		for (var i in this){
			output+=i+"\t";
		}//for
		return output;
	}//toString

	return newObject;
}//aObjectIE4

