<!--

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);
}

function CheckForm(form) {

    var fname = document.getElementsByName('nazwisko');
    var lname = document.getElementsByName('imie');
    var email = document.getElementsByName('email');
    var text = document.getElementsByName('pytanie');

    if(fname[0].value!="" && lname[0].value!="" && email[0].value!="" && text[0].value!="" && text[0].value!=" ") {

    var hidform = document.getElementsByName('hidform');
    hidform[0].value = "isok";
    form.submit();
    }
    else {
    alert('Prosze uzupe3nia wymagane pola.');
    return false;
    }
}
-->