// JavaScript Document
function stakr(string,speed){
  x = string.split("°");
  c = x.length;
  s = speed * 1000;
   setTimeout("stakrChange(x,c,0,s)", s);
}

function stakrChange(x,c,start,s){
    speed = s;
    if((start + 3) >= c){
      start = 0;
    }
    else{
      start = start + 3;
    }
    for(i = 0; i < 3; i++){
      co = "mainImage" + i;
      splus = start + i;
      img = document.getElementById(co);
      slovo = "images" + x[splus];
      img.src = slovo;
    }
    seznam = x;
    delka = c;
    zacatek = start;
    setTimeout("stakrChange(seznam,delka,zacatek,speed)", speed);
}
