// JavaScript Document
/* This script is developed by Avanish*/

/*
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.seopathfinder.com";
  arrTitles[0] = "Kunal did an outstanding job on my e-commerce website and I got 1st position in Google with the help his excellent team. I’m extremely pleased with his services & commitment. I would highly recommend seopathfinder.com to all who are looking to make a unique presence in online world. Thanks a lot! <br>- <b>Stefan Hunter</b>";
  arrLinks[1] = "http://www.seopathfinder.com";
  arrTitles[1] = "I have been working with kunal since one year and I’m very pleased with the accomplished works so far. He is very passionate towards his work. His team is extremely reliable to work with. They have excellent communication and project management skills. I hope we could go on doing works together for long time. <br>- <b>Felice</b>";
  arrLinks[2] = "http://www.seopathfinder.com";
  arrTitles[2] = "Wow! I have no word to express how I’m pleased with seopathfinder.com. His team did a fantastic job over my website. I got lots of real traffic and signups via his excellent works. Communication skills, respond time, work plan, and timeline was extremely appreciable. Just try it and see magic of SEO. <br>- <b>Michael B.</b>";
  arrLinks[3] = "http://www.seopathfinder.com";
  arrTitles[3] = "We gotcha believe that Seopathfinder.com is incredible in SEO world, the reason that persuaded me to say this is the very professional approach of Kunal towards our work. His approach was very fine; he dealt with every aspects of our work, and provided us the best service we could ever had, so if you are thinking of it then go for it without any hesitation. <br>- <b>Matthew Stevens</b>";
  arrLinks[4] = "http://www.seopathfinder.com";
  arrTitles[4] = "Seopathfinder.com provided us an extraordinary job work for our site, Kunal along with his skillful team completed our job with a great sincerity, before the search engine optimization our site was not even in Google top 100, but now you can notice it top 10, So if you are looking forward to get ranked then Seopathfinder.com is right place for you. <br>- <b>Boris</b>";
  arrLinks[5] = "http://www.seopathfinder.com";
  arrTitles[5] = "After just one month use of Seopathfinder.com services our site traffic showed a tremendous growth, according to Google analytics there are 200 to 400 unique users per day of our site, which were earlier limited to 40-50 users, so this enhancement is the outcome of cumulative and communicative work of Seopathfinder.com, and I express my gratitude toward it. <br>- <b>Shane</b>";
  arrLinks[6] = "http://www.seopathfinder.com";
  arrTitles[6] = "I worked with a lot of seo companies but the basic lacking in their work was punctuality And my this need was fulfilled by excellent on time work of Seopathfinder.com, kunal Not only accomplishes our work but also provides us with best solutions to our various seo problems, and this gives him an upper hand over the others. <br>- <b>Derrick</b>";
}

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;
    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, 10);
}

