// JavaScript Document

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Mike Hudson :: http://www.afrozeus.com */

/*
To change the values in the setupLinks function below.
You will notice there are two arrays for each of Titles and
Links. Currently there are 3 items in each array, but you can easily
expand on that by adding to the array. For example, to add a 4th record,
you would simply include the following 2 lines at the end of setupLinks
function:

arrLinks[3] = "someURL.htm";
arrTitles[3] = "Some title";
*/
function setupLinks() {
  arrLinks[0] = "#";
  arrTitles[0] = "&quot;<strong>Your company is providing for us exceptional service.</strong> Our company started in the home garage and has moved several times as we've grown. Your associates Julie Zagha and Christian kept those changes, provided us with promised rates for specific countries and Julie helped to untangle my personal account from the company one. It was a mess with calling cards, with different personal codes etc. She did that flawlessly. Please share our thanks with Julie and Christian.&quot;<br />Petr Litomisky, Ecogate";
  arrLinks[1] = "#";
  arrTitles[1] = "&quot;After learning about your service through a neighbor and before even switching to your service, <strong>you were willing to assist me</strong> with a continual problem that I have had with my current 'Big' provider for months. You researched my invoice and coached me on how to deal with the local provider. Within two days my service was restored, with lower rates and helpful service.&quot;<br />Thank you,<br />Pamela Marti";
  arrLinks[2] = "#";
  arrTitles[2] = "&quot;After learning about your company from one of your employees, I was skeptical to say the least on how a company could offer such competitive rates and yet provide unmatched service at the same time. <strong>You even lowered my bill by 40%.</strong>&quot;<br />Lt Col. Ed Lewis, USAF Aux.";
  arrLinks[3] = "#";
  arrTitles[3] = "&quot;Thank you for your outstanding help. You and Devon both truly practice <strong>Excellence in Customer Service</strong>.<br />God Bless and Continued Success!&quot;<br />Harry T<br />Insurance Information and Services";
  arrLinks[4] = "#";
  arrTitles[4] = "&quot;Devon, I'd like to thank and commend you on your efforts and professionalism in providing me with customized services that meet my specific business needs. Thank you for your patience as I've attempted to develop a structure that fits my business. <strong>The customer service that you've provided is both customized and done with excellence</strong>.&quot;<br />De'bora V. Johnson<br />Johnson's Entrepreneur Development Services, Inc.<br />Associated with Johnson's Management &amp; Consulting Group";
  arrLinks[5] = "#";
  arrTitles[5] = "&quot;It has been a couple years since CFOToday transferred our phone services to National ComTel, and that has turned out to be one of the best decisions we've ever made! Not only did National Comtel beat the competitors in their pricing, but the peace of mind in knowing that they are in our back pocket is absolutely amazing! The quick, responsive, personal (and professional), proactive, and reliable services are second to none!&quot;<br />Justin Haugen<br />CFOToday";
}

var m_iInterval;
var m_Height;
//window.onload = wl;
var iScroll=0;

var arrLinks;
var arrTitles;

var arrCursor = 0;

var arrMax;
window.onload=wl;

function wl() {
  m_iInterval = setInterval(ontimer, 10);
  var base = document.getElementById("jump_base");

  m_Height = base.offsetHeight;

  var divi = parseInt(m_Height/5);
  m_Height = divi*5;

  var td1 = document.getElementById("td1");
  var td2 = document.getElementById("td2");
  var td3 = document.getElementById("td3");
  td1.height = m_Height-5; // default: m_height-5. Customize as desired.
  td2.height = m_Height-5;
  td3.height = m_Height-5;

  arrLinks = new Array();
  arrTitles = new Array();

  setupLinks();
  arrMax = arrLinks.length-1;
  setLink();
}
function setLink() {
  var ilink = document.getElementById("jump_link");
  ilink.innerHTML = arrTitles[arrCursor];
  ilink.href = arrLinks[arrCursor];
}
function ontimer() {
  var base = document.getElementById("jump_base");
  iScroll+=0.5; // set how fast the scroll animates: the higher, the faster
  if (iScroll>(m_Height*2)) {
    iScroll=0;
    arrCursor++;
    if (arrCursor>arrMax)
      arrCursor=0;
    setLink();
  }
  if (iScroll==m_Height) {
    pause();
    m_iInterval = setTimeout(resume, 5000); // set how long the message displays before scrolling, in milliseconds
  }
  base.scrollTop=iScroll;
}
function pause() {
  clearInterval(m_iInterval);
}
function resume() {
  m_iInterval = setInterval(ontimer, 10);
}