/* 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.vljlaw.com/results.htm";
  arrTitles[0] = "<h1><strong>$7,550,000.00</strong></h1><br><strong>Pinellas County, Florida</strong><br><br>Serious orthopedic injuries, and closed head injury resulting in permanent brain damage.";
  arrLinks[1] = "http://www.vljlaw.com/results.htm";
  arrTitles[1] = "<h1><strong>$7,368,000.00</strong></h1><br><strong>Pinellas County, Florida</strong><br><br>Closed head injury resulting in permanent brain damage.";
  arrLinks[2] = "http://www.vljlaw.com/results.htm";
  arrTitles[2] = "<h1><strong>$4,000,000.00</strong></h1><br><strong>Hillsborough County, Florida</strong><br><br>Serious personal injuries resulting in RSD and permanent total disability.";
  arrLinks[3] = "http://www.vljlaw.com/results.htm";
  arrTitles[3] = "<h1><strong>$3,500,000.00</strong></h1><br><strong>Pinellas County, Florida</strong><br><br>Serious personal injuries including fractured cervical spine and paralysis.";
  arrLinks[4] = "http://www.vljlaw.com/results.htm";
  arrTitles[4] = "<h1><strong>$3,010,000.00</strong></h1><br><strong>Pinellas County, Florida</strong><br><br>Serious personal injuries and closed head injury to a minor.";
  arrLinks[5] = "http://www.vljlaw.com/results.htm";
  arrTitles[5] = "<h1><strong>$1,977,009.90</strong></h1><br><strong>Marion County, Florida</strong><br><br>Serious personal injuries including broken hip and fractured pelvis.";
  arrLinks[6] = "http://www.vljlaw.com/results.htm";
  arrTitles[6] = "<h1><strong>$1,910,000.00</strong></h1><br><strong>Hillsborough County, Florida</strong><br><br>Wrongful death.";
  arrLinks[7] = "http://www.vljlaw.com/results.htm";
  arrTitles[7] = "<h1><strong>$1,750,000.00</strong></h1><br><strong>Okeechobee County, Florida</strong><br><br>Serious personal injuries including spinal injury resulting in permanent incontinence.";
  arrLinks[8] = "http://www.vljlaw.com/results.htm";
  arrTitles[8] = "<h1><strong>$1,631,294.43</strong></h1><br><strong>Hillsborough County, Florida</strong><br><br>Serious orthopedic injuries.";
  arrLinks[9] = "http://www.vljlaw.com/results.htm";
  arrTitles[9] = "<h1><strong>$1,500,000.00</strong></h1><br><strong>Pinellas County, Florida</strong><br><br>Serious personal injuries and insurer bad faith.";
  arrLinks[10] = "http://www.vljlaw.com/results.htm";
  arrTitles[10] = "<h1><strong>$1,400,000.00</strong></h1><br><strong>Orange County, Florida</strong><br><br>Serious personal injuries and insurer bad faith.";
  arrLinks[11] = "http://www.vljlaw.com/results.htm";
  arrTitles[11] = "<h1><strong>$1,134,000.00</strong></h1><br><strong>Hillsborough County, Florida</strong><br><br>Serious personal injuries.";
  arrLinks[12] = "http://www.vljlaw.com/results.htm";
  arrTitles[12] = "<h1><strong>$1,000,000.00</strong></h1><br><strong>Hernando County, Florida</strong><br><br>Closed head injury resulting in wrongful death.";
  arrLinks[13] = "http://www.vljlaw.com/results.htm";
  arrTitles[13] = "<h1><strong>$1,000,000.00</strong></h1><br><strong>Beaufort, South Carolina</strong><br><br>Failure to diagnose resulting in amputation.";
  arrLinks[14] = "http://www.vljlaw.com/results.htm";
  arrTitles[14] = "<strong>Disclaimer</strong> - *While many cases resolve with confidentiality clauses that prohibit disclosure of case details, we at Vaka, Larson, and Johnson, P.L. take our clients' confidences very seriously and have listed actual results without disclosing identifying information to protect our clients' confidentiality in all cases.";
}	

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+=1;
  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);
}
