/* misza@best.net.pl */
function ShowPhoto(sciezka,nazwa,w,h) {
wid = w + 40;
hei = h+80;
odlewa=(screen.width-wid)/2;
odgory=(screen.height-hei)/2;	
config='left='+odlewa+',top='+odgory+',width='+wid+',height='+hei+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes';
cel=window.open('','okno',config)
cel.document.write('<HTML><HEAD>');
cel.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">');
cel.document.write('<TITLE>PBG</title><link rel="stylesheet" href="css/style.css" type="text/css">');
cel.document.write('</HEAD>');
cel.document.write('<body style="background-color:#e6e6e6; margin: 20px 0 0 0">');
cel.document.write('<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">');
cel.document.write('<tr><td align="center"><a href="javascript:self.close()"><img src="'+sciezka+'" style="border: 1px solid #FFFFFF;"></a></td></tr>');
cel.document.write('<tr><td><p style="color: #0c2b5b; text-align: center; padding: 20px 0 0 0">'+nazwa+'</p></td></tr></table>');
cel.document.write('</body></html>');
cel.focus();
}


function PopupSizes(nazwa,szer,wys,subtitle) {
  void newWin(nazwa,szer,wys,subtitle);
}
function Popup(nazwa, subtitle) {
  void newWin(nazwa,0,0,subtitle);
}
function myurlencode(string) {
    return escape(string).replace(/[+]/g, '%2B');
}
function newWin(nazwa,szer,wys,subtitle) {
var sizes = false;
if (wys>0) { 
    sizes = true;
    szer = szer+28;
    wys = wys+28;
    odlewa=(screen.width-szer)/2;
    odgory=(screen.height-wys)/2;
} else {
    szer = 800;
    wys = 600;
    odlewa=(screen.width)/4;
    odgory=(screen.height)/4;
}

base = document.getElementsByTagName('base')[0];
if (base) {
	baseurl = base.href;
} else {
	baseurl = '';
}

config='left='+odlewa+',top='+odgory+',width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=auto';
cel=window.open('','okno',config)
cel.document.write('<HTML><HEAD>');
cel.document.write('<base href="'+baseurl+'" />');
cel.document.write('<link rel="stylesheet" href="'+baseurl+'css/style.css" type="text/css" />');
cel.document.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-16">');
cel.document.write('<title>'+document.title+'</title>');
if (!sizes) {
  cel.document.write('<script language="javascript">');
  cel.document.write('	var temp=self.location.href.split("?");');
  cel.document.write('	var picUrl = (temp.length>1)?temp[1]:"";');
  cel.document.write('	var NS = (navigator.appName=="Netscape")?true:false;');
  cel.document.write('	function fitPic() {');
  cel.document.write('		iImg1 = document.getElementById("img1");');
  cel.document.write('		iWidth = (NS)?window.innerWidth:document.body.clientWidth;');
  cel.document.write('		iHeight = (NS)?window.innerHeight:document.body.clientHeight;');
  cel.document.write('		if (iImg1.width>1200) iWidth = 640 - iWidth; else { iWidth = iImg1.width + 40 - iWidth; }');
  cel.document.write('		if (iImg1.height>1000) iHeight = 600 - iHeight; else { iHeight = iImg1.height + '+((subtitle)?'80':'40')+' - iHeight; }');
  cel.document.write('		window.resizeBy(iWidth, iHeight-1);');
  cel.document.write('		self.focus();');
  cel.document.write('	};');
  cel.document.write('	function setTitle() {');
  cel.document.write('		self.document.title = top.opener.document.title;');
  cel.document.write('	};');
  cel.document.write('</script>');
}
cel.document.write('</HEAD>');
cel.document.write('<body style="background-color:#e6e6e6; margin: 20px 0 0 0;" class="imagepopup">');
cel.document.write('<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0">');
cel.document.write('<tr><td align="center"><a href="javascript:self.close()"><img id="img1" src="'+nazwa+'" style="border: 1px solid #FFFFFF;" onload="javascript: fitPic();"></a></td></tr>');
if (subtitle)
	cel.document.write('<tr><td><p style="color: #0c2b5b; text-align: center; padding: 20px 0 0 0;  font-family: Arial, helvetica, sans-serif; font-size: 13px;">'+subtitle+'</p></td></tr></table>');
//if (!sizes) {
//  cel.document.write('<script language="javascript">');
//  cel.document.write('	setTitle();');
//  cel.document.write('</script>');
//}
cel.document.write('</body></html>');
cel.document.close();
cel.focus();
}

function NewHtm(nazwa,szer,wys) {
odlewa=(screen.width-szer)/2;
odgory=(screen.height-wys)/2;		
config='left='+odlewa+',top='+odgory+',width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
stadion=window.open(nazwa,'okno',config);
stadion.focus();
}
function NewHtmNoScr(nazwa,szer,wys) {
odlewa=(screen.width-szer)/2;
odgory=(screen.height-wys)/2;		
config='left='+odlewa+',top='+odgory+',width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes';
stadion=window.open(nazwa,'okno',config);
stadion.focus();
}

