
function showTime() {
        var now = new Date();
	var day = now.getDate();
	var month = now.getMonth()+1;
        var year = now.getYear();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds();

        var timeStr = " " +day + "-" +month+"-"+year+ " " + ((hours > 12) ? hours - 12 : hours);

        timeStr += ((minutes < 10) ? ":0" : ":") + minutes;
        timeStr += ((seconds < 10) ? ":0" : ":") + seconds;
        timeStr += (hours >= 12) ? " P.M." : " A.M";

        document.getElementById('xdate').innerHTML = timeStr; // time is displayed in the Status Line

        setTimeout("showTime()", 1000);
}


