var imgPopUp;

function openPopUp(pageName, w, h) {

	if(imgPopUp && !imgPopUp.closed) imgPopUp.close();

	xPos=Math.round((screen.width-w)/2);

	yPos=Math.round((screen.height-h)/2)-30;

	flashPopUp=window.open(pageName,'imgPopUp','toolbar=0,location=0,direction=0,status=0,resize=0,menubar=0,scrollbars=0,width='+w+',height='+h+',screenX='+xPos+',screenY='+yPos+',left='+xPos+',top='+yPos);

}

var prnPopUp;

function printPopUp(pageName) {

	var w=600;

	var h=550;

	if(prnPopUp && !prnPopUp.closed) prnPopUp.close();

	xPos=screen.width-w-10;

	yPos=0;

	flashPopUp=window.open(pageName,'prnPopUp','toolbar=0,location=0,direction=0,status=0,resize=0,menubar=0,scrollbars=1,width='+w+',height='+h+',screenX='+xPos+',screenY='+yPos+',left='+xPos+',top='+yPos);

}

var obrazek = null;

function openPopUpPic(path,sizeX,sizeY) {
	if(obrazek && !obrazek.closed) obrazek.close();
	obrazek=window.open("", "obrazek", "width="+sizeX+", height="+(parseInt(sizeY)+17)+", location=no, menubar=no, status=no, toolbar=no, scrollbars=no, resizable=no,alwaysRaised=true,left=1,top=1,screenX=1,screenY=1");
	with(obrazek) {
		document.writeln('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
		document.writeln('<html xmlns="http://www.w3.org/1999/xhtml">');
		document.writeln('<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />');
		document.writeln('<title>Podróż do Mlecznej Krainy - galeria nagrodzonych prac</title>');
		document.writeln('<style type="text/css">');
		document.writeln('body { margin: 0px; font-family: Tahoma, Verdana, Arial; font-size: 11px; background-color: #BCCCD3; } a { color: #1C5BA2; }');
		document.writeln('</style></head><body>');
		document.writeln('<div align="center"><img alt="Jedna z nagrodzonych prac" width="'+sizeX+'" height="'+sizeY+'" src="'+path+'" onClick="self.close();"></div>');
		document.writeln('<div align="center"><a href="#" onClick="self.close();">zamknij</a></div>');
		document.writeln('</body></html>');
		document.close();
	}
	obrazek.focus();
	//return false;
}