<Script language = "JavaScript">
<! --
Var maxtime = 60*60; // 60*60 // one hour, calculated in seconds, and adjusted by yourself!
Function CountDown (){
If (maxtime> = 0 ){
// Minutes = Math. floor (maxtime/60 );
Seconds = Math. floor (maxtime % 60 );
// Msg = "+ minutes +" points "+ seconds +" seconds ";
Msg = "there are still" + seconds + "seconds" from the end ";
Document. all ["timer"]. innerHTML = msg;
If (maxtime = 5*60 ){
Alert ('note, there are 5 minutes! ');
}
-- Maxtime;
} Else {
ClearInterval (timer );
// Alert ("time till, end! ");
Maxtime = 60*60;
Timer = setInterval ("CountDown ()", 1000 );
}
}
Timer = setInterval ("CountDown ()", 1000 );
// -->
</SCRIPT>
<Div id = "timer" style = "color: red"> </div>
<Script language = "JavaScript">
<! --
Var maxtime = 5*60; // 60*60 // one hour, calculated in seconds, and adjusted by yourself!
Var timer;
Function CountDown (){
If (maxtime> = 0 ){
Var minutes = Math. floor (maxtime/60 );
Var seconds = Math. floor (maxtime % 60 );
Var msg = "still" + minutes + "points" + seconds + "seconds ";
Certificate ('{timer'}.html (msg );
// Document. all ["timer"]. innerHTML = msg;
-- Maxtime;
} Else {
ClearInterval (timer );
// Two methods are called after the countdown
SearchTaskList ();
Myajax ();
// Set the next countdown
Maxtime = 5*60;
Timer = setInterval ("CountDown ()", 1000 );
}
}
Timer = setInterval ("CountDown ()", 1000 );
// -->
</SCRIPT>
<Div id = "timer" style = "display: inline; color: red"> </div>