var scroll1 = new scrollObject("scr1", 136, 50, "up", 5000, 1.15);
    scroll1.block[0]  = '<a href="http://anime-dust.tainted-paradise.com/" 	 target="_blank"><img src="http://i115.photobucket.com/albums/n283/xxpuppylocks__1/animedustbuttons.gif" 	     width="88" height="31" class="body" border="0" alt="Anime Dust"></a>';
    scroll1.block[1]  = '<a href="http://inuneo.foxdemon.net/"		   	 target="_blank"><img src="http://usera.imagecave.com/inuneographics/sitelayouts/PHbutton.gif"           	     width="88" height="31" class="body" border="0" alt="Inuneo Graphics"></a>';
    scroll1.block[2]  = '<a href="http://www.outragedhope.tainted-paradise.com/" target="_blank"><img src="http://i78.photobucket.com/albums/j117/tessa_obession/square7.gif"	    	 	     width="88" height="31" class="body" border="0" alt="Outraged Hope"></a>';
    scroll1.block[3]  = '<a href="http://www.ichabod1799.net/"	 	   	 target="_blank"><img src="http://www.ichabod1799.net/banners/button23.jpg"		 	 	 	     width="88" height="31" class="body" border="0" alt="Ichabod1799"></a>';
    scroll1.block[4]  = '<a href="http://flyangel.x-tenshi.com/"	   	 target="_blank"><img src="http://flyangel.x-tenshi.com/images/buttons/1.jpg"			 	 	     width="88" height="31" class="body" border="0" alt="FlyAngel"></a>';
    scroll1.block[5]  = '<a href="http://tainted-paradise.com/"		   	 target="_blank"><img src="http://i186.photobucket.com/albums/x65/tainted-paradise/linkus/button3.gif""  	     width="88" height="31" class="body" border="0" alt="Tainted Paradise"></a>';
    scroll1.block[6]  = '<a href="http://satsukiyami.com/"		   	 target="_blank"><img src="http://satsukiyami.naruto-elite.com/images/linksout/1.gif"		         	     width="88" height="31" class="body" border="0" alt="Satsukiyami"></a>';
    scroll1.block[7]  = '<a href="http://animepartizan.110mb.com/"	   	 target="_blank"><img src="http://i114.photobucket.com/albums/n250/xleon_m9/subermad/apBanner.jpg"       	     width="88" height="31" class="body" border="0" alt="Anime Partizan">';
    scroll1.block[8]  = '<a href="http://www.x-tenshi.com/"		   	 target="_blank"><img src="images/buttons/their/x-tenshi.gif"					         	     width="88" height="31" class="body" border="0" alt="X-Tenshi">';
    scroll1.block[9]  = '<a href="http://www.neonvca.co.nr/"		   	 target="_blank"><img src="http://i75.photobucket.com/albums/i316/neonvca/supaff/us/link7.gif"	   	 	     width="88" height="31" class="body" border="0" alt="Neon VCA">';
    scroll1.block[10] = '<a href="http://www.usachan.net.tc/"	           	 target="_blank"><img src="http://i11.photobucket.com/albums/a161/dark_wizard_cc/button.gif"	         	     width="88" height="31" class="body" border="0" alt="Usa-Chan">'; 
    scroll1.block[11] = '<a href="http://www.brokensacramentx.com/"	      	 target="_blank"><img src="http://www.brokensacramentx.com/banners/BSX_link1.jpg"	      		 	     width="88" height="31" class="body" border="0" alt="Broken Sacrament X">'; 
    scroll1.block[12] = '<a href="http://forgottenmemories.heavenly-garden.com/" target="_blank"><img src="http://i81.photobucket.com/albums/j225/Anime_Manga_Luva/forgotten-memories/fm_button.jpg" width="88" height="31" class="body" border="0" alt="Forgotten Memories">';

var scroll2 = new scrollObject("scr2", 136, 50, "up", 6000, 1.15);
    scroll2.block[0] = '<a href="http://neocrisis.com/topsite/"             target="_blank"><img src="http://neocrisis.com/topsite/button.php?u=anime_hours"             alt="Neo Crisis Topsite" border="0" class="nav"/></a>';
    scroll2.block[1] = '<a href="http://www.saltedanime.xytex.net/topsite/" target="_blank"><img src="http://www.saltedanime.xytex.net/topsite/button.php?u=anime_hours" alt="Salted Anime 100" border="0" class="nav"/></a>';
    scroll2.block[2] = '<a href="http://mangazine.110mb.com/topsite/" 	    target="_blank"><img src="http://mangazine.110mb.com/topsite/button.php?u=anime_hours"       alt="Mangazine Top Site List" border="0" class="nav"/></a>';

window.onload = function() {
  scroll1.scroll();
  scroll2.scroll();  
}

function scrollObject(main, width, height, direct, pause, speed) {
  var self = this;
  this.main = main;
  this.width = width;
  this.height = height;
  this.direct = direct;
  this.pause = pause;
  this.block = new Array();
  this.offset = (direct == "up" || direct == "down") ? height : width;
  this.speed = Math.max(1.001, Math.min(this.offset, speed));
  this.blockprev = 0;
  this.blockcurr = 1;
  this.motion = false;
  this.mouse = false;
  this.scroll = function() {
    if (!document.getElementById) return false;
    this.main = document.getElementById(this.main);
    while (this.main.firstChild) this.main.removeChild(this.main.firstChild);
    for (var x = 0; x < this.block.length; x++) {
      var table = document.createElement('table');
          table.style.position = "absolute";
          table.style.width = this.width + "px";
          table.style.height = this.height + "px";
          table.style.overflow = "hidden";
          table.cellPadding = table.cellSpacing = table.border = "0";
          table.style.left = table.style.top = "0px";
        if (x) {
          switch (this.direct) {
            case "up": table.style.top = this.height + "px"; break;
            case "down": table.style.top = -this.height + "px"; break;
            case "left": table.style.left = this.width + "px"; break;
            case "right": table.style.left = -this.width + "px"; break;
          }
        }
        var tbody = document.createElement('tbody');
          var tr = document.createElement('tr');
            var td = document.createElement('td');
                td.innerHTML = this.block[x];
              tr.appendChild(td);
            tbody.appendChild(tr);
          table.appendChild(tbody);
      this.main.appendChild(this.block[x] = table);
    }
    this.main.style.position = "relative";
    this.main.style.width = this.width + "px";
    this.main.style.height = this.height + "px";
    this.main.style.overflow = "hidden";
    if (this.block.length > 1) {
      this.main.onmouseover = function() { self.mouse = true; }
      this.main.onmouseout = function() { self.mouse = false; }
      setInterval(function() { self.scrollLoop(); }, this.pause);
    }
  }
  this.scrollLoop = function() {
    if (!this.motion && this.mouse) return false;
    if (!(this.offset = Math.floor(this.offset / this.speed))) {
      var blocknext = (this.blockcurr + 1 >= this.block.length) ? 0 : this.blockcurr + 1;
    } else this.motion = true;
    switch (this.direct) {
      case "up":
        this.block[this.blockcurr].style.top = this.offset + "px";
        this.block[this.blockprev].style.top = (this.offset - this.height) + "px";
        if (!this.offset) this.block[blocknext].style.top = this.height + "px";
        break;
      case "down":
        this.block[this.blockcurr].style.top = -this.offset + "px";
        this.block[this.blockprev].style.top = (this.height - this.offset) + "px";
        if (!this.offset) this.block[blocknext].style.top = -this.height + "px";
        break;
      case "left":
        this.block[this.blockcurr].style.left = this.offset + "px";
        this.block[this.blockprev].style.left = (this.offset - this.width) + "px";
        if (!this.offset) this.block[blocknext].style.left = this.width + "px";
        break;
      case "right":
        this.block[this.blockcurr].style.left = -this.offset + "px";
        this.block[this.blockprev].style.left = (this.width - this.offset) + "px";
        if (!this.offset) this.block[blocknext].style.left = -this.width + "px";
        break;
    }
    if (!this.offset) {
      this.motion = false;
      this.blockprev = this.blockcurr;
      this.blockcurr = blocknext;
      this.offset = (this.direct == "up" || this.direct == "down") ? this.height : this.width;
    } else setTimeout(function() { self.scrollLoop(); }, 30);
  }
}   