whatever your diabolical reasons may be....here is a method i used a while ago
var howLong = 20000;
t = null;
function closeMe(){
t = setTimeout("self.close()",howLong);
}
<body onLoad="closeMe();>
modifiy the 'howLong' to what ever amount of time you need to accomplish your cunning code...