А так?
<html>
<head>
<title>Untitled</title>
<style>
#panel {
padding: 5px;
text-align: center;
background-color: #e5eecc;
border: solid 1px #c3c3c3;
}
#panel {
padding: 50px;
display: none;
}
</style>
</head>
<body>
<button id="flip">Click</button>
<div id="panel">Hello world!</div>
<script type="text/javascript">
var timeout=0;
addEvent(document.getElementById('flip'),'click',function(){
var panel=document.getElementById('panel');
panel.style.display='block';
clearTimeout(timeout);
timeout=setTimeout(function(){
panel.style.display='none';
},2000);
});
function addEvent(elem,evnt,func){
if(elem.addEventListener)
elem.addEventListener(evnt,func,false);
else if(elem.attachEvent)
elem.attachEvent("on"+evnt,func);
else
elem[evnt]=func;
}
</script>
</body>
</html>