//FOTO - P

NewWindow = null;
function ShowItem(src){
if(NewWindow){NewWindow.close();}
if(NewWindow==null || NewWindow.closed){
 settings=
 "left=10,"
 +"top=20,"
 +"width=200,"
 +"height=200,"
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=yes,"
 +"resizable=yes"
 NewWindow = window.open("",'foto',settings);
}
NewWindow.document.open();
NewWindow.document.clear();
NewWindow.document.write(
"<html><head><title>FOTO</title></head>\n"
+"<script>\n"
+"function resize() {\n"
+"window.resizeTo(document.images[0].width+15, document.images[0].height+65);}\n"
+"</script>\n"
+"<body topmargin=0 leftmargin=0 onLoad=resize(); onclick=window.close(); bgcolor=#FFFFFF>\n"
+"<img src=" + src + " border=0>\n"
+"</body>\n"
+"</html>"
);
NewWindow.document.close();
NewWindow.focus();
}

//FOTO - K



//OTWIERA OKNO I PRZYWRACA - P
okno = null;
function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable) {

toolbar_str = toolbar ? 'yes' : 'no';
menubar_str = menubar ? 'yes' : 'no';
statusbar_str = statusbar ? 'yes' : 'no';
scrollbar_str = scrollbar ? 'yes' : 'no';
resizable_str = resizable ? 'yes' : 'no';

if(okno){okno.close();}
if(okno==null || okno.closed){

okno = window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+', toolbar='+toolbar_str+',menubar='+menubar_str+', status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);

}
okno.focus()
}
//OTWIERA OKNO I PRZYWRACA - K


//OTWIERA NOWE OKNO - P =========================================
function displayWindow(url, width, height) {
var Win = window.open(
url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=yes,menubar=no,left=50,top=50');
}
//OTWIERA NOWE OKNO - K =========================================
