TOOLKITBOX={ };

TOOLKITBOX.createPopup = function(html, target) {
	if (TOOLKITBOX.current) return;
	this.siteHolder = DOM.get('siteHolder');
	this.popup = DHTML.structure({ cn: 'tkRollOver',  s: [ { cn: 'tkClose', r: 'closeBox', e: { action: 'close' } }, { cn: 'tkHolder', r: 'holder' } ], c: TOOLKITBOX.PopupC } );
	var x = DHTML.pageX(target);
	var y = DHTML.pageY(target);
	
	this.siteHolder.appendChild(this.popup);
	this.popup.moveTo(x+220, y-75);
	
 	this.popup.holder.innerHTML = html;
	
	TOOLKITBOX.current = true;
}

TOOLKITBOX.PopupC = function() {
	this.inherit(DHTML.Base);
	this.inherit(OO.Listener);
}
TOOLKITBOX.PopupC.prototype = {
	initSelf: function() {
		EVENT.attachEvents(this, 'click', this.closeSelf);	
	},
		
	closeSelf: function(e) {
		if (e.target.action == 'close') {
			this.parentNode.removeChild(this);
			TOOLKITBOX.current = false;
			OO.dispose(this);
		}
	},
	
	disposeSelf: function() {

	}
}
TOOLKITBOX.close = function(){
	TOOLKITBOX.current = false;
	this.siteHolder.removeChild(this.popup);
}

