| 1 |
/* $Id: taxonomy_ticker.js,v 1.4 2006/09/16 20:49:44 gjmjr Exp $ */
|
| 2 |
/* Code : laurent -- koumbit.net */
|
| 3 |
|
| 4 |
function startTicker(){
|
| 5 |
initScrolling();
|
| 6 |
}
|
| 7 |
|
| 8 |
function initScrolling(){
|
| 9 |
var scrollIntervall = (document.getElementById("scrollerClipper").style.zIndex) * 10 ;
|
| 10 |
document.scrollerIntervalID = window.setInterval("doScroll()", scrollIntervall);
|
| 11 |
}
|
| 12 |
|
| 13 |
function doScroll(){
|
| 14 |
var scrollPane = document.getElementById("scrollPane");
|
| 15 |
var crntPos = parseInt(scrollPane.style.top)
|
| 16 |
scrollPane.style.top = (crntPos - 1) + "px";
|
| 17 |
|
| 18 |
if(Math.abs(crntPos) >= scrollPane.scrollHeight){
|
| 19 |
scrollPane.style.top = "0px";
|
| 20 |
}
|
| 21 |
}
|
| 22 |
|
| 23 |
function pauseScroll() {
|
| 24 |
clearInterval(document.scrollerIntervalID);
|
| 25 |
}
|
| 26 |
|
| 27 |
function reStartScroll() {
|
| 28 |
var scrollIntervall = (document.getElementById("scrollerClipper").style.zIndex) * 10 ;
|
| 29 |
document.scrollerIntervalID = window.setInterval("doScroll()", scrollIntervall);
|
| 30 |
}
|
| 31 |
|
| 32 |
if (Drupal.jsEnabled) {
|
| 33 |
$(document).ready(startTicker);
|
| 34 |
}
|