function divclose(name){
        var divObj;
        divObj= document.getElementById(name);
        divObj.style.display = "none";
        }

function openDiv(xPosition,evt,heading,data,closeIcon,image)
{
	var divOpenID = "divOpenID";
     evt = (evt) ? evt : ((window.event) ? window.event : "")
    if (evt) {
        var elem = (evt.target) ? evt.target : evt.srcElement
        //var x = evt.clientX - xPosition;
        //var y = evt.clientY + document.body.scrollTop+10;
		var x = (document.body.clientWidth - 540)/2;
		//var y = (document.body.clientHeight - 451)/2;
		//alert(document.body.clientHeight);
        var divObj = document.getElementById(divOpenID);
        divObj.style.display = "block";
        divObj.style.position = "absolute";

		//var winl = (screen.width - w) / 2;
		//var wint = (screen.height - h) / 2;

		//divObj.style.left = "50px";
		//divObj.style.top = "50px";
        divObj.style.left = x+"px";
        divObj.style.top = "50px";
        
        var divValue="";

		divValue+="<table padding='0' class='fifteenpxBotMargin' border='0' cellpadding='0' cellspacing='0'>";
        divValue+="<tbody><tr>";
		divValue+="<td class='innerBoxHeaderBgLft' width='3'><!--spacer--></td>";
		divValue+="<td class='innerBoxHeaderBgRpt' nowrap='nowrap'><h2>"+heading+"&nbsp;</h2></td>";
		divValue+="<td class='innerBoxHeaderBgRpt' nowrap='nowrap' align='right'><a href='javascript:divclose(\""+divOpenID+"\")'><img src='"+closeIcon+"' width='20' height='11' border='0' /></a></td>";
        divValue+="<td class='innerBoxHeaderBgRt' width='3'><!--spacer--></td></tr>";
        divValue+="<tr><td class='innerBoxSideLft' width='3'><!--spacer--></td>";
		divValue+="<td colspan='2' bgcolor='#FFFFFF'><img src='"+image+"'></td>";
		divValue+="<td class='innerBoxSideRt' width='3'><!--spacer--></td></tr>";
        divValue+="<tr><td class='innerBoxBgLftBot' width='3'><img src='../divimages/spacer_002.gif' height='1' width='3'></td>";
		divValue+="<td class='innerBoxBgRptBot' colspan='2' nowrap='nowrap'><!--spacer--></td>";
		divValue+="<td class='innerBoxBgRtBot' width='3'><img src='../divimages/spacer_002.gif' height='1' width='3'></td></tr>";
        divValue+="</tbody></table>";
        
        divObj.innerHTML = divValue;
}
}