I'm using a javascript news scroller in my site. It basically scrolls latest news titles horizontally across the screen.

The script works fine in a standard html page and also in the template file that I created in DreamweaverMX. The problem is that when I update all the other pages via the template page the scroller doesn't work on those pages.

I put the following script in between my header tags:

Code:
 
<SCRIPT LANGUAGE="JavaScript1.2">
// By Ernst Straka (ernst.straka@central-europe.basf.org http://www.rs-systems.at/straka)
// Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
var l1 =   0; // left of ticker in pixel, or 0 to position relative
var t1 =   0; // top of ticker in pixel, or 0 to position relative
var w1 = 400; // width of ticker in pixel
var ie = document.all ? true : false;
var first = true;
var l2 = l1 + w1;
var l3 = l1 - l2;
var l = l2;
function tickinit() {
if (ie) {
if (l1 == 0 && t1 == 0) {
pos = document.all['tickpos'];
l1 = getLeft(pos);
t1 = getTop(pos);
}
ticktext.style.posTop = t1;
}
else {
if (l1 == 0 && t1 == 0) {
pos = document.anchors['tickpos'];
l1 = pos.x;
t1 = pos.y;
}
document.ticktext.pageY = t1;
}
l2 = l1 + w1;
l3 = l1 - l2;
l = l2;
setInterval('tick()',100);
}
function getLeft(ll) {
if (ll.offsetParent)
return (ll.offsetLeft + getLeft(ll.offsetParent));
else 
return (ll.offsetLeft);
}
function getTop(ll) {
if (ll.offsetParent)
return (ll.offsetTop + getTop(ll.offsetParent));
else
return (ll.offsetTop);
}
function tick() {
l = l - 10;
if (l < l3) l = l2;
cl = l1 - l;
cr = l2 - l;
if (ie) {
ticktext.style.posLeft = l;
ticktext.style.posTop = t1;
ticktext.style.clip = "rect(auto "+cr+"px auto "+cl+"px)";
if (first) ticktext.style.visibility = "visible";
}
else {
document.ticktext.pageX = l;
document.ticktext.clip.left = cl;
document.ticktext.clip.right = cr;
if (first) document.ticktext.visibility = "show";
}
first = false;
}
</script>
and the following in between the BODY tags where the ticker will appear on the page:

Code:
 
<a name="tickpos"> </a>
<div id="ticktext" style="position: absolute; font-family: arial; font-size: 14pt; visibility: hidden; left: 101; top: 291; width: 600; height: 24">
<nobr>SimplytheBest DHTML scripts & JavaScripts  <img border="0" src="../images/arrowblue.gif" width="10" height="12"> <a href="dhtml_scripts.html">Click here</a> to enter</nobr>
</div>
and finally this inside the opening BODY tag:

Code:
 
OnLoad="tickinit()"
Could anyone explain why this might not work after updating the template with the javascript and then saving the changes to all the other web pages?? (Or maybe direct me to another script that will work in a template based site.)

Thanks