doba=4000;
pocet = 2;
nor   = new Date();
rotator= nor % 2;
obrsrc = new Array(pocet);
obrsrc[0]="images/slice_01.jpg";
obrsrc[1]="images/slice_02.jpg";
obr = new Array(pocet);
for (i=0; i < pocet; i++){
obr[i]= new Image();
obr[i].src= obrsrc[i];
}
function rotate() {
if (rotator==pocet) {rotator=0;}
document.images["obraz"].src = obrsrc[rotator];
rotator = rotator + 1
window.setTimeout('rotate();',doba);
}
window.onload = function() {
    rotate();
}
