/* user agent */
var xOp6Dn,xUA=navigator.userAgent.toLowerCase();
if(window.opera){var i=xUA.indexOf('opera');if(i!=-1){var v=parseInt(xUA.charAt(i+6));xOp6Dn=v<7;}}
/* clientHeight */
function xCH(){var h=0;if(xOp6Dn) h=window.innerHeight;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientHeight)h=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)h=document.body.clientHeight;else if(xD(window.innerWidth,window.innerHeight,document.width)) {h=window.innerHeight;if(document.width>window.innerWidth) h-=16;}return h;}
/* clientWidth */
function xCW(){var w=0;if(xOp6Dn) w=window.innerWidth;else if(document.compatMode=='CSS1Compat'&&!window.opera&&document.documentElement&&document.documentElement.clientWidth)w=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)w=document.body.clientWidth;else if(xD(window.innerWidth,window.innerHeight,document.height)) {w=window.innerWidth;if(document.height>window.innerHeight) w-=16;}return w;}
/* def */
function xD(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined'){return false;}}return true;}
/* show popup */
function showPopup() {
	var cw=xCW();
	var ch=xCH();
	var x=(cw-dialogWidth)/2;if(x<0){x=0;}
	var y=(ch-dialogHeight)/2;if(y<0){y=0;}
	if(x+dialogWidth>cw){dialogWidth=cw;x=0;}
	if(y+dialogHeight>ch){dialogHeight=ch;y=0;}
	var p=document.getElementById("mpfPopup");
	p.style.width=dialogWidth+"px";
	p.style.height=dialogHeight+"px";
	p.style.left=x+"px";
	p.style.top=y+"px";
	p.style.display="block";
}
/* hide popup */
function hidePopup() {
	document.getElementById("mpfPopup").style.display="none";
}
window.onload=showPopup;
