Hi All.

Please excuse my as I am not very experienced with using javascript. I found a simple bit of code that I pasted into my site to create a popup (using CSS and Javascript) that will disappear once someone clicks the close link. However, I would also like the popup to disappear automatically after say 5 seconds. I'm using the code below:

Code:
	var xV1 = 0;
	function stayHome(){	
		nV = document.body.scrollTop;	
		document.getElementById('popup').style.top = xV1+nV;
	}
	function init(){
		xV1 = document.getElementById('popup').offsetTop;
	}
	window.onload=init;
	window.onscroll=stayHome;
The code I'm using for the close link is as follows:

HTML Code:
<a href="#" onclick="document.getElementById('popup').style.display = 'none'">close [X]</a>
Can anyone tell me if making the popup disappear after a specified time is possible by modifying the above?

Thanks!