noweOkienko = null;
function galeria(src, w, h, t){
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>Agat</title>\n"
+"</head><BODY  bgcolor=#3E1E18 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 link=#000000 vlink=#000000 alink=#000000>\n"
+"<table width='100%' height='100%' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td align='center' valign='top'>"
+"<a href='javascript:window.close()'><img src="+ src +"  border=1 galleryImg=no></a><br><p style='font-family:times; color:rgb(255,255,255); text-align:center; font-size:12px; margin:0px;'><br>"+t+"</p>"
+"</td></tr></table>\n"
+"</body></html>"
);
noweOkienko.document.close();
noweOkienko.focus();
}

function show_win(src, w, h){
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=yes,"
 +"resizable=no"
 noweOkienko = window.open(src,'plik',ustawienia);
}
noweOkienko.focus();
}
