      function grabElement( sId ) {
        if(document.getElementById) { return document.getElementById(sId); }
        else { if(document.all) { return document.all[sId]; }
        else { return document.layers[sId]; } }
      }

      var numLinks = posCorrente = -1;
      var timer = 5; // tempo default (em segundos)
      var imgWidth = 468; // Largura default (em pixels)
      var imgHeight = 60; // Altura default (em pixels)
      var banners = new Array();

      bannerRotator = new Object();
      bannerRotator.create = createBannerRotator;
      bannerRotator.add = addBannerRorator;
      bannerRotator.setTimer = setTimerBannerRotator;
      bannerRotator.setWidth = setWidthBannerRotator;
      bannerRotator.setHeight = setHeightBannerRotator;
      bannerRotator.init = initBannerRotator;

      function createBannerRotator() {
        document.write("<DIV ID='bannerRotator'>&nbsp;</DIV>");
      }

      function addBannerRorator( sText, sURL, sTarget ) {
       banners[++numLinks] = new Array( sText, sURL, sTarget );
      }

      function setTimerBannerRotator( sTimer ) {
        timer = sTimer;
      }
      
      function setWidthBannerRotator( iWidth ) {
        imgWidth = iWidth;
      }

      function setHeightBannerRotator( iHeight ) {
        imgHeight = iHeight;
      }

      function initBannerRotator() { bannerUpdate(); }

      function bannerUpdate() {
        if(++posCorrente == numLinks+1) { posCorrente = 0; }
        if( banners[posCorrente][2] == undefined ) {
          grabElement('bannerRotator').innerHTML = "<A CLASS='bannerrotator' HREF='"+banners[posCorrente][1]+"'><IMG SRC='"+banners[posCorrente][0]+"' BORDER='0' WIDTH='"+imgWidth+"' HEIGHT='"+imgHeight+"'></A>";
        } else {
          grabElement('bannerRotator').innerHTML = "<A CLASS='bannerrotator' HREF='"+banners[posCorrente][1]+"' TARGET='"+banners[posCorrente][2]+"'><IMG SRC='"+banners[posCorrente][0]+"' BORDER='0' WIDTH='"+imgWidth+"' HEIGHT='"+imgHeight+"'></A>";
        }
        setTimer();
      }

      function setTimer() {
        window.setTimeout("bannerUpdate()", timer*1000);
      }
