Code:
stop();
intID = setInterval(goNext, 2000);
function goNext() {
	clearInterval(intID);
	nextFrame();
}