<!---
/* by Peter Frost for Bristol PC Services 11 Nov 2004 */
function wait() {
 setTimeout("rehead()",60000)
}
function rehead() {
 remM-=1
 if (remM<1) {if (remH<1) reload()}
 if (remM<0) {remM=59;remH-=1}
 showRem()
 wait()
}
function showRem() {
 pH="s";if (remH==1) pH=""
 pM="s";if (remM==1) pM=""
 document.getElementById("howLong").innerHTML=remH+" hour"+pH+" "+remM+" minute"+pM+" to go!"
}
function hherr() {
 alert("Hours must be a number between 0 & 23!")
 return
}
function mmerr() {
 alert("Minutes must be a number between 00 & 59!")
 return
}
function invalid() {
 alert("Enter time in hh:mm form, 08:20 or 20:20 for example")
 return
}
function setDelay() {
 stime=document.delay.stime.value
 if (stime=="") stime="0:00"
 if (stime.length<3) stime=stime+":00"
 if (stime.length==4) stime="0"+stime
 if (stime.length!=5) invalid()
 hh=stime.substr(0,2)
 mm=stime.substr(3,2)
 if(isNaN(hh)==true) hherr()
 if(isNaN(mm)==true) mmerr()

 now = new Date()
 remM=mm-now.getMinutes()
 if (remM<0) {hh-=1;remM+=60}
 remH=hh-now.getHours()
 if (remH<0) remH+=24
 if (remH==0 && remM==0) reload()
 showRem()
}
function reload() {
 self.focus()
 window.location.reload()
}
document.delay.stime.focus()
var remM=15
var remH=0
wait()
//--->
