<script type="text/javascript">
var win = window.open("http://www.google.com", "mywindow");
var interval;
function closePopup()
{
win.close();
clearInterval(interval);
}
interval=setInterval(closePopup,10000);
</script>
I think this is a common task. Haven't googled yet?