/* **************************************************************************
*** GreyWyvern's HTML Block Scroller & Marquee ******************************
*****************************************************************************
* HTML Block Scroller & Marquee JavaScript - v1.3 - Coded by GreyWyvern
*  - Copyright 2003 - Licenced for free distribution under the GPL
*  - W3C DOM compliant!*/

var scObj1 = new scrollObject("scObj1", "sMain", 127, 73, "transparent", "up", 1.35, 2.7, 30, 3000, "scrollClass");
scObj1.block[0] = "<img src=\"/images/l_netapp.gif\" width=\"127\" height=\"73\">";
scObj1.block[1] = "<img src=\"/images/l_vmware.gif\" width=\"127\" height=\"73\">";
scObj1.block[2] = "<img src=\"/images/l_cisco.gif\" width=\"127\" height=\"73\">";
scObj1.block[3] = "<img src=\"/images/l_riverbed.gif\" width=\"127\" height=\"73\">";
scObj1.block[4] = "<img src=\"/images/l_commvault.gif\" width=\"127\" height=\"73\">";
scObj1.block[5] = "<img src=\"/images/l_equallogic.gif\" width=\"127\" height=\"73\">";
scObj1.block[6] = "<img src=\"/images/l_symantec.gif\" width=\"127\" height=\"73\">";
scObj1.block[7] = "<img src=\"/images/l_wyse.gif\" width=\"127\" height=\"73\">";
scObj1.block[8] = "<img src=\"/images/l_ibm.gif\" width=\"127\" height=\"73\">";
scObj1.block[9] = "<img src=\"/images/l_dell.gif\" width=\"127\" height=\"73\">";
scObj1.block[10] = "<img src=\"/images/l_hp.gif\" width=\"127\" height=\"73\">";
scObj1.block[11] = "<img src=\"/images/l_quantum.gif\" width=\"127\" height=\"73\">";
scObj1.block[12] = "<img src=\"/images/l_bakbone.gif\" width=\"127\" height=\"73\">";
scObj1.block[13] = "<img src=\"/images/l_emulex.gif\" width=\"127\" height=\"73\">";
scObj1.block[14] = "<img src=\"/images/l_data-domain.gif\" width=\"127\" height=\"73\">";
scObj1.block[15] = "<img src=\"/images/l_qlogic.gif\" width=\"127\" height=\"73\">";
scObj1.block[16] = "<img src=\"/images/l_brocade.bmp\" width=\"127\" height=\"73\">";



/*scObj1.block[1] = "<img src=\"/images/l_netapp.gif\" width=\"127\" height=\"73\">";
scObj1.block[2] = "<img src=\"/images/l_overland.gif\" width=\"127\" height=\"73\">";
scObj1.block[4] = "<img src=\"/images/l_westerndigital.gif\" width=\"127\" height=\"73\">";
scObj1.block[8] = "<img src=\"/images/l_amerivault.gif\" width=\"127\" height=\"73\">";
scObj1.block[9] = "<img src=\"/images/l_virtualiron.gif\" width=\"127\" height=\"73\">";
scObj1.block[11] = "<img src=\"/images/l_storevault.gif\" width=\"127\" height=\"73\">";
scObj1.block[12] = "<img src=\"/images/l_commvault.gif\" width=\"127\" height=\"73\">";
scObj1.block[14] = "<img src=\"/images/l_vmware.gif\" width=\"127\" height=\"73\">";*/


var scObj2 = new scrollObject("scObj2", "sMain2", 165, 102, "transparent", "down", 1.35, 2.7, 30, 6000, "scrollClass");
scObj2.block[0] = "<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"165\" id=\"ad8\"><p><a href=\"/products-network-hardware.asp#vtl\">go&nbsp;&nbsp;<img src=\"/images/i_arrow-white.gif\" width=\"7\" height=\"5\" border=\"0\" /></a></p></td></tr></table>";
scObj2.block[1] = "<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"165\" id=\"inn-vmware-ad\"><a href=\"/contact.asp\">There's 70% more capacity in your datacenter. EchoStor and VMware will help you find it. Learn more about our server consolidation solution. Go!</a></td></tr></table>";
scObj2.block[2] = "<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"165\" id=\"ad6\"><p>A <strong>simple</strong> and cost effective solution&nbsp;&nbsp;<a href=\"/products-fibre-arrays.asp\">go&nbsp;&nbsp;<img src=\"/images/i_arrow-white.gif\" width=\"7\" height=\"5\" border=\"0\" /></a></p></td></tr></table>";
scObj2.block[3] = "<table width=\"165\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td width=\"165\" id=\"ad7\"><p>Named Best NAS Product of the year &nbsp;<a href=\"/products-network-hardware.asp#fas3000\">go&nbsp;&nbsp;<img src=\"/images/i_arrow-white.gif\" width=\"7\" height=\"5\" border=\"0\" /></a></p></td></tr></table>";



function scrollObject(objName, main, width, height, bkgcol, direct, deccel, begin, speed, pause, classname) {
  this.objName = objName;
  this.main = main;
  this.one = main + "Block1";
  this.two = main + "Block2";
  this.block = new Array();
  this.blockup = 1;
  this.divup = 1;
  this.height = height;
  this.width = width;
  this.bkgcol = bkgcol;
  this.direct = direct;
  this.deccel = Math.max(deccel, 1);
  this.begin = Math.max(Math.min(begin, (direct == "up" || direct == "down") ? height : width), 1);
  this.speed = speed;
  this.pause = pause;
  this.slide = ((direct == "up" || direct == "down") ? height : width) / this.begin;
  this.table = "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td class=\"" + classname + "\" style=\"width:" + width + "px;height:" + height + "px;\">";
  this.scroll = scroll;
  this.scrollLoop = scrollLoop;
}

function scroll() {if (!document.getElementById) return false;
  document.getElementById(this.main).innerHTML = "<div id=\"" + this.one + "\"></div><div id=\"" + this.two + "\"></div>";
  var divList = [document.getElementById(this.main), document.getElementById(this.one), document.getElementById(this.two)];
  for (var i = 0; i <= 2; i++) {
    if (i > 0) {
      divList[i].style.position = "absolute";
      if (this.direct == "up" || this.direct == "down") {
        divList[i].style.left = "0px";
        divList[i].style.top = (i == 1) ? "0px" : ((this.direct == "up") ? "" : "-") + this.height + "px";
      } else {
        divList[i].style.left = (i == 1) ? "0px" : ((this.direct == "left") ? "" : "-") + this.width + "px";
        divList[i].style.top = "0px";
      } divList[i].innerHTML = this.table + this.block[i - 1] + "</td></tr></table>";
    } else {
      divList[i].style.position = "relative";
      divList[i].style.background = this.bkgcol;
    }
    divList[i].style.width = this.width + "px";
    divList[i].style.height = this.height + "px";
    divList[i].style.overflow = "hidden";
  } setTimeout(this.objName + ".scrollLoop();", this.pause);
}

function scrollLoop() {
  var divList = [document.getElementById(this.main), document.getElementById(this.one), document.getElementById(this.two)];
  this.slide = Math.max(this.slide / this.deccel, 1);
  var slideInc = (this.direct == "up" || this.direct == "left") ? -parseInt(this.slide) : parseInt(this.slide);
  if ((this.direct == "up" && Math.max(parseInt(divList[1].style.top) + slideInc, parseInt(divList[2].style.top) + slideInc) <= 0) ||
      (this.direct == "down" && Math.min(parseInt(divList[1].style.top) + slideInc, parseInt(divList[2].style.top) + slideInc) >= 0) ||
      (this.direct == "left" && Math.max(parseInt(divList[1].style.left) + slideInc, parseInt(divList[2].style.left) + slideInc) <= 0) ||
      (this.direct == "right" && Math.min(parseInt(divList[1].style.left) + slideInc, parseInt(divList[2].style.left) + slideInc) >= 0)) {
    this.slide = ((this.direct == "up" || this.direct == "down") ? this.height : this.width) / this.begin;
    if (++this.blockup >= this.block.length) this.blockup = 0;
    this.divup = (this.divup == 1) ? 2 : 1;
    if (this.direct == "up" || this.direct == "down") {
      divList[3 - this.divup].style.top = ((this.direct == "down") ? "-" : "") + this.height + "px";
      divList[this.divup].style.top = "0px";
    } else {
      divList[3 - this.divup].style.left = ((this.direct == "right") ? "-" : "") + this.width + "px";
      divList[this.divup].style.left = "0px";
    } divList[3 - this.divup].innerHTML = this.table + this.block[this.blockup] + "</td></tr></table>";
    setTimeout(this.objName + ".scrollLoop();", this.pause);
  } else {
    for (var j = 1; j <= 2; j++) {
      if (this.direct == "up" || this.direct == "down") {
        divList[j].style.top = (parseInt(divList[j].style.top) + slideInc) + "px";
      } else divList[j].style.left = (parseInt(divList[j].style.left) + slideInc) + "px";
    } setTimeout(this.objName + ".scrollLoop();", this.speed);
  }
}