/*
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";

ADJUST RANDOM NUMBER TO MAX = TO MAX OFFERS
*/
function setupLinks() {
  arrLinks[0] = "http://www.clickboothlnk.com/e/?enc=czszalkpkieeq&amp;optionalinfo=FSACOM&amp;deployid=0&amp;land=0&amp;pid=0";  arrTitles[0] = "<img src='http://www.clickboothlnk.com/i.php?pubid=505781&amp;banid=13229&amp;dpid=0' border='0'>";
  arrLinks[1] = "http://www.clickboothlnk.com/e/?enc=dhmhkoxcrbryk&amp;optionalinfo=FSACOM&amp;deployid=0&amp;land=0&amp;pid=0";  arrTitles[1] = "<img src='http://www.clickboothlnk.com/i.php?pubid=505781&amp;banid=32347&amp;dpid=0' border='0'>";
  arrLinks[2] = "http://media303.com/z/2888/CD18500/&amp;subid1=FSACOM";  arrTitles[2] = "<img src='http://media303.com/42/18500/2888/&amp;subid1=FSACOM' border='0'>";
  arrLinks[3] = "http://media303.com/z/23764/CD18500/&amp;subid1=FSACOM";  arrTitles[3] = "<img src='http://media303.com/42/18500/23764/&amp;subid1=FSACOM' border='0'>";
  arrLinks[4] = "http://media303.com/z/15977/CD18500/&amp;subid1=FSACOM";  arrTitles[4] = "<img src='http://media303.com/42/18500/15977/&amp;subid1=FSACOM' border='0'>";
  arrLinks[5] = "http://media303.com/z/16240/CD18500/&amp;subid1=FSACOM";  arrTitles[5] = "<img src='http://media303.com/42/18500/16240/&amp;subid1=FSACOM' border='0'>";
  arrLinks[6] = "http://media303.com/z/18425/CD18500/&amp;subid1=FSACOM";  arrTitles[6] = "<img src='http://media303.com/42/18500/18425/&amp;subid1=FSACOM' border='0'>";
  arrLinks[7] = "http://click.linksynergy.com/fs-bin/click?id=AHBq80lhcgI&amp;offerid=85515.10000163&amp;subid=FSACOM&amp;type=4";  arrTitles[7] = "<img src='http://ad.linksynergy.com/fs-bin/show?id=AHBq80lhcgI&amp;bids=85515.10000163&amp;subid=0&amp;type=4&amp;gridnum=4' border='0'>";
  arrLinks[8] = "http://www.shareasale.com/r.cfm?b=139568&amp;u=324159&amp;m=17209&amp;urllink=&amp;afftrack=FSACOM";  arrTitles[8] = "<img src='http://www.shareasale.com/image/125x125_Logo.jpg' border='0'>";
  arrLinks[9] = "http://www.shareasale.com/r.cfm?b=158819&amp;u=324159&amp;m=20606&amp;urllink=&amp;afftrack=FSACOM";  arrTitles[9] = "<img src='http://www.shareasale.com/image/125x125_unlimited.gif' border='0'>";
  arrLinks[10] = "http://www.shareasale.com/r.cfm?b=70305&amp;u=324159&amp;m=10930&amp;urllink=&amp;afftrack=FSACOM";  arrTitles[10] = "<img src='http://www.shareasale.com/image/bidslammer_winmore_125x125.gif' border='0'>";
  arrLinks[11] = "http://www.freestuffapp.com/mailinglistFSACOM.php?utm_source=FSACOM&amp;utm_campaign=FSACOM";  arrTitles[11] = "<img src='http://www.freestuffapp.com/images/freestuffbanner125x125.jpg' border='0'>";
  arrLinks[12] = "http://media303.com/z/9974/CD18500/&amp;subid1=FSACOM";  arrTitles[12] = "<img src='http://media303.com/42/18500/9974/?subid1=FSACOM' border='0'>";
  arrLinks[13] = "http://click.linksynergy.com/fs-bin/click?id=AHBq80lhcgI&amp;offerid=177307.10000077&amp;type=4&amp;subid=FSACOM";  arrTitles[13] = "<img src='http://marcellosparker.com/clients/risesmart/images/banners/round_2/general%20branding%201/125x125_generalbranding.jpg' border='0'>";
  arrLinks[14] = "http://lm.logicalmedia.com/z/1905/CD6788/&amp;subid1=FSACOM";  arrTitles[14] = "<img src='http://lm.logicalmedia.com/42/6788/1905/&amp;subid1=FSACOM' border='0'>";
  arrLinks[15] = "http://lm.logicalmedia.com/z/5927/CD6788/&amp;subid1=FSACOM";  arrTitles[15] = "<img src='http://lm.logicalmedia.com/42/6788/5927/&amp;subid1=FSACOM' border='0'>";
  arrLinks[16] = "http://lm.logicalmedia.com/z/10274/CD6788/&amp;subid1=FSACOM";  arrTitles[16] = "<img src='http://lm.logicalmedia.com/42/6788/10274/&amp;subid1=FSACOM' border='0'>";
  arrLinks[17] = "http://lm.logicalmedia.com/z/8792/CD6788/&amp;subid1=FSACOM";  arrTitles[17] = "<img src='http://lm.logicalmedia.com/42/6788/8792/&amp;subid1=FSACOM' border='0'>";
  arrLinks[18] = "http://lm.logicalmedia.com/z/9732/CD6788/&amp;subid1=FSACOM";  arrTitles[18] = "<img src='http://lm.logicalmedia.com/42/6788/9732/&amp;subid1=FSACOM' border='0'>";
  arrLinks[19] = "http://lm.logicalmedia.com/z/10829/CD6788/&amp;subid1=FSACOM";  arrTitles[19] = "<img src='http://lm.logicalmedia.com/42/6788/10829/&amp;subid1=FSACOM' border='0'>";
  arrLinks[20] = "http://lm.logicalmedia.com/z/10958/CD6788/&amp;subid1=FSACOM";  arrTitles[20] = "<img src='http://lm.logicalmedia.com/42/6788/10958/&amp;subid1=FSACOM' border='0'>";
  arrLinks[21] = "http://media303.com/z/24552/CD18500/?subid1=FSACOM";  arrTitles[21] = "<img src='http://media303.com/42/18500/24552/?subid1=FSACOM' border='0'>";
  arrLinks[22] = "http://lm.logicalmedia.com/z/8896/CD6788/&amp;subid1=FSACOM";  arrTitles[22] = "<img src='http://lm.logicalmedia.com/42/6788/8896/&amp;subid1=FSACOM' border='0'>";
  arrLinks[23] = "http://lm.logicalmedia.com/z/11124/CD6788/&amp;subid1=FSACOM";  arrTitles[23] = "<img src='http://lm.logicalmedia.com/42/6788/11124/&amp;subid1=FSACOM' border='0'>";
  arrLinks[24] = "http://lm.logicalmedia.com/z/11255/CD6788/&amp;subid1=FSACOM";  arrTitles[24] = "<img src='http://lm.logicalmedia.com/42/6788/11255/&amp;subid1=FSACOM' border='0'>";
  arrLinks[25] = "http://click.linksynergy.com/fs-bin/click?id=AHBq80lhcgI&offerid=173504.10000403&amp;subid=FSACOM";  arrTitles[25] = "<img src='http://lm.logicalmedia.com/42/6788/11124/&amp;subid1=FSACOM' border='0'>";
  arrLinks[26] = "http://x.azjmp.com/2swFq?sub=FSACOM";  arrTitles[26] = "<img src='http://lm.logicalmedia.com/42/6788/11255/&amp;subid1=FSACOM' border='0'>";
  arrLinks[27] = "http://x.azjmp.com/2swHH?sub=FSACOM";  arrTitles[27] = "<img src='http://lm.logicalmedia.com/42/6788/11124/&amp;subid1=FSACOM' border='0'>";
  arrLinks[28] = "http://x.azjmp.com/2swL5?sub=FSACOM";  arrTitles[28] = "<img src='http://lm.logicalmedia.com/42/6788/11255/&amp;subid1=FSACOM' border='0'>";
  arrLinks[29] = "http://x.azjmp.com/2swMs?sub=FSACOM";  arrTitles[29] = "<img src='http://lm.logicalmedia.com/42/6788/11124/&amp;subid1=FSACOM' border='0'>";
  arrLinks[30] = "http://x.azjmp.com/2swN9?sub=FSACOM";  arrTitles[30] = "<img src='http://lm.logicalmedia.com/42/6788/11255/&amp;subid1=FSACOM' border='0'>";
  arrLinks[31] = "http://x.azjmp.com/2swQs?sub=FSACOM";  arrTitles[31] = "<img src='http://lm.logicalmedia.com/42/6788/11124/&amp;subid1=FSACOM' border='0'>";
  arrLinks[32] = "http://x.azjmp.com/2swRT?sub=FSACOM";  arrTitles[32] = "<img src='http://lm.logicalmedia.com/42/6788/11255/&amp;subid1=FSACOM' border='0'>";
  arrLinks[33] = "http://x.azjmp.com/2swTl?sub=FSACOM";  arrTitles[33] = "<img src='http://lm.logicalmedia.com/42/6788/11124/&amp;subid1=FSACOM' border='0'>";
  arrLinks[34] = "http://www.clickboothlnk.com/e/?enc=dhmhkoxcrwxox&optionalinfo=FSACOM&deployid=0&land=0&pid=0";  arrTitles[34] = "<img src='http://www.clickboothlnk.com/i.php?pubid=505781&amp;banid=39181&amp;dpid=0' border='0'>";
  arrLinks[35] = "http://www.freestuffapp.com/proflowers.php?utm_source=FSACOM&utm_campaign=ProFlowers&utm_medium=125x125banner";  arrTitles[35] = "<img src='http://www.freestuffapp.com/images/proflowers125x125.jpg' border='0'>";
  arrLinks[36] = "http://lm.logicalmedia.com/z/11044/CD6788/&subid1=FSACOM";  arrTitles[36] = "<img src='http://lm.logicalmedia.com/42/6788/11044/&subid1=FSACOM' border='0'>";
  arrLinks[37] = "http://lm.logicalmedia.com/z/10308/CD6788/&subid1=FSACOM";  arrTitles[37] = "<img src='http://lm.logicalmedia.com/42/6788/10308/&subid1=FSACOM' border='0'>";
  arrLinks[38] = "http://media303.com/z/26408/CD18500/&subid1=FSACOM";  arrTitles[38] = "<img src='http://media303.com/42/18500/26408/&subid1=FSACOM' border='0'>";
  arrLinks[39] = "http://media303.com/z/26389/CD18500/&subid1=FSACOM";  arrTitles[39] = "<img src='http://media303.com/42/18500/26389/&subid1=FSACOM' border='0'>";
  arrLinks[40] = "http://media303.com/z/26399/CD18500/&subid1=FSACOM";  arrTitles[40] = "<img src='http://media303.com/42/18500/26399/&subid1=FSACOM' border='0'>";
  arrLinks[41] = "http://media303.com/z/25942/CD18500/&subid1=FSACOM";  arrTitles[41] = "<img src='http://media303.com/42/18500/25942/&subid1=FSACOM' border='0'>";
  arrLinks[42] = "http://lm.logicalmedia.com/z/11365/CD6788/&subid1=FSACOM";  arrTitles[42] = "<img src='http://lm.logicalmedia.com/42/6788/11365/&subid1=FSACOM' border='0'>";
  arrLinks[43] = "http://lm.logicalmedia.com/z/11400/CD6788/&subid1=FSACOM";  arrTitles[43] = "<img src='http://lm.logicalmedia.com/42/6788/11400/&subid1=FSACOM' border='0'>";
  arrLinks[44] = "http://lm.logicalmedia.com/z/11625/CD6788/&subid1=FSA";  arrTitles[44] = "<img src='http://lm.logicalmedia.com/42/6788/11625/&subid1=FSACOM' border='0'>";
  arrLinks[45] = "http://lm.logicalmedia.com/z/8314/CD6788/&subid1=FSA";  arrTitles[45] = "<img src='http://lm.logicalmedia.com/42/6788/8314/&subid1=FSACOM' border='0'>";
  arrLinks[46] = "http://lm.logicalmedia.com/z/10295/CD6788/&subid1=FSA";  arrTitles[46] = "<img src='http://lm.logicalmedia.com/42/6788/10295/&subid1=FSACOM' border='0'>";
  arrLinks[47] = "http://lm.logicalmedia.com/z/11237/CD6788/&subid1=FSA";  arrTitles[47] = "<img src='http://lm.logicalmedia.com/42/6788/11237/&subid1=FSACOM' border='0'>";
  arrLinks[48] = "http://x.azjmp.com/2wMYn?sub=FSACOM";  arrTitles[48] = "<img src='http://images-cdn.azoogleads.com/ssa/8516_banners/390447.gif' border='0'>";
  arrLinks[49] = "http://www.inteletrack.com/ez/dhwxhcxwhrr/&subid1=FSACOM";  arrTitles[49] = "<img src='http://www.inteletrack.com/42/5915/19533/&subid1=FSACOM' border='0'>";
  arrLinks[50] = "http://www.crisptrk.com/ez/czqkzpekaeq/&dp=0&l=0&p=0";  arrTitles[50] = "<img src='http://www.inteletrack.com/42/5915/21729/&subid1=FSACOM' border='0'>";
  arrLinks[51] = "http://www.crisptrk.com/ez/dhwxhcbyksx/&dp=0&l=0&p=0";  arrTitles[51] = "<img src='http://www.inteletrack.com/42/5915/24761/&subid1=FSACOM' border='0'>";
}
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;
  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;
	var randomnumber=Math.floor(Math.random()*51);
    arrCursor = randomnumber;
    if (arrCursor>arrMax)
      arrCursor=0;
    setLink();
  }
  if (iScroll==m_Height) {
    pause();
    m_iInterval = setTimeout(resume, 6000);
  }
  base.scrollTop=iScroll;
}
function pause() {
  clearInterval(m_iInterval);
}
function resume() {
  m_iInterval = setInterval(ontimer, 10);
}
