<script type="text/javascript">
  var reklamy = [/*definicje reklam*/];
  var currItem = 0;
  var timeout = 5;
  var slideSpeed = 10;
  var slideStep = 3;
  var advBox = null;
  var divs = null;
  var padding = 4;
  function start(id)
  {
    advBox = document.getElementById(id);
    if(!advBox) return;
    
    for(var i = 0; i < reklamy.length; i++){
      var div = document.createElement("div");
      if(i > 0) div.style.display = "none";
      else div.style.display = "block";
      
      div.id = "advBoxDiv" + i;
      div.className = "advBoxDiv";
      div.innerHTML = reklamy[i];
      
      advBox.appendChild(div);
      div.style.width = "100%";
      div.style.height = "100%";
    }
    divs = advBox.getElementsByTagName("div");
    setTimeout("startShow();", timeout * 1000);
  }
  //dalsza część kodu skryptu