// JavaScript Document

function Presmerovani()
{
  this.casovac = "";
   
  this.Set = function()
  { 
    el = document.getElementById("header");
    el.src = "./images/index_animace.gif";
    
    this.casovac = setTimeout("oPresmerovani.Start()", 1100);
  }
  
  this.Start = function()
  { 
    window.location = "./aktuality.php";
  }
  
  this.SetEnglish = function()
  { 
    el = document.getElementById("header");
    el.src = "./images/index_animace.gif";
    
    this.casovac = setTimeout("oPresmerovani.StartEnglish()", 1100);
  }
  
  this.StartEnglish = function()
  { 
    window.location = "en/aktuality.php";
  }
}

function Recenze()
{ 
  this.actual = 0;
  
  this.Switch = function()
  { 
    el=document.getElementById('recenze'+ this.actual);
    el.style.display = "none";
  
    this.actual = (this.actual + 1) % 5;
  
    el=document.getElementById("recenze"+ this.actual);
    el.style.display = "block";
  }
}

function na_preload_img()
{ 
  var img_list = na_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i] = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

oRecenze = new Recenze();
oPresmerovani = new Presmerovani();
