var is_ie = document.all ? true : false;

function ShowWindow(w, h, m)
{
	var wWidth = w;
	var wHeight = h;
	var sWidth,sHeight;
	sWidth= document.body.clientWidth; //screen.width;
	sHeight= eval(document.body.scrollHeight + 150);//screen.height;

    if(is_ie)
    {
	var bgFObj=document.createElement("iframe");
	bgFObj.setAttribute('id', 'bgFObj');
	bgFObj.style.position = 'absolute';
	bgFObj.style.left = bgFObj.style.top = '0px';
	bgFObj.style.width = sWidth + "px";
	bgFObj.style.height = sHeight + "px";
	bgFObj.style.backgroundColor = '#cccccc';
	//bgFObj.style.display = 'none';
	bgFObj.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=1,finishOpacity=1,style=3)';
	bgFObj.style.opacity = 0.1;
	bgFObj.style.zIndex = "10000";
	document.body.appendChild(bgFObj); 
	}
	var bgObj=document.createElement("div");
	bgObj.setAttribute('id','bgDiv');
	bgObj.style.position="absolute";
	bgObj.style.top="0";
	bgObj.style.backgroundColor="#cccccc";
	bgObj.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=3,opacity=25,finishOpacity=75)";
	bgObj.style.opacity="0.6";
	bgObj.style.left="0";
	bgObj.style.width=sWidth + "px";
	bgObj.style.height=sHeight + "px";
	bgObj.style.zIndex = "10000";
	document.body.appendChild(bgObj);

	var msgObj=document.createElement("div")
	msgObj.setAttribute("id","msgDiv");
	msgObj.setAttribute("align","center");
	msgObj.style.background="white";
	msgObj.style.border="1px solid gray";
	msgObj.style.position = "absolute";
	msgObj.style.width = wWidth + "px";
	msgObj.style.height = wHeight + "px";
	msgObj.style.textAlign = "center";
	msgObj.style.lineHeight ="25px";
	msgObj.style.zIndex = "10001";

	var title= document.createElement("div");
	title.innerHTML = document.getElementById("msgTitle").innerHTML;
	document.body.appendChild(msgObj);
	document.getElementById("msgDiv").appendChild(title);
	var txt = document.createElement("div");
	txt.innerHTML = document.getElementById(m).innerHTML;
	document.getElementById("msgDiv").appendChild(txt);

	msgObj.style.width = wWidth + "px";
	msgObj.style.height = wHeight + "px";
   
   var cw = document.documentElement.clientWidth;
   var ch = document.documentElement.clientHeight;

	if(wHeight < ch)
	{
		msgObj.style.top = eval((ch - wHeight) / 2) + document.documentElement.scrollTop + "px";
	}
	else
	{
		msgObj.style.top = eval(document.documentElement.scrollTop + 19) + "px";
	}
	if(wWidth < cw)
	{
		msgObj.style.left = eval((cw - wWidth) / 2) + "px";
	}
	else
	{
		msgObj.style.left = eval(document.body.clientWidth + 8) + "px";
	}
}
function CloseWindow()
{
	if(is_ie)
    {
		document.body.removeChild(document.getElementById("bgFObj"));
	}
	document.body.removeChild(document.getElementById("bgDiv"));
	document.body.removeChild(document.getElementById("msgDiv"));
}