function getScreenInfo()
{
var top = document.documentElement.scrollTop;
var left = document.documentElement.scrollLeft;
var height = document.documentElement.clientHeight;
var width = document.body.clientWidth;
return {top:top,left:left,height:height,width:width};
}
function showDiv(id,wid,hei)
{
var height = parseInt(hei,10);
var width = parseInt(wid,10);
var screenInfo = getScreenInfo();
var obj = document.getElementById(id);
var leftAdd = (screenInfo.width)/2;
var topAdd = (screenInfo.height-height);
var leftOffset = +400;
var topOffset = -10;
obj.style.display = "block";
obj.style.position = "absolute";
obj.style.width = width + "px";
obj.style.height = height + "px";
obj.style.top = (screenInfo.top + topAdd + topOffset) + "px";
obj.style.left = (screenInfo.left + leftAdd + leftOffset) + "px";
window.onscroll = function()
{
   var screenInfo = getScreenInfo();
   obj.style.top = (screenInfo.top + topAdd + topOffset) + "px";
   obj.style.left = (screenInfo.left + leftAdd + leftOffset) + "px";
};
}
