Hi.

I have the following javascript code:

var ivScroll;

function scrollHoriz (nScrollX)
{
if (window.scrollX < nScrollX) {
window.scrollBy(10, 0);
} else {
clearInterval (ivScroll);
}
}

function scrollMe (nScrollX, nInterv)
{
nInterv = setInterval ("scrollHoriz("+nScrollX+")", 10);

}

When I do scrollMe (300, ivScroll), the part where it should clear the
interval doesn't work. I've checked and it does get to the else clause, so the
problem is that the ivScroll variable being used is not the one I defined
globally. I'm fairly new to javascript, so can someone please solve this scope
problem for me? Thank you.

Jo?o