/* 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] = "http://www.zimmathematics.com/htm/CreativeAxiomList.htm#NumberLine";
 arrTitles[0] = "Principal System Component Transformations give Number Line ";
 arrLinks[1] = "http://www.zimmathematics.com/htm/application_Page_2.htm#AnswerQuestion";
 arrTitles[1] = "Answer-Question Math., within the System-Sub System Paradigm";
 arrLinks[2] = "http://www.zimmathematics.com/htm/CreativeAxiomList.htm#Algebra";
 arrTitles[2] = "Systems - Sub Systems 'Algebra'";
 arrLinks[3] = "http://www.zimmathematics.com/htm/Math_Stories.htm";
 arrTitles[3] = "Science takes on THE Universe, Sector A & Sector Z - A Math Story";
 arrLinks[4] = "http://www.zimmathematics.com/htm/app.htm#Coexistant";
 arrTitles[4] = "System - Sub System Dynamic Expressed in a Venn Diagram";
 arrLinks[5] = "http://www.zimmathematics.com/htm/app.htm#ItemsEvents";
 arrTitles[5] = "Item and Event(s) ClockA + Item(s) and Event SpaceB<br> =>Item(s)/Event(s) C;   Existential / Relativity";
 arrLinks[6] = "http://www.zimmathematics.com/htm/app.htm#ItemsEvents";
 arrTitles[6] = "Object Analysis in Item and/or Event Terms and their Expressions";
 arrLinks[7] = "http://www.zimmathematics.com/htm/application_Page_2.htm#NonEquality";
 arrTitles[7] = "A Non Equality Axiom";
 arrLinks[8] = "http://www.zimmathematics.com/htm/application_Page_2.htm#MathFarm";
 arrTitles[8] = "Zim Math Farms - Concept/Applications";
 arrLinks[9] = "http://www.zimmathematics.com/htm/app.htm#Coexistant";
 arrTitles[9] = "Universe as a Logical Derivation and not the origin of some Item/Event";
 arrLinks[10] = "http://www.zimmathematics.com/htm/application_Page_2.htm#Uncondtional";
 arrTitles[10] = "Unconditional Logic and Systems and Sub Systems";
 arrLinks[11] = "http://www.zimmathematics.com/htm/ZimMathGames_Game_Developing.htm";
 arrTitles[11] = "f(1,0) = + - × / ; Expression of 'Original State'";

 //arrTitles[1] = "Tree of Life, Tree of Knowledge, Non-Logic";
  //arrLinks[2] = "Unconditional Logic and Systems and Sub Systems";
  //arrTitles[2] = "Political Expression with Partial System Transformations";
}

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);
}
