function showPopupRenew(){
	centerPopup();
	$j("#opacity").css("display","block");
	$j("#popupContent").fadeIn("slow");
}
function hidePopupRenew(){
	$j("#popupContent").fadeOut("slow",function(){$j("#opacity").css("display","none");});
}
function centerPopup(){
	// decalages
	var decTop = 0, decLeft = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		decTop = window.pageYOffset;
		decLeft = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		decTop = document.body.scrollTop;
		decLeft = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		decTop = document.documentElement.scrollTop;
		decLeft = document.documentElement.scrollLeft;
	}
	//request data for centering
	var windowWidth = document.body.clientWidth;
	var windowHeight = document.body.clientHeight;
	var popupHeight = $j("#popupContent").height();
	var popupWidth = $j("#popupContent").width();
	//centering
	$j("#opacity").css({
		"position": "absolute"
		,"top": decTop
		,"left": (decLeft)
		,"width":windowWidth
		,"height":windowHeight
	});
	$j("#popupContent").css({
		"position": "absolute"
		,"visibility":"visible"
		,"top": (windowHeight/2 - popupHeight/2 + decTop)
		,"left": (windowWidth/2 - popupWidth/2 + decLeft)
	});
}
/*
var versionie = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer'){
	var ua = navigator.userAgent;
	var re  = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
	if (re.exec(ua) != null) versionie = parseFloat( RegExp.$1 );
}
*/
$j(window).scroll(centerPopup);
