Passe funções, não strings, para setTimeout () e setInterval ()

setInterval(doSomethingPeriodically, 1000);  
setTimeout(doSomethingAfterFiveSeconds, 5000);
Creepy Gábor