function setupLinks() {
  arrLinks[0] = "contacto/index.php";
  arrTitles[0] = "<font color=red><b>CONSULTA ONLINE</b></font>";
  arrLinks[1] = "contacto/index.php";
  arrTitles[1] = "<font color=red><b>CONSULTA ONLINE</b></font>";
  arrLinks[2] = "contacto/index.php";
  arrTitles[2] = "<font color=red><b>CONSULTA ONLINE</b></font>";
  arrLinks[3] = "contacto/index.php";
  arrTitles[3] = "<b>La primera consulta</b>";
  arrLinks[4] = "contacto/index.php";
  arrTitles[4] = "<b>enviada desde la web</b>";
  arrLinks[5] = "contacto/index.php";
  arrTitles[5] = "<b>es gratuita.</b>";
  arrLinks[6] = "contacto/index.php";
  arrTitles[6] = "<b>Consultas presenciales</b>";
  arrLinks[7] = "contacto/index.php";
  arrTitles[7] = "<b>solicitar cita</b>";
  arrLinks[8] = "contacto/index.php";
  arrTitles[8] = "<b>telf.: <font color=red>932 171 884</b></font>";
  arrLinks[9] = "contacto/index.php";
  arrTitles[9] = "<b>telf.: <font color=red>932 171 884</b></font>";
  arrLinks[10] = "contacto/index.php";
  arrTitles[10] = "<b>telf.: <font color=red>932 171 884</b></font>";
  arrLinks[11] = "contacto/index.php";
  arrTitles[11] = " ";
}

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, 5);
  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, 1000);
  }
  base.scrollTop=iScroll;
}
function pause() {
  clearInterval(m_iInterval);
}
function resume() {
  m_iInterval = setInterval(ontimer, 5);
}
