
function ColumnGroup (target) {
	
	this.target = (typeof target == "object") ? target : document.getElementById(target);
	if (this.target == undefined) return;
	
	var container = document.createElement("div");
	container.id = "resize";
	
	container.style.width = "1em";
	container.style.height = "0px";
	container.style.overflow = "hidden";
	container.style.display = "block";
	
	document.body.appendChild(container);
	
	this.start();
	
}

Class(ColumnGroup);

ColumnGroup.prototype.target = new Object();
ColumnGroup.prototype.sprite = new Object();

ColumnGroup.prototype.update = function () {
	this.target.style.height = "";
	this.target.style.height = this.target.clientHeight + "px";
}

ColumnGroup.prototype.stop = function () {
	this.sprite.stopResizeTimer();
}

ColumnGroup.prototype.start = function () {
	
	var classPointer = this;
	
	this.sprite = new Sprite(document.body);
	this.sprite.startResizeTimer();
	
	var resizeListener = new Object();
	resizeListener.onResized = function () {
		classPointer.update();
	}
	
	this.sprite.addListener(resizeListener);
	
}
