NewWindow = null;


function ShowItem(src){
if(NewWindow){NewWindow.close();}
if(NewWindow==null || NewWindow.closed){
 settings=
 "left=20,"
 +"top=10,"
 +"width=200,"
 +"height=200,"
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=no,"
 +"resizable=no"
 NewWindow = window.open("",'foto',settings);
}
NewWindow.document.open();
NewWindow.document.clear();
NewWindow.document.write(
"<html><head><title>PODGLAD ZDJECIA</title></head>\n"
+"<script>\n"
+"function resize() {\n"
+"window.resizeTo(document.images[0].width+10, document.images[0].height+60);}\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();
}


//OTWIERA OKNO I PRZYWRACA - P
okno = null;
function onw(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

//ODSWIEZA STRONE MATKE - P
function na_reload_window(link){
window.opener.location=link;
window.close();
}
//ODSWIEZA STRONE MATKE - K


//--------------------------------

function ShowPage(url,width,height){
if(NewWindow){NewWindow.close();}
if(NewWindow==null || NewWindow.closed){
 settings=
 "left=10,"
 +"top=20,"
 +"width="+width+","
 +"height="+height+","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=yes,"
 +"resizable=no"
 NewWindow = window.open(url,'Strona',settings);
}
//NewWindow.document.open();
//NewWindow.document.clear();
NewWindow.document.close();
NewWindow.focus();
}


//REKLAMA - LAYER
function zamknij() { document.getElementById("reklama").style.display="none"; }
//REKLAMA - LAYER
