clearTimeout(timerId||0); timerId = setTimeout(function tick() { GetPage('GetPageVar.CGI'); timerId = setTimeout(tick, 1000); }, 1000);