function displayReportPopup(ReportFormId)
{
	$("#shader").css({  
		"opacity": "0.7"  
	});  
	
	if(navigator.appName != "Microsoft Internet Explorer")
	{  
		$("#shader").fadeIn("fast");  
	}
	$("#" + ReportFormId).fadeIn("fast");
	centerPopup(ReportFormId) ;
}

function closeReportPopup(ReportFormId)
{
	$("#shader").fadeOut("fast");  
	$("#" + ReportFormId).fadeOut("fast");  
}


function showConfirmation(ReportFormId)
{
	document.getElementById('ReportConfirmation').style.display="inline" ;
	document.getElementById('shader').style.display="none" ;
	document.getElementById(ReportFormId).style.display="none" ;
}  

function centerPopup(ReportFormId)
{  
	//request data for centering
	if(navigator.appName == "Microsoft Internet Explorer")
	{  
		var windowWidth = screen.width;
		var windowHeight = screen.height;
	}
	else
	{
		var windowWidth = document.documentElement.clientWidth;  
		var windowHeight = document.documentElement.clientHeight;  
	}
	var popupHeight = $("#" + ReportFormId).height();  
	var popupWidth = $("#" + ReportFormId).width();  
	//centering  
	$("#" + ReportFormId).css({  
		"position": "absolute",  
		"top": windowHeight/2-popupHeight/2,  
		"left": windowWidth/2-popupWidth/2  
	});
	
	$("#shader").css({  
		"height": windowHeight  
	});  
}
