var winl = (screen.width-300) / 2;
var wint = (screen.height-200) / 2;

PositionX = winl;
PositionY = wint;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 300;
defaultHeight = 200;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;



// Do not edit below this line...
// ================================
if (parseInt(navigator.appVersion.charAt(0))>=4)
{
	var isNN=(navigator.appName=="Netscape")?1:0;
	var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
	var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
	var optIE='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;

	function popImage(imageURL,imageTitle)
	{
		if (isNN){imgWin=window.open('popupup.php?url='+imageURL,'',optNN);
	}
	if (isIE){imgWin=window.open('popupup.php?url='+imageURL,'',optIE)};
}





/*with (imgWin.document)
{
	//var temp = self.location.href.split("?");
	var plaatje = imageURL;
	
	
	writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>var NS = (navigator.appName=="Netscape") ? true : false;function fitPic() {    iWidth = (NS)?window.innerWidth:document.body.clientWidth;    iHeight = (NS)?window.innerHeight:document.body.clientHeight;iWidth = document.images[0].width - iWidth;iHeight = document.images[0].height - iHeight;window.resizeBy(iWidth, iHeight-1);self.focus();};');
	writeln('function resizeWindow(iWidth, iHeight){    var resizeRef = document.getElementById(\'resizeReference\');    var iOuterWidth = iWidth + 10;    var iOuterHeight = iHeight + 29;     if (resizeRef) {        var iPreWidth = resizeRef.offsetWidth;        var iPreHeight = resizeRef.offsetHeight;        window.resizeTo(iPreWidth,iPreHeight);        var iPostWidth = resizeRef.offsetWidth;        var iPostHeight = resizeRef.offsetHeight;        iOuterWidth = iWidth + (iPreWidth-iPostWidth);        iOuterHeight = iHeight + (iPreHeight-iPostHeight);    }    window.resizeTo(iOuterWidth, iOuterHeight);}var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
	writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
	writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('');
	writeln('width=document.images[0].width; ');
	writeln('if (navigator.appVersion.indexOf("MSIE 7")!=-1)');
	writeln('height=document.images[0].height+70; else height=document.images[0].height+29;');
	writeln('var resizeRef = document.getElementById(\'resizeReference\'); resizeRef.style.width=width+"px"; resizeRef.style.height=height+"px"; resizeWindow(width,height);fitPic();}');writeln('if (isNN){');       
	writeln('width=document.images["George"].width;window.innerWidth=document.images["George"].width;');writeln('height=document.images["George"].height;window.innerHeight=document.images["George"].height;window.moveTo(0,0);}');
	writeln('winl = (screen.width-width)/2;wint = (screen.height-height)/2;window.moveTo(winl,wint);}');
	writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');

	if (!AutoClose) 
		writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus();">')
	else 
		writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus();setTimeout(\'resizeWindow(\'+width+\',\'+height+\')\');" onclick="self.close()" >');
	writeln('<div id="resizeReference" style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; z-index: -1;">&nbsp;</div><img name="George" src='+imageURL+' style="display:block" onMouseOver="this.style.cursor=\'hand\';"></body></html>');
	close();		
}
}*/
