var popUpIframe;

function PopUpIframe(url/*, width, height*/)
{
	this.popBgDiv = document.createElement('div');
	this.popBgDiv.className = 'popUpBgDiv';
	
	
	this.popDiv = document.createElement('div');
	/*this.popDiv.style.width = width;
	this.popDiv.style.height = height;*/
	this.popDiv.id = 'popUpIframe';
	this.popIframe = document.createElement('iframe');
	//popIframe.onload = function(){alert('loaded');}
	this.popIframe.setAttribute("src", url);
	this.popIframe.style.width = "100%";
	this.popIframe.style.height = "100%";
	this.popDiv.appendChild(this.popIframe);
	document.body.appendChild(this.popBgDiv);
	document.body.appendChild(this.popDiv);
}

PopUpIframe.prototype.ondone;

PopUpIframe.prototype.onload = function()
{
	alert('loaded');
}

PopUpIframe.prototype.done = function(resultObj)
{
	if (this.ondone)
		this.ondone(unescape(resultObj));
	this.close();
}

PopUpIframe.prototype.close = function()
{
	this.popDiv.removeChild(this.popIframe);
	document.body.removeChild(this.popDiv);
	document.body.removeChild(this.popBgDiv);
	this.popIframe = undefined;
	this.popDiv = undefined;
	//this = undefined;
}
