/*********************************************\ Timer JavaScript by Isagani "Gain" Oloya \*********************************************/ function msieversion() { var ua = window.navigator.userAgent var msie = ua.indexOf ( "MSIE " ) if ( msie > 0 ) return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) ) else return 0 } window.IEVersion=msieversion() window.RunningIE4=(window.IEVersion >=4); now = new Date() hour = now.getHours() if (window.RunningIE4 == true) { document.write("") function tick() { var hours, minutes, seconds, ap, ampm; var intDate, intMonth, intYear, intHours, intMinutes, intSeconds; var blink; var today; today = new Date(); intDate = today.getDate(); intMonth = today.getMonth()+1; intYear = today.getYear(); intHours = today.getHours(); intMinutes = today.getMinutes(); intSeconds = today.getSeconds(); if (intHours == 0) { hours = "12:"; ap = "°•° "; ap = ""; ampm = " AM"; } else if (intHours < 12) { hours = intHours+":"; ap = ".•° "; ap = ""; ampm = " AM"; } else if (intHours == 12) { hours = "12:"; ap = ".•. "; ap = ""; ampm = " PM"; } else { intHours = intHours - 12 hours = intHours + ":"; ap = "°•. "; ap = ""; ampm = " PM"; } if (intMinutes < 10) { minutes = "0"+intMinutes; } else { minutes = intMinutes; } if (intSeconds < 10) { if (intSeconds % 2 == 0) { seconds = "·0"+intSeconds+ampm; blink = " ° "; } else { seconds = ".0"+intSeconds+ampm; blink = " ° "; } } else { if (intSeconds % 2 == 0) { seconds = "·"+intSeconds+ampm; blink = " ° "; } else { seconds = "."+intSeconds+ampm; blink = " ° "; } } var strMonth = "" switch( intMonth ){ case 1: strMonth = "January "; break; case 2: strMonth = "February "; break; case 3: strMonth = "March "; break; case 4: strMonth = "April "; break; case 5: strMonth = "May "; break; case 6: strMonth = "June "; break; case 7: strMonth = "July "; break; case 8: strMonth = "August "; break; case 9: strMonth = "September "; break; case 10: strMonth = "October "; break; case 11: strMonth = "November "; break; case 12: strMonth = "December "; break; } timeString = Date(); //timeString = " "+intDate+"/"+intMonth+"/"+intYear+" "+ap+hours+minutes+seconds; timeString = " "+strMonth+intDate+", "+intYear+blink+hours+minutes+seconds; Clock.innerHTML = timeString; window.setTimeout("tick();", 100); } window.onload = tick; } else { if (hour < 12) { document.write(" " + now.toLocaleString()) } else if (hour < 18){ document.write(" " + now.toLocaleString()) } else if (hour >= 18) { document.write(" " + now.toLocaleString()) } } document.write("")