onmouseover = function() { setTimeout(function(){ parent.document.getElementById("div").style.display = "none"; }, 5000); }