Oppure
... function redirect() { location.href = "www.home.it"; } ... setTimeout("redirect()", 5000); ...