var scObj1 = new scrollObject("scObj1", "sRoll", 225, 60, "transparent", "up", 1.35, 2.7, 30, 5000, "scrollClass");
scObj1.block[0] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n99><b>KnowingYouKnowingMe</b> - A netherlands based company, KnowingYouKnowingMe has awarded a project to build an.....</a></td></tr></table>";
scObj1.block[1] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n97><b>NessyNutri</b> - NessyNutri, a US based company has awarded a project to Cyberindigo to create an application that automates....</a></td></tr></table>";
scObj1.block[2] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n98><b>Zenoost</b> - Zenoost was happy with CNPL work and awarded for more ugrades to their portal.....</a></td></tr></table>";
scObj1.block[3] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n96><b>Finance company</b> - Finance company from US intending to develop a unique subscription based (web) program for....</a></td></tr></table>";
scObj1.block[4] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n95><b>VTS</b> - Cyberindigo's web-based online Trade Show application, which was built for an Irish customer, won the best B2B....</a></td></tr></table>";
scObj1.block[5] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n94><b>James Hackett</b> - Hackett, an Irish lighting company, is another happy customer of Cyberindigo who contributed to this recognition....</a></td></tr></table>";
scObj1.block[6] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n93><b>Likwiditi</b> - Likwiditi, an online beverage gifting application, has awarded a project to implement new designs to the application....</a></td></tr></table>";
scObj1.block[7] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n92><b>Property Greece</b> - A large Real-estate company having its operations in Greece, Cyprus and other european....</a></td></tr></table>";
scObj1.block[8] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n91><b>Snagg</b> - Cyberindigo has won a contract from a US based company to build a toolbar software application....</a></td></tr></table>";
scObj1.block[9] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n90><b>Mice Management</b> - Mice Management, Manama, Baharin has awarded several projects to Cyberindigo as part....</a></td></tr></table>";
scObj1.block[10] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n89><b>APL</b> - Australian Poker League has awarded yet another project to Cyberindigo as part of their continued initiatives....</a></td></tr></table>";
scObj1.block[11] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n88><b>Agent Management System</b> - Cyberindigo has secured a very large contract from US based MLM company to customize & implement....</a></td></tr></table>";
scObj1.block[12] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n87><b>zenoost.com</b> - Norwest Registered Agent - a company incorporated in US has selected CNPL for design , development....</a></td></tr></table>";
scObj1.block[13] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n86><b>Recruiters</b> - Ireland Based Recruitment company has selected Cyberindigo for creating an end-to-end recruitment....</a></td></tr></table>";
scObj1.block[14] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n85><b>Bargainnet</b> - Australian-based company that is providing online platform for buyers & suppliers to transact....</a></td></tr></table>";
scObj1.block[15] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n84><b>Feminine Side of Leadership</b> - US based book publishing company called has selected Cyberindigo creating an online website....</a></td></tr></table>";
scObj1.block[16] = "<table width=100%  border=0 cellspacing=0 cellpadding=0><tr><td width=15 align=left valign=top><img src=images/news_ico.jpg width=7 height=9 vspace=2 /></td><td align=left valign=top><a class=newsheadline href=aboutUs/news.htm#n83><b>Budget Tracker</b> - Budgettracker, an online application similar to mint.com that allows users to manage....</a></td></tr></table>";

/*scObj1.block[2] = "Blocks can contain any HTML including:";
scObj1.block[3] = "Images, tables, links and more";
scObj1.block[4] = "Easy to configure, easy to run, with content automatically centred horizontally and vertically";
scObj1.block[5] = "Have any number of block scrollers running on a single page all with a single JavaScript";
scObj1.block[6] = "View the code for more info!";

var scObj2 = new scrollObject("scObj2", "sThou", 150, 85, "transparent", "up", 1.37, 2.65, 30, 5000, "thoredtxt");
scObj2.block[0] = "<center>\“There isn't a person anywhere, who isn't capable of doing more than he thinks, he can.<br /> - Henry Ford\”</center>";
scObj2.block[1] = "<center>\“This is today's thought<br /> - XYZ\”</center>";
/*scObj2.block[2] = "<img src=\"img/scr/graphic2001.jpg\" alt=\"2001 Graphic\" style=\"width:96px;height:53px;\" />";
scObj2.block[3] = "<img src=\"img/scr/bannerorca150.png\" alt=\"Orca\" style=\"width:150px;height:25px;\" />";
scObj2.block[4] = "<img src=\"img/scr/newsoftware.png\" alt=\"RemoteSlap\" style=\"width:85px;height:80px;\" />";
scObj2.block[5] = "<img src=\"img/scr/graphic2002.jpg\" alt=\"2002 Graphic\" style=\"width:130px;height:60px;\" />";*/

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.active = false;
  this.moving = false;
  this.process = 0;
  this.mouse = false;
  this.scroll = function() {
    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;
        if (this.block.length > 1) {
          divList[i].onmouseover = new Function("if (" + this.objName + ".active) setTimeout(\"" + this.objName + ".scrollWait();\", " + this.objName + ".pause); " + this.objName + ".active = false; " + this.objName + ".mouse = true;");
          divList[i].onmouseout = new Function(this.objName + ".mouse = false;");
        }
      } divList[i].style.overflow = "hidden";
      divList[i].style.width = this.width + "px";
      divList[i].style.height = this.height + "px";
    } this.active = true;
    if (this.block.length > 1) this.process = setTimeout(this.objName + ".scrollLoop();", this.pause);
  }
  this.scrollLoop = function() {
    clearTimeout(this.process);
    if (this.moving == false && this.active == false) return false;
    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>";
      this.moving = false;
      this.process = setTimeout(this.objName + ".scrollLoop();", this.pause);
    } else {
      this.moving = true;
      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";
      } this.process = setTimeout(this.objName + ".scrollLoop();", this.speed);
    }
  }
  this.scrollWait = function() {
    clearTimeout(this.process);
    if (this.active) return false;
    if (!this.mouse) {
      this.active = true;
      this.process = setTimeout(this.objName + ".scrollLoop();", this.pause / 2);
    } else this.process = setTimeout(this.objName + ".scrollWait();", this.pause);
  }
}