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 popup(src, w, h, title, 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: 10px;'>"+desc +"</span></div> </TD>  </TR> </TABLE>\n"
+"</body></html>");
noweOkienko.document.close();
noweOkienko.focus();
}


function panorama_360(src, w, h, desc){
if(window.screen){
 aw=screen.availWidth;
 ah=screen.availHeight;
}else{
 aw=640;
 ah=450;
}
if(noweOkienko==null || noweOkienko.closed){
 ustawienia=
 "left=" + (aw-w)/2 + ","
 +"top=" + (ah-h)/2 + ","
 +"screenX=" + (aw-w)/2 + ","
 +"screenY=" + (ah-h)/2 + ","
 +"width=" + w + ","
 +"height=" + h + ","
 +"innerWidth=" + w + ","
 +"innerHeight=" + h + ","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=yes,"
 +"menubar=no,"
 +"scrollbars=no,"
 +"resizable=no"
 noweOkienko = window.open("",'obrazek',ustawienia);
}
noweOkienko.document.open();
noweOkienko.document.clear();
noweOkienko.document.write(
"<html><head><title>Prezentacja</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"http://e-zycie.pl/js/site.css\" /> \n"

+"<META http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-2\" /> \n"

+"</head><BODY leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 MARGINWIDTH=\"0\" MARGINHEIGHT=\"0\">\n"
+"<table width=100% height=100% align=center><tr><td align=center valign=middle class=\"ac\"><iframe scrolling=no width=500 height=423 bgcolor=\"#ece9d8\" frameborder=0 src="+ src +"></iframe><br><span style='font-family: Arial, Sans Serif; font-size: 12px;'>"+desc +"<br /><br /><a href='javascript:window.close()'>Zamknij okno</a></span></td></tr></table>\n"
+"</body></html>"
);
noweOkienko.document.close();
noweOkienko.focus();
}