        var IE = (document.all) ? 1 : 0;
        var DOM = (document.getElementById) ? 1 : 0;

        var nTime;
        //  Date.UTC(YYYY, MM, DD[, hh[, mm[, ss[, ms]]]])

        // TARGET DATE
        var Tyear = 2009;
        var Tmonth = 8; //ex. Jan.=1, Feb.=2
        var Tday = 01;
        var Thour = 02;
        var Tmin = 0;
        var Tsec = 0;
        var Tms = 0;

        // adjust for EST
        Tmonth = Tmonth - 1; Thour = Thour + 4;

        //Date.UTC(Tyear, Tmonth, Tday, Thour, Tmin, Tsec, Tms);
        var nTarget = new Date("01 Aug 2009 02:00:00 EDT")

        function drawCountdown(layer, text) {
            if (DOM && document.getElementById(layer)) {
                document.getElementById(layer).innerHTML = text;
            }
            else if (IE && document.all[layer]) {
                document.all[layer].innerHTML = text;
            }
        }

        function Tick() {
            var dNow = new Date();
            nTime = nTarget - dNow.valueOf();       // milliseconds until target
            if (nTime < 0) nTime = 0;
            nTime = Math.floor(nTime / 1000);       // seconds until target
            Display("cdDay2", "cdDay1", "cdDay0", 86400);   // seconds per day
            //      Display(null, "cdDay1", "cdDay0", 86400);       // seconds per day
            Display(null, "cdHour1", "cdHour0", 3600);      // seconds per hour
            Display(null, "cdMinute1", "cdMinute0", 60); // seconds per minute
            Display(null, "cdSecond1", "cdSecond0", 1); // seconds per second
        }

        function Display(el2, el1, el0, nDivisor) {
            var nValue = (nTime - (nTime %= nDivisor)) / nDivisor;

            drawCountdown(el0, (nValue % 10));
            nValue = Math.floor(nValue / 10);
            drawCountdown(el1, (nValue % 10));
            if (el2) {
                nValue = Math.floor(nValue / 10);
                drawCountdown(el2, (nValue % 10));
            }
        }

        if (IE || DOM) {
            Tick();
            window.setInterval('Tick()', 1000);
        }
