var temp=self.location.href.split("?");
var picUrl = (temp.length>1)?temp[1]:"";
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();
};

noweOkienko = null;
function popImage(src){
w = 750; 
h = 563; 
title = 'Podgląd zdjęcia';
desc = '';
w_ok=w+20;
h_ok=h+20;
if(window.screen){
 aw=screen.availWidth;
 ah=screen.availHeight-30;
}else{
 aw=640;
 ah=530;
}
if(w_ok>aw){w_ok=aw;}
if(h_ok>ah){h_ok=ah;}
if(noweOkienko==null || noweOkienko.closed){
 ustawienia=
 "left=" + (aw-w_ok)/2 + ","
 +"top=" + (ah-h_ok)/2 + ","
 +"screenX=" + (aw-w_ok)/2 + ","
 +"screenY=" + (ah-h_ok)/2 + ","
 +"width=" + w_ok + ","
 +"height=" + h_ok +  ","
 +"innerWidth=" + w_ok  + ","
 +"innerHeight=" + h_ok + ","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=yes,"
 +"resizable=no"
 noweOkienko = window.open("",'obrazek',ustawienia);
}
noweOkienko.document.open();
noweOkienko.document.clear();
noweOkienko.document.write(
"<html><head><title>"+title+"</title>\n"
+"<script language='javascript'>\n"
+"var temp=self.location.href.split('?');\n"
+"var picUrl = (temp.length>1)?temp[1]:'';\n"
+"var NS = (navigator.appName=='Netscape')?true:false;\n"
+"function fitPic() {\n"
+"iWidth = (NS)?window.innerWidth:document.body.clientWidth;\n"
+"iHeight = (NS)?window.innerHeight:document.body.clientHeight;\n"
+"iWidth = document.images[0].width - iWidth;\n"
+"iHeight = document.images[0].height - iHeight;\n"
+"window.resizeBy(iWidth+20, iHeight-1+50);\n"
+"self.focus();\n"
+"};\n"
+"</script>\n"
+"</head><BODY onload='fitPic()' bgcolor=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>\n"
+"<TABLE height=100% width=100% border=0 cellspacing=0 cellpadding=0 align=center>  <TR> <TD align=center valign=middle>   <a href='javascript:window.close()'><img src="+src +" border=0></a><br /><span style='font-family: Arial, Sans Serif; font-size: 12px;'>"+desc +"</span></div> </TD>  </TR> </TABLE>\n"
+"</body></html>");
noweOkienko.document.close();
noweOkienko.focus();
}

function f(x)
{
	if (document.getElementById(x).style.display == 'none')
	{
		document.getElementById(x).style.display = "";
	}
	else
	{
		document.getElementById(x).style.display = "none";
	}
}