/* 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] = "http://www.shininglightworks.com";
  arrTitles[0] = "AdvBT exceeded my expectations. I love my website! AdvBT took my requirements for my site and transformed them into a work of art.  AdvBT was cost efficient and extremely quick with the development of my website.  My website was up and running ahead of schedule...";
  arrLinks[1] = "http://www.shininglightworks.com";
  arrTitles[1] = "It has been a blessing and a pleasure working with AdvBT.  I highly recommend AdvBT to any person or business looking for professional, personable, and quality service. <br> Robin L. Anderson, Author- <br>Out of the Box - Releasing the Spirit Within<br> ShiningLightWorks.com";
  arrLinks[2] = "http://www.janetperkinsontheweb.com";
  arrTitles[2] = "Doing business with AdvBT is doing business God's way with excellence. AdvBT not only has the ability to concept ideas, they are also creative in website design.  I am very pleased with their services. <br>Janet Perkins, author of <br>The Pursuit of Excellence <br>JanetPerkinsontheweb.com";
arrLinks[3] = "";
arrTitles[3] = "A Blessing and a gift from God.  Is all I need to say about AdvBT and the work that they do.<br>  Gary Blanks";
arrLinks[4] = "http://www.lamarrgulley.com";
arrTitles[4] = "In my business, image is everything.  AdvBT helped me take my business image from 'also-ran' to 'stand-out' almost overnight! My customers from NYC to ATL are VERY impressed by my website--as are we!!! <br>Lamarr Gulley Voice Talent/President <br>Voice Visions, Productions, LLC <br>LamarrGulley.com";
arrLinks[5] = "http://www.crownedforvictory.org";
arrTitles[5] = "GREAT JOB!  Your service and work on the website is awesome.  We are very pleased with our website and it represents us well. <br> Eddie and Carlia Jones - Founders <br> Crowned for Victory, Inc."
arrLinks[6] = "http://www.trainingresults.net";
arrTitles[6] = "The work that AdvBT did on my web site for Training for Results, LLC is 'superb.'  Their expertise and experience in web design are truly appreciated.  Best of all, I love their customer service.  They are flexible, patient, and they listen.  Thank you AdvBT, for using your gifts and talents to bring to life the vision that I have for my web site. <br>Celeste M. Tibbs, Principal"
arrLinks[7] = "http://www.shondathompson.com";
arrTitles[7] = "Thank you for your professionalism and a great job on my webpage. My website is great. It was quick, professional and no stress. I told you what I wanted and you brought it to life. <br> Shonda Thompson-Jefferson "

}

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, 40);
  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;
  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+=5;
  if (iScroll>(m_Height*2)) {
    iScroll=0;
    arrCursor++;
    if (arrCursor>arrMax)
      arrCursor=0;
    setLink();
  }
  if (iScroll==m_Height) {
    pause();
    m_iInterval = setTimeout(resume, 4000);
  }
  base.scrollTop=iScroll;
}
function pause() {
  clearInterval(m_iInterval);
}
function resume() {
  m_iInterval = setInterval(ontimer, 20);
}

