Set the timer, Clear the timer


//When you set the timeout, use a variable...

var myTimeout = window.setTimout("function();", 1000);

//When you want to stop it, use clear

window.clearTimeout(myTimeout);