function htmlbuffer(obj){
	this.parent = obj;
	this.element = document.createElement('IFRAME');
	this.element.className = 'buffer';
	this.element.parent = this;
	document.body.appendChild(this.element);
	this.element.contentWindow.name = this.element.id = 'bff' + new Date().getTime();

	this.setSrc = function(src){
		this.element.src = src;
	}

	this.element.onDone = function(result){
		this.parent.parent.onDone(result);
		this.parentNode.removeChild(this);
		this.parent = null;
	}
}
