// JavaScript Document
var myURLs=new Array();
      var pocitadlo=0;
      var next=0;
function is_null(input){
        return input==null;
      }
function startTime(index,relativeUrl) {
  if (myURLs!=undefined){
    pocitadlo=index;
    next=pocitadlo+1;
    if (next==5){
      next=1;
    }
    if (pocitadlo==5){
      pocitadlo=1;
    }
  zmenPozadi(pocitadlo,myURLs[pocitadlo].src,relativeUrl);
  t=setTimeout('startTime('+String(next)+',"'+relativeUrl+'")',5000);
  }
}

function zmenPozadi (index,src,relativeUrl){
//document.write(src);
  if(!is_null(document.getElementById("imagePresentation"))){
    document.getElementById("imagePresentation").style.backgroundImage='url('+src+')';
    document.getElementById("but4").style.backgroundImage='url('+relativeUrl+'/prezentace/imgbutton_neakt.png)';
    document.getElementById("but3").style.backgroundImage='url('+relativeUrl+'/prezentace/imgbutton_neakt.png)';
    document.getElementById("but2").style.backgroundImage='url('+relativeUrl+'/prezentace/imgbutton_neakt.png)';
    document.getElementById("but1").style.backgroundImage='url('+relativeUrl+'/prezentace/imgbutton_neakt.png)';

    document.getElementById("but"+index).style.backgroundImage='url('+relativeUrl+'/prezentace/imgbutton_akt.png)';
  }
}

