Sorry so late on this one, but here's a cross-browser solution that should work in IE, NS4.x & NS6+:
[tt]
<html>
<head>
<title>Countdown Test</title>
<script type="text/javascript">
<!--
var countdownFrom=5; // number of seconds
var countdownwin;
var stp;
function CountDownStart(){
stp=setInterval("CountDownTimer('CountDownTime')",1000)
}
function CountDownTimer(id){
if(countdownFrom==0){
clearInterval(stp);
self.close();
}else{
var x;
var cntText='Closing in '+countdownFrom+' seconds';
if(document.getElementById){
x=document.getElementById(id);
x.innerHTML=cntText;
}else if(document.all){
x=document.all[id];
x.innerHTML=cntText;
}else if(document.layers){
x=document.NNCountDownTime;
x.document.write(cntText);
x.document.close();
}
}
countdownFrom--;
}
//-->
</script>
</head>
<body>
<div id="CountDownTime"><layer name="NNCountDownTime"></layer></div>
<script type="text/javascript">
<!--
window.onload=CountDownStart;
//-->
</script>
</body>
</html>
[/tt]
Paul Ellis
I've been programming since you had to punch holes in cards to code. (Always remember, number your cards!)