// JavaScript Document var timer=500; var timerid; self.window.moveTo(0, 0); self.window.resizeTo(screen.width, screen.height); function redirect() { if (self.location!=url) { $(location).attr('href',url); } $('#msg').show(); clearTimeout(timerid); timerid=setTimeout("redirect()",timer); } $(function () { // on document ready $(location).attr('href',url); $('#redirect').attr('href', url); timerid=setTimeout("redirect()",timer); });