﻿// JScript File

/* 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] = "<a href=\"porfolio.aspx\" ><img src=\"images/portfolio-img.jpg\" alt=\"\" width=\"180\" style=\"border:0\" height=\"134\" hspace=\"10\" vspace=\"5\" /></a>";
  /*arrLinks[0] = "<a href='porfolio.aspx'></a>";
  arrTitles[0] = "<img src=\"images/02.jpg\" alt=\"\" width=\"245\" style=\"border:0\" height=\"265\" hspace=\"10\" vspace=\"5\" />";
  arrTitles1[0]="<strong>Category</strong> - Static"
  arrTitles2[0]="<strong>Discriptions</strong> - Mrs. Geeta K Maurya established MS Tutorials with an aim to cater and nurture students of varied IQ levels."
*/
  arrLinks[0] = "porfolio.aspx";
  arrTitles[0] = "<img src=\"images/01.jpg\" alt=\"\" width=\"245\" style=\"border:0\" height=\"265\" hspace=\"10\" vspace=\"5\" />";
  arrTitles1[0]="<strong>Category</strong> - Dynamic ";
  arrTitles2[0]="<strong>Discriptions</strong> - NSE Today is a website for all the news and updates. The website has live streaming, gives the latest sensex updates and is one stop place for all stock market news."

  /*arrLinks[2] = "porfolio.aspx";
  arrTitles[2] = "<img src=\"images/03.jpg\" alt=\"\" width=\"245\" style=\"border:0\" height=\"265\" hspace=\"10\" vspace=\"5\" />";
  arrTitles1[2]="<strong>Category</strong> - Dynamic ";
  arrTitles2[2]="<strong>Discriptions</strong> - E Shop is a full fledged e-commerce website with products diverse and products list- exhaustive. A sturdy database and interactive user interface is the USP of this website."
  */
  arrLinks[1] = "porfolio.aspx";
  arrTitles[1] = "<img src=\"images/04.jpg\" alt=\"\" width=\"245\" style=\"border:0\" height=\"265\" hspace=\"10\" vspace=\"5\" />";
  arrTitles1[1]="<strong>Category</strong> - Dyanmic";
  arrTitles2[1]="<strong>Discriptions</strong> - Shoppers heaven is what it says it is- a paradise for all shopaholics. This e-commerce website is high on  functionality and usability with a aptly integrated shopping cart and payment gateway."
  
  arrLinks[2] = "porfolio.aspx";
  arrTitles[2] = "<img src=\"images/05.jpg\" alt=\"\" width=\"245\" style=\"border:0\" height=\"265\" hspace=\"10\" vspace=\"5\" />";
  arrTitles1[2]="<strong>Category</strong> - Dynamic";
  arrTitles2[2]="<strong>Discriptions</strong> - Shopping Mall India is a full fledged e-commerce website with products diverse and products list- exhaustive. A sturdy database and interactive user interface is the USP of this website."
  
  arrLinks[3] = "porfolio.aspx";
  arrTitles[3] = "<img src=\"images/orchard.jpg\" alt=\"\" width=\"245\" style=\"border:0\" height=\"265\" hspace=\"10\" vspace=\"5\" />";
  arrTitles1[3]="<strong>Category</strong> - Dynamic";
  arrTitles2[3]="<strong>Discriptions</strong> - Orchard Collection is a B2B e-commerce website with products diverse and products list- exhaustive. A sturdy database and interactive user interface is the USP of this website."
  
   arrLinks[4] = "porfolio.aspx";
  arrTitles[4] = "<img src=\"images/ai.jpg\" alt=\"\" width=\"245\" style=\"border:0\" height=\"265\" hspace=\"10\" vspace=\"5\" />";
  arrTitles1[4]="<strong>Category</strong> - Static";
  arrTitles2[4]="<strong>Discriptions</strong> - AI Services is a static website for career consultanting firm. A creative design and interactive user interface is the USP of this website."
}

var m_iInterval;
var m_Height;
//window.onload = wl;
var iScroll=0;

var arrLinks;
var arrTitles;
var arrTitles1;
var arrTitles2;


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();
  arrTitles1 = new Array();
  arrTitles2 = new Array();
//debugger
  setupLinks();
  arrMax = arrLinks.length-1;
  setLink();
}
function setLink() {
  var ilink = document.getElementById("jump_link");
  ilink.innerHTML = arrTitles[arrCursor] + "<br/>" + arrTitles1[arrCursor] + "<br/>" + arrTitles2[arrCursor];
  //ilink.innerHTML=
  //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);
}