Here is the code:

Code:
function slide(thisOne) {
	var theObject = document.getElementById(thisOne);
	var measureTop = parseInt(retrieveComputedStyle(theObject, "top"));
		
	if (measureTop == "0") {		
		theObject.animationTimer = setInterval("moveObject(theObject, 0, 200, 25)", 50);
	} else {
		theObject.animationTimer = setInterval("moveObject(theObject, 0, 0, 25)", 50);
	}
}
I am trying to use the variable "theObject" to pass a value to setInterval.
But I keep getting the error that "theObject" is not defined. But I have tested it with an "alert" just before the "if" statement and I know that not only is it defined, but it has the correct value.

Why won't setInterval recognise the variable? Is there a way to get this to work?

Thanks.