﻿
function showInfo(msg, dtype)
{
	var pm = document.getElementById("popupMsg");
	pm.innerHTML = msg;
	var dp = document.getElementById("divPopup");
	var b = document.body;
	dp.style.display = "block";
	dp.style.width = Math.min(dtype == 2? 320 : 500, b.clientWidth - 10) + "px";
	dp.style.left = ((b.clientWidth - parseInt(dp.style.width)) / 2) + "px";
	dp.style.top = (b.scrollTop + (b.clientHeight - dp.clientHeight) / 2) + "px";
	
	document.getElementById("popupOk").focus();
}

function closePopup()
{
	var dp = document.getElementById("divPopup");
	dp.style.display = "none";
}

