<!--

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);
}

/*
Disable right click script II (on images)- By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert("Chroniona tresc dokumentu");
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert("Chroniona tresc dokumentu");
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert("Chroniona tresc dokumentu");
return false;
}
}
}


function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}


// --> 