if (document.images)
{ adImages0 = new Array("http://www.kapodol.com/Mlogo_euro2010_140x60_02.html");
  adUrl0 = new Array("http://www.kapodol.com/Evropsko_prvenstvo/2010/index.php");
  thisAd0 = Math.floor(Math.random() * 1);
adImages1 = new Array("http://www.kapodol.com/MkapodolcomR_zoga.html");
  adUrl1 = new Array("http://www.kapodol.com");
  thisAd1 = Math.floor(Math.random() * 1);
adImages2 = new Array("http://www.kapodol.com/Bstreznik_468_01.html", "http://www.kapodol.com/Bloterija_kapodol_486x60_08.html", "http://www.kapodol.com/Bsoccerbox_kapodol_486x60_02.html");
  adUrl2 = new Array("http://www.streznik.com", "http://www.e-stave.com/eIgre/Default.aspx", "http://www.soccerbox.si");
  thisAd2 = Math.floor(Math.random() * 3);
  count = -1;
  }

function cycleAds()
{ ++count;
  if (count >= 35) count = 0;
  if ((count % 35) == 0)
  { dd = document.getElementById("divBanner0_" + thisAd0);
    if (dd != null) dd.style.top = -100;
    if (++thisAd0 >= adImages0.length) thisAd0 = 0;
    dd = document.getElementById("divBanner0_" + thisAd0);
    if (dd != null) dd.style.top = 10;
    }
  if ((count % 35) == 0)
  { dd = document.getElementById("divBanner1_" + thisAd1);
    if (dd != null) dd.style.top = -100;
    if (++thisAd1 >= adImages1.length) thisAd1 = 0;
    dd = document.getElementById("divBanner1_" + thisAd1);
    if (dd != null) dd.style.top = 10;
    }
  if ((count % 35) == 0)
  { dd = document.getElementById("divBanner2_" + thisAd2);
    if (dd != null) dd.style.top = -100;
    if (++thisAd2 >= adImages2.length) thisAd2 = 0;
    dd = document.getElementById("divBanner2_" + thisAd2);
    if (dd != null) dd.style.top = 10;
    }
  setTimeout("cycleAds()", 1000);
  }

function initMenu()
{ tb = document.getElementById("TABMENU");
  if (tb != null)
    if (!tb.rows.length)
    { tt = new Array(10);
      url = new Array(10);
      dt = new Array(10);
      live = new Array(10);
      tt[0] = "PRVA STRAN";
      tt[1] = "FORUM";
      tt[2] = "STAVNICA";
      tt[3] = "INTERVJUJI";
      tt[4] = "KOLUMNE";
      tt[5] = "TURNIRJI";
      tt[7] = "MARKETING";
      tt[6] = "TRGOVINA";
      live[0] = 0;
      live[1] = 0;
      live[2] = 0;
      live[3] = 0;
      live[4] = 0;
      live[5] = 1;
      live[6] = 0;
      live[7] = 0;
      dt[0] = "KAPODOL - slovenski portal malega nogometa";
      dt[1] = "KapoFORUM";
      dt[2] = "KapoSTAVNICA";
      dt[3] = "KapoINTERVJU";
      dt[4] = "KapoKOLUMNA";
      dt[5] = "KapoTURNIR";
      dt[7] = "KapoSPONZORJI";
      dt[6] = "KapoTRGOVINA";
      url[0] = "http://www.kapodol.com/";
      url[1] = "http://www.kapodol.com/forummain.php";
      url[2] = "http://www.kapodol.com/kapostavnica.php";
      url[3] = "http://www.kapodol.com/interview0035.html";
      url[4] = "http://www.kapodol.com/files/news/kolumne/kolumna0012.html";
      url[5] = "http://www.kapodol.com/files/turnirji/turnir0497.html";
      url[7] = "http://www.kapodol.com/sponzorji.php";
      url[6] = "http://www.mali-nogomet.net/";
      row = tb.insertRow(0);
      for (i = 0; i < 8; i++)
      { if (i == 6)
        { acolor = "#032556";
          ncolor = "#29739F";
          nw = "target=\"blank\" ";
          trace = "p";
          } else
          { acolor = "#00502D";
            ncolor = "#64C864";
            nw = "";
            trace = "";
            }
        cell1 = row.insertCell(3 * i);
        cell2 = row.insertCell(3 * i + 1);
        cell3 = row.insertCell(3 * i + 2);
        if (document.title == dt[i]) cur = 1;
          else cur = 0;
        if (cur) cell1.innerHTML = "<IMG BORDER=\"0\" SRC=\"../../" + trace + "kapo_left2.png\">";
          else cell1.innerHTML = "<IMG BORDER=\"0\" SRC=\"../../" + trace + "kapo_left1.png\">";
        cell1.width = 17;
        cell1.align = "right";
        if (cur) cell2.innerHTML = "<B CLASS=\"MENUTITLE\">" + tt[i] + "</B>";
          else
          { if (live[i]) tmpstr = " <IMG BORDER=\"0\" SRC=\"http://www.kapodol.com/star1.gif\">";
              else tmpstr = "";
            cell2.innerHTML = "<A STYLE=\"text-decoration:none\" " + nw + "HREF=\"" + url[i] + "\"><B CLASS=\"MENU\">" + tt[i] + "</B></A>" + tmpstr;
            }
        if (cur) cell2.bgColor = acolor;
          else cell2.bgColor = ncolor;
        cell2.align = "center";
        if (cur) cell3.innerHTML = "<IMG BORDER=\"0\" SRC=\"../../" + trace + "kapo_right2.png\">";
          else cell3.innerHTML = "<IMG BORDER=\"0\" SRC=\"../../" + trace + "kapo_right1.png\">";
        cell3.width = 17;
        cell3.align = "left";
        }
      cell1 = row.insertCell(3 * i);
      cell1.innerHTML = "&nbsp;";
      }
    }

function gotoAd0()
{ if (adUrl0[thisAd0].length) window.open(adUrl0[thisAd0]);
  }
function gotoAd1()
{ if (adUrl1[thisAd1].length) window.open(adUrl1[thisAd1]);
  }
function gotoAd2()
{ if (adUrl2[thisAd2].length) window.open(adUrl2[thisAd2]);
  }
