function getObj(obj) { var objRef; if(document.all) { objRef = eval('document.all.' + obj); } if(document.getElementById) { objRef = document.getElementById(obj); } return objRef; } var clockID = 0; var tDate = new Date(); function showTime() { var mins = Number(tDate.getMinutes()); if (mins < 10) mins = '0' + mins; var sec = Number(tDate.getSeconds()); if (sec < 10) sec = '0' + sec; var loca = location.href.toLowerCase(); loca = loca.substring(0,25); if (loca == 'http://www.goalsnetwork.c') { var iHourOffset = tDate.getHours(); } else if (loca == 'http://goalsnetwork.co.uk') { var iHourOffset = tDate.getHours(); } else { var iHourOffset = tDate.getHours(); } if (iHourOffset > 23) iHourOffset = iHourOffset - 24; if (iHourOffset < 10) iHourOffset = '0' + iHourOffset; getObj('clock').innerHTML = '' + iHourOffset + ':' + mins + ':' + sec + ' (uk)'; } function UpdateClock() { if (clockID) { clearTimeout(clockID); clockID = 0; } tDate.setTime(tDate.getTime() + 1000); showTime(); clockID = setTimeout('UpdateClock()', 1000); } function _StartClock(y, m, d, h, M, S) { tDate = new Date(y, m, d, h, M, S); showTime(); clockID = setTimeout('UpdateClock()', 1000); } function SetCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = '; expires='+date.toGMTString(); } else var expires = ''; document.cookie = name+'='+value+expires+'; path=/'; } function GetCookie(name) { var nameEQ = name + '='; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function DeleteCookie(name) { SetCookie(name,'',-1); }