isIE4 = (document.all) ? 1 : 0;
isW3C = (document.getElementById && !document.all) ? 1 : 0;

function verScroll(direction,loop) {
  scrolltimer = null

  if (document.getElementById('text_it').style.display != "none") {
    if (isIE4) {
      position = document.all.text_it.offsetTop
      height = document.all.text_it.offsetHeight
    }
    if (isW3C) {
      docObj = document.getElementById("text_it")
      position = parseInt(document.defaultView.getComputedStyle(docObj,"").getPropertyValue("top"))
      height = parseInt(document.defaultView.getComputedStyle(docObj,"").getPropertyValue("height"))
    }
    visible = height + position
    if (direction == "dn" && visible > 200) {
      newposition = position - 1
      document.getElementById('text_it').style.top = newposition + "px"
      scrolltimer = setTimeout("verScroll('dn')",1)
    }
    if (direction == "up" && position < 0) {
      newposition = position + 1
      document.getElementById('text_it').style.top = newposition + "px"
      scrolltimer = setTimeout("verScroll('up')",1)
    }
  }

  else if (document.getElementById('text_orig').style.display != "none") {
    if (isIE4) {
      position = document.all.text_orig.offsetTop
      height = document.all.text_orig.offsetHeight
    }
    if (isW3C) {
      docObj = document.getElementById("text_orig")
      position = parseInt(document.defaultView.getComputedStyle(docObj,"").getPropertyValue("top"))
      height = parseInt(document.defaultView.getComputedStyle(docObj,"").getPropertyValue("height"))
    }
    visible = height + position
    if (direction == "dn" && visible > 200) {
      newposition = position - 1
      document.getElementById('text_orig').style.top = newposition + "px"
      scrolltimer = setTimeout("verScroll('dn')",1)
    }
    if (direction == "up" && position < 0) {
      newposition = position + 1
      document.getElementById('text_orig').style.top = newposition + "px"
      scrolltimer = setTimeout("verScroll('up')",1)
    }
  }

}

function stopScroll() {
  loop = false
  clearTimeout(scrolltimer)
}
