<!---

if (!Array.prototype.indexOf) {
    Array.prototype.indexOf = function(obj, start) {
     for (var i = (start || 0), j = this.length; i < j; i++) {
         if (this[i] === obj) { return i; }
     }
     return -1;
    }
}


popupWin = null;
function openWindow(cil,sirka,vyska,x,y) {
  popupWin = window.open(cil, "reklama", "width="+sirka+",height="+vyska+",top="+y+",left="+x+",status=no,menubar=no");
}function openFoto(cil,sirka,vyska,x,y) {
  if(popupWin!=null) {popupWin.close();}
  popupWin = window.open("foto.php?f=" + cil, "foto", "width="+sirka+",height="+vyska+",top="+y+",left="+x+",status=no,menubar=no,scrollbars=yes,resizable=yes");
  popupWin.focus();
}
function openFotoDetail(cil,sirka,vyska,x,y) {
  popupWin = window.open("gfoto.php?id=" + cil, "fotogalerie", "width="+sirka+",height="+vyska+",top="+y+",left="+x+",status=no,menubar=no,scrollbars=yes,resizable=yes");
  popupWin.focus();
}
function openServer(cil) {
//  popupWin = window.open(cil, "ucstr", "status=yes,toolbar=yes,menubar=yes,scrollbars=yes,resizable=yes");
  popupWin = window.open(cil);
}
function changeimg(foto,img,vyska,sirka) {
  if (document.getElementById) {
      cnt = document.getElementById("foto");
  } else if (document.all) {
      cnt = document.all["foto"];
  }
  cnt.src=img;
  if (document.getElementById) {
      odk = document.getElementById("odkaz");
  } else if (document.all) {
      odk = document.all["odkaz"];
  }
  if(foto=="") {
    odk.href="#";
  } else {
    odk.href="javascript:openFoto('"+foto+"',"+vyska+","+sirka+",20,20);";
  } 
}
function chkFoto(img, detail) {
  if (document.getElementById) {
      cnt = document.getElementById("foto");
  } else if (document.all) {
      cnt = document.all["foto"];
  }
  cnt.src=img;
  if(detail != false) {
    $(cnt).attr('rel', detail);
    $(cnt).addClass('pointed');
  } else {
    $(cnt).attr('rel', '');
    $(cnt).removeClass('pointed');
  }
}

function mapa(kolik) {
          if(kolik < 8) {
            document.getElementById('ma').style.backgroundPosition = "0px -"+(kolik*300)+"px";
          } else {
            document.getElementById('ma').style.backgroundPosition = "-520px -"+((kolik-7)*300)+"px";
          }
        }



function change(show, hide) {
for (k = 1; k <= hide ; k++) {
if (show == k){
document.getElementById("termin-" + show).style.background="transparent url('/img/termin-on.png') no-repeat 0 0";
document.getElementById("obdobi-" + show).style.display="";
}else{
document.getElementById("termin-" + k).style.background="transparent url('/img/termin-off.png') no-repeat 0 0";
document.getElementById("obdobi-" + k).style.display="none";
}
}
}   
   
function search() {
ser = document.getElementById("search-in");

if (ser.style.display=="none") 
{
ser.style.display="";
document.getElementById("search-txt").innerHTML="skrýt rozšířené vyhledávání";
}
else 
parent.location="index.php?id=cs";
}  

$(document).ready(function(){
    $.fn.prettyPhoto({
        show_title: false,
        theme: 'light_rounded',
        overlay_gallery: false,
        social_tools: ''
    });
    $('img#foto').click(function(event) {
        if(event.preventDefault) event.preventDefault(); else event.returnValue = false;
        var attr = $(this).attr('rel');
        if(typeof attr != 'undefined' && attr != false && attr != '') {
            // do something!
            var detArrs = DetailsArray;
            var index = detArrs.indexOf(attr);
            if(index > 0) {
                detArrs.splice(index, 1);
                detArrs.unshift(attr);                
            }
            $.prettyPhoto.open(detArrs);
                        
        } 
    });
});

        
-->

