AsciiUI = function (elem,initObj) {
	this.elem = elem;
	this.elem.style.cursor = 'default';
	this.elem.objRef = this;
	for (var i in initObj) {
		this[i]=initObj[i];
	}
	if (this.widgetName) {
		this.className = 'AsciiUI_'+this.widgetName;
		this.objId = AsciiUI.objects.length;
		AsciiUI.objects.push (this);
	} else {
		this.className = 'AsciiUI';
	}
}

_AsciiUI = function () {}
_AsciiUI.prototype = AsciiUI.prototype;
_AsciiUI.prototype.AsciiUI = AsciiUI;
//AsciiUI.prototype = new _Broadcaster;

AsciiUI.prototype.toString = function () {
	return '[object ' + this.className + ']';
}

AsciiUI.startDrag = function (e,objId) {
	e = e?e:event;
	AsciiUI.dragObj = AsciiUI.objects[objId];
	AsciiUI.dragObj.startDrag(e);
	document.onmouseup = function () {
		AsciiUI.stopDrag();
	}
}

AsciiUI.stopDrag = function () {
	AsciiUI.dragObj.stopDrag();
	document.onmouseup = null;
}


AsciiUI.objects = new Array();
