var dicom=new Array();
var numCom=3;
dicom[0]="Przewozy autokarowe";
dicom[1]="Wycieczki";
dicom[2]="Przewóz narciarzy";
dicom[3]="Przewozy autokarowe";

var curCom=0;

function swapCom()
{
    
    var nextCom=curCom+1;
    if (nextCom>=numCom){
        nextCom=0;
        }
    if (dicom[nextCom]!="")
    {
      var target=0;
      if (document.getElementById("slideCom")){
            target=document.getElementById("slideCom");
            }

      if (target){
            document.getElementById("slideCom").innerHTML=dicom[nextCom];
            curCom=nextCom;
            }
      setTimeout("swapCom()", 2000);
    }
    else{
      setTimeout("swapCom()", 500);
    }

}
setTimeout("swapCom()", 2000);