ok.
stig your code wont work.
your callling
window.close .... thats a link to the function varible you need to add a () after it like
window.close();
next that code is way too long for such a simple task!
time is in millisec.
code:
window.setTimeout(function(e){window.close( ); } , 1000 );