function xlib_ModalDialog(outerContainerId,innerContainerId,iframeId)
{
	this.outerContainerId = outerContainerId;
	this.innerContainerId = innerContainerId;
	this.iframeId = iframeId;
	
	this.show = function (url,cx,cy,opener)
	{
		var obj;
		var cyy;

		if (cx == null) cx = 600;
		if (cy == null) cy = 400;
		
		document.getElementById(this.iframeId).src = url;

		obj = document.getElementById(this.innerContainerId);
		obj.style.width = cx;
		obj.style.height = cy;
		
		obj = document.getElementById(this.outerContainerId);

		if (typeof window.innerWidth != 'undefined')
		      cyy = window.innerHeight;
		else if (typeof document.documentElement != 'undefined')
			cyy =  document.getElementsByTagName('body')[0].clientHeight;
		else
			cyy = 900;
		
		obj.style.height = cyy;

		document.getElementById(this.iframeId).style.height = cy - 20;
		
		obj.style.display = "block";

	}
	
	this.cancel = function()
	{
		document.getElementById(this.outerContainerId).style.display = "none";
		document.getElementById(this.iframeId).src = "";
	}
	
	this.renderModalContainer = function()
	{
		var html;
		
		html = "";
		html += "<div id='_MODAL_OUTER' class='clsModalOuter' style='display:none;'>";
			html += "<div class='clsModalScrim'>&nbsp;</div>";
			html += "<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0' class='clsModalWindow'>";
			html += "<tr><td align='center' valign='middle'>";
				html += "<table id='_MODAL_INNER' width='650px' height='600px' border='0' cellspacing='0' cellpadding='0'>";
				html += "<tr>";
					html += "<td nowrap class='clsModalWinBorderTL'>&nbsp;</td>";
					html += "<td class='clsModalWinBorderTF'>&nbsp;</td>";
					html += "<td nowrap onclick='ModalDialog.cancel()' class='clsModalWinBorderTR'>&nbsp;</td>";
				html += "</tr>";
				html += "<tr height='100%'>";
					html += "<td nowrap class='clsModalWinBorderLF'>&nbsp;</td>";
					html += "<td width='100%' style='background-color:white;'>";
						html += "<iframe id='_MODAL_IF' src='' frameborder='0' style='width:100%;height:100%;'></iframe>";
					html += "</td>";
					html += "<td nowrap class='clsModalWinBorderRF'>&nbsp;</td>";
				html += "</tr>";
				html += "<tr>";
					html += "<td nowrap class='clsModalWinBorderBL'>&nbsp;</td>";
					html += "<td class='clsModalWinBorderBF'>&nbsp;</td>";
					html += "<td nowrap onclick='ModalDialog.cancel()' class='clsModalWinBorderBR'>&nbsp;</td>";
				html += "</tr>";
				html += "</table>";
			html += "</td></tr></table>";
		html += "</div>";

		
		document.writeln(html);
	}
}

