var nrCytatu = 0;
var timerCyt;
var licznChm = 0;
function Laduj()  {
       if (document.getElementById('chmura'))  {
          var chmura = document.getElementById('chmura');
          chmura.onmouseover = function () {PrzesunCh ();};
          chmura.style.top = "0px";  //wazne!
          chmura.style.display = "block";  //wazne!
          }
       timerCyt = setTimeout("ZmienCytat()", 8000);
}

function ZmienCytat() {
var cytaty = document.getElementById('cytaty').getElementsByTagName('li');
    (nrCytatu < cytaty.length-1)? nrCytatu++ : nrCytatu=0;
var cytat= cytaty[nrCytatu].innerHTML;
document.getElementById('news').innerHTML="<h2>Czy wiesz, &#380e...</h2>"+cytat;
timerCyt = setTimeout("ZmienCytat()", 8000);
  }

function PrzesunCh ()  {
       var chmura = document.getElementById('chmura');
       if (licznChm< 24)  {
       chmura.style.top = (parseInt(chmura.style.top)+5)+"px";
       setTimeout("PrzesunCh ()",200);
       licznChm++;
       }  else  {
       chmura.style.display= "none";
       }
}
window.onload = Laduj;
