function timeNow() { //Grabs the current time and formats it into hh:mm:ss am/pm format. // now = new Date() now = new Date('Wed Sep 14 23:22:59 EDT 2005') hours = now.getHours() minutes = now.getMinutes() seconds = now.getSeconds() timeStr = "" + ((hours > 12) ? hours - 12 : hours) timeStr += ((minutes < 10) ? ":0" : ":") + minutes timeStr += ((seconds < 10) ? ":0" : ":") + seconds timeStr += (hours >= 12) ? " PM" : " AM" return timeStr }