// 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 andLinks. 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() {
   /*arrTitles[0] = "Relax, don't despair if you have missed the due date of <b>July 31, 2009</b>. It is <b>STILL POSSIBLE to file your I-Tax Returns</b>. Contact us & we would be glad to be of help.";}*/
   /*arrTitles[0] = "<b>LAST DATE</b> for filing your income tax returns is <b>July 31, 2010<b>. To avail of attractive discounts, <a href='contactUs.aspx' class='navContactUs'>Contact Us</a><b> NOW</b>. We would love to be of service to you.";}*/
   /*arrTitles[0] = "<font style='font-size:11px'><b>LATE REQUEST FOR ITR FILING</b><br /><b style='color:#0076a4'>PLEASE NOTE:</b><br />ALL requests for Filing of Income Tax Returns received by us after <b>July 27, 2010</b> would be entertained on a <b>BEST EFFORT BASIS</b> only without any firm commitment as to getting the returns filed on or before the due date of July 31, 2010</font>";}*/
   /*arrTitles[0] = "<font style='font-size:12px'><b>One more last chance!!!</b><br /><br />Please note that <b>August 4, 2010</b> is the new extended due date for filing your i-tax returns. To avail our services,<b><br /><br />Call us at:</b><br />+91-22 6522 9656 <br />+91-22 4215 5202 <br /> +91-22 4215 5203 <br /><br /> OR <br /><br /> <b>Mail us at:</b><br /> contactus@relaxwithtax.com  </font>";}*/
   arrTitles[0] = "Relax, don't despair if you have missed the due date of <b>July 31, 2011</b>. It is <b>STILL POSSIBLE</b> to file your I-Tax Returns. <h3 align='center'><a href='http://www.relaxwithtax.com/App_UI/frmproduct.aspx?Productid=1'>CONTACT US</a></h3>.We would be glad to be of help.";}
   
   
   
   
var m_iInterval;
var m_Height;
//window.onload = wl;
var iScroll=0;

var arrLinks;
var arrTitles;

var arrCursor = 0;

var arrMax;


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, 6000);
  }
  base.scrollTop=iScroll;
}
function pause() {
  clearInterval(m_iInterval);
}
function resume() {
  m_iInterval = setInterval(ontimer, 40);
}
