function modal_dialog(title,html)
{
	this.title = title;
	this.html = html;
	this.width = "400px";
	this.height = "200px";
}

modal_dialog.prototype.show = function()
{
	oDiv = document.createElement("DIV");
	oDiv.id = "oPopup";
	oDiv.style.cssText = "width:" + this.width + "; height:" + this.height + "; position:absolute;";	
	
	var szHtml = "";
	
	szHtml += "<table style='width:100%; height:100%; border: none;' cellpadding='0' cellspacing='0'>";
	szHtml += "<tr><td style='height:28px;'>";
	szHtml += "<table style='width:100%; height:100%; border: none;' cellpadding='0' cellspacing='0'><tr>";
	szHtml += "<td style='width:5px; background: url(img/clb.gif);'>&nbsp;</td>";
	szHtml += "<td style='background: url(img/chb.gif); font-size: 10pt; font-family: Tahoma; font-weight: bold;'>" + this.title + "</td>";
	szHtml += "<td style='width:5px; background: url(img/crb.gif);'>&nbsp;</td>";
	szHtml += "</tr></table>";	
	szHtml += "</td></tr>";
	szHtml += "<tr><td align='center' valign='top' style='border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; background:white;'>";	
	szHtml += "<div id='oHTMLDiv' style='width:100%; height:100%; overflow:hidden;'>";
	szHtml += this.html;
	szHtml += "</div>";
	szHtml += "</td></tr>";
	szHtml += "<tr><td style='border-left: 1px solid #CCCCCC; border-right: 1px solid #CCCCCC; background:white;' align='center' valign='middle' style='height:30px;'>";
	szHtml += "<input type='button' onclick = 'document.body.removeChild(oPopup); ondialogok();' value='Ok' style='width:70px; height:20px;font-size: 8pt; font-family: Tahoma;'>";
	szHtml += "<input type='button' onclick = 'document.body.removeChild(oPopup)' value='Cancel' style='width:70px; height:20px;font-size: 8pt; font-family: Tahoma;'>";
	szHtml += "</td></tr>";
	szHtml += "<tr><td style='height:5px; font-size: 1px;'>";
	szHtml += "<table style='width:100%; height:5px; font-size: 1px; border: none;' cellpadding='0' cellspacing='0'><tr>";
	szHtml += "<td style='width:5px; background: url(img/cflF5.gif);'>&nbsp;</td>";
	szHtml += "<td style='border-bottom: 1px solid #CCCCCC;background: white;'>&nbsp;</td>";
	szHtml += "<td style='width:5px; background: url(img/cfrF5.gif);'>&nbsp;</td>";
	szHtml += "</tr></table>";
	szHtml += "</td></tr>";
	szHtml += "</table>";
	oDiv.innerHTML = szHtml;
	oDiv.style.top = document.body.scrollHeight/2-Number(this.height.replace("px",""))/2;
	oDiv.style.left =  document.body.scrollWidth/2-Number(this.width.replace("px",""))/2;
	this.div = oDiv;
	document.body.appendChild(this.div);
}

