1
var state = 0; // 0: start; 1: long count; 2: short count; 3: timeout; 4/5: blink
2
var counter = 0, step = 1, delay = 1;
5
// change state if counter is down
9
counter = countdown_timeout_min
18
if (state == 3 || state == 5) {
19
window.status = countdown_lock_expire
26
// blink the above text
36
if (state == 1) msg = countdown_lock_mins
37
if (state == 2) msg = countdown_lock_secs
38
window.status = msg.replace(/#/, counter)
42
// Set timer for next update
43
setTimeout("countdown()", delay);