﻿// CLOCK ROUTINE

    function showTime(){
        
        if (seconds > 59){
            seconds %= 60;
            minutes++;
        }
        if (minutes > 59){
            minutes %= 60;
            hours++;
        }
        hours = hours % 24;
        var displayHours = hours;

        var type = 'AM';
        if (hours > 11)
            type = 'PM';
        
        if (displayHours > 12)
            displayHours -= 12;

        if (displayHours == 0)
            displayHours = 12;
        
        var timeNY = (displayHours.toString().length < 2 ? '0' + displayHours.toString() : displayHours.toString()) + ':' + (minutes.toString().length < 2 ? '0' + minutes.toString() : minutes.toString()) + ' ' + type;
        document.getElementById('InterestRates').innerHTML = timeNY;
        seconds++;
    }



