<!--

function correctPNG()
   {
   for(var i=0; i<document.images.length; i++)
      {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
         img.outerHTML = strNewHTML
         i = i-1
         }
      }
   }
window.attachEvent("onload", correctPNG);


function view(url, width, height) {
var winl = (screen.width - width) / 2;
var wint = (screen.height - height) / 2;
var Win = window.open(url, 'Win','width=' + width + ', top='+wint+', left='+winl+', height=' + height + ',toolbar=no,location=no,personalbar=no, directories=no,resizable=0,scrollbars=yes ,menubar=no' );
  if (Win != null)
    {
      if (Win.opener == null)
        {
        Win.opener = self;
        }
      Win.focus();
    }
}

function Foto(img){
  foto1 = new Image();
  foto1.src =(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh = foto1.width+20;
  altez = foto1.height+20;
  winl  = (screen.width  - foto1.width) / 2;
  wint  = (screen.height - foto1.height) / 2;
  stringa="width=" + largh + ",height=" + altez + ",top=" + wint + ",left=" + winl;
  finestra=window.open(img,"",stringa);
}

// galeria

// Autorem skryptu jest: SŁAWOMIR KOKŁOWSKI
// www.kurshtml.boo.pl
// Jeśli chcesz wykorzystać ten skrypt na swojej stronie,
// nie usuwaj tego komentarza!


function wyswietl(plik, szerokosc, wysokosc, tytul, opis)
{
// Parametry domy.lne:
var domyslna_szerokosc = 0;  // w pikselach
var domyslna_wysokosc = 0;
var domyslny_tytul = "";
var domyslny_opis = "";

// Pozostałe parametry:
var obramowanie = 1;  // w pikselach
var kolor_obramowania = "black";  // np.: "#000000" albo "black" itd.
var kolor_tla = "";  // np.: "#FFFFFF" albo "white" itd.
var kolor_tekstu = "";  // np.: "#000000" albo "black" itd.
var rozmiar_czcionki = 9;  // w punktach [pt]
var czcionka = "Verdana, Arial, Helvetica, sans-serif";
var wyswietlaj_zamknij = false;  // true lub false


  if (!szerokosc && domyslna_szerokosc) var szerokosc = domyslna_szerokosc;
  if (!wysokosc && domyslna_wysokosc) var wysokosc = domyslna_wysokosc;
  if (!tytul && domyslny_tytul) var tytul = domyslny_tytul;
  if (!tytul)
  {
    var start = plik.lastIndexOf('/');
    var stop = plik.lastIndexOf('.');
    if (stop < start) stop = plik.length;
    var tytul = plik.substring(start+1, stop);
  }
  if (!opis && domyslny_opis) var opis = domyslny_opis;

  szerokosc = Math.abs(isNaN(parseInt(szerokosc)) ? 0 : parseInt(szerokosc));
  wysokosc = Math.abs(isNaN(parseInt(wysokosc)) ? 0 : parseInt(wysokosc));
  obramowanie = Math.abs(isNaN(parseInt(obramowanie)) ? 0 : parseInt(obramowanie));
  rozmiar_czcionki = Math.abs(isNaN(parseInt(rozmiar_czcionki)) ? 0 : parseInt(rozmiar_czcionki));

  var okno = window.open("", "", "menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=no" + (szerokosc ? ",width=" + szerokosc : "") + (wysokosc ? ",height=" + wysokosc : ""));

  okno.document.open();

  okno.document.write('<!DOC'+'TYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">\n' +
    '<HT'+'ML>\n' +
    '<HE'+'AD>\n' +
    '<ME'+'TA HTTP-EQUIV="Content-type" CONTENT="text/html; char'+'set=utf-8">\n' +
    '<TI'+'TLE>' + tytul + '</TI'+'TLE>\n' +
    '</HE'+'AD>\n' +
    '<BO'+'DY' + (kolor_tla ? ' BGCOLOR="' + kolor_tla + '"' : '') + ' style="margin: 0; padding: 0">\n' +
    '<TABLE BORDER="0" WIDTH="100%" HEIGHT="100%" CELLPADDING="0" CELLSPACING="0">\n' +
    '<TR><TD ALIGN="center" VALIGN="middle"' + (kolor_tekstu || rozmiar_czcionki || czcionka ? ' style="' +
    (kolor_tekstu ? 'color: ' + kolor_tekstu + ';' : '') + (rozmiar_czcionki ? 'font-size: ' + 
    rozmiar_czcionki + 'pt;' : '') + (czcionka ? 'font-family: ' + czcionka + ';' : '') + '"' : '') + '>' +
    '<IMG SRC="' + plik + '"' + (obramowanie ? ' BORDER="' + obramowanie + '"' : '') +
    (obramowanie && kolor_obramowania ? ' style="border: solid ' + obramowanie + 'px ' + kolor_obramowania +
    '"' : '') + '>' + (opis ? '<BR><BR>' + opis : '') +
    (wyswietlaj_zamknij ? '<BR><BR><A HREF="javascript:window.close()"><B>Zamknij</B></A>' : '') +
    '</TD></TR>\n' +
    '</TABLE>\n' +
    '</BO'+'DY>\n' +
    '</HT'+'ML>');

  okno.document.close();
}

-->

