/* 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] = "index.htm";
  arrTitles[0] = "Your service was excellent, and quick. I love my talisman. ~Mary.";
  arrLinks[1] = "index.htm";
  arrTitles[1] = "I want to thank you for being so helpful in getting my order shipped in time for my daughters birthday. She loves her present. ~Julie";
  arrLinks[2] = "index.htm";
  arrTitles[2] = "I shopped all over before I finally decided to buy from you. I will be back! ~Patti";
  arrLinks[3] = "index.htm";
  arrTitles[3] = "I can't tell you how impressed I am with your quick response and great service! ~Rebekah";
  arrLinks[4] = "index.htm";
  arrTitles[4] = "I am impressed with the quality. I've had my pendant for over a year and no tarnish. ~Fiona";
  arrLinks[5] = "index.htm";
  arrTitles[5] = "Thank you for carrying this euphorical incense! The Flora is extra special! ~Jennifer";
  arrLinks[6] = "index.htm";
  arrTitles[6] = "I just picked up my pendants at the post office. I love them! Thank you! ~R.";
  arrLinks[7] = "index.htm";
  arrTitles[7] = "I must say that you are an unusually ethical on-line company. I appreciate your doing what you say you will. ~Glenda.";
  arrLinks[8] = "index.htm";
  arrTitles[8] = "Very good price. Didn't expect such a nice product. ~Cheryl.";
  arrLinks[9] = "index.htm";
  arrTitles[9] = "Well priced and honest shipping charges. ~Steven.";
  arrLinks[10] = "index.htm";
  arrTitles[10] = "I received my ritual kit and will let you know how it goes. Thank for getting it here on time. ~B.W.";
  arrLinks[11] = "index.htm";
  arrTitles[11] = "Wow! I love love love love my necklace. Thank you! ~V.";
  arrLinks[12] = "index.htm";
  arrTitles[12] = "You are doing fantastic i love this place it is so spiritual ~S.";
}

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, 60);
  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, 60);
}
