// JavaScript Document
var goid=null;
function fnpopup(oid,oElem)
{
	var aTag = oElem;
	if(aTag==null)
	{
		alert("Object not found !");
		return;
	}
	var leftpos=0,toppos=0;
	do {
		aTag = aTag.offsetParent;
		leftpos	+= aTag.offsetLeft;
		toppos += aTag.offsetTop;
	} while(aTag.tagName!="BODY");
	if(goid!=null)
		goid.style.display="none";
		
	var oTarget=document.getElementById(oid);
	goid=oTarget;
	var availHeight=document.body.offsetHeight;
	var availWidth=document.body.offsetWidth;
	if(oTarget!=null)
	{
		oTarget.style.display="block";		
		oTarget.style.top=((availHeight-oTarget.offsetHeight)/2)+25;
		oTarget.style.left=(availWidth-oTarget.offsetWidth)/2;

	}
	else
	{
		alert("Object not found !");
		return;
	}
}
function fnpopupclose(oid)
{
	var oTarget=document.getElementById(oid);	
	oTarget.style.display="none";
}