    function BPwindow(page,name,popX,popY) {
     posX=((screen.availWidth/2)-(popX/2))
       posY=((screen.availHeight/2)-(popY/2))
    window.open(page,name,"height="+popY+",width="+popX+",toolbar=0,menubar=0,directories=0, resizable=0,scrollbars=1,left="+posX+",top="+posY);
       }
       
var MPImgWinHTML = "";
var MPPopWinHandle = "";
var MPLimitWrites = 0;
function BPImagePopup(image, width, height,title) {
	var url = "/include/BPWinTemp.php";
	url += "?title="+title+"&image="+image+"&width="+width+"&height="+height;
	var xpos = (Math.round(screen.availWidth/2)-(width/2));
	var ypos = (Math.round(screen.availHeight/2)-(height/2));
	var windowOptions = "";
	windowOptions += "width="+width;
	windowOptions += ",height="+height;
	windowOptions += ",resizable=yes";
	windowOptions += ",scrollbars=no";
	windowOptions += ",menubar=no";
	windowOptions += ",toolbar=no";
	windowOptions += ",directories=no";
	windowOptions += ",location=no";
	windowOptions += ",status=no";
	windowOptions += ",left="+xpos;
	windowOptions += ",top="+ypos;
	MPPopWinHandle = window.open(url, "popUpWin", windowOptions);
	if (MPPopWinHandle && typeof MPPopWinHandle == "object") {
		if (!MPPopWinHandle.closed) MPPopWinHandle.focus();
		}
	}