//Countdown V3.0
//Uses Countdown Visuals V1.0
//Black Dash Computer Technologies
//January 1, 2003
//DO NOT COPY

Now = new Date();
Year = Now.getYear();
Hour = Now.getHours();
Minute = Now.getMinutes();
Second = Now.getSeconds();
Month = Now.getMonth();
Day = Now.getDate();
YearB = Year + 1;
document.write('Current Year: ' + Year + '<br /> Counting Down To: ' + YearB);
leap = Year;
if ( ( leap % 4 == 0 && leap % 100 != 0 ) || ( leap % 4 == 0 && leap % 400 == 0 ) )
{
    document.write('<br /> This Year, Leap Year? YES');
}
else
{
    document.write('<br /> This Year, Leap Year? NO');
}

Month = Month + 1
Time = "Time Started: " + Hour + " : " + Minute + " : " + Second;
Bravo = "Date Started: " + Month + " / " + Day + " / " + Year;
document.write('<br />' + Time + '<br />' + Bravo);


function Act()
{
    MinuteA = Minute;
    while(SecondA >= 60)
        SecondA = SecondA - 60;
    while(MinuteA >= 60)
        MinuteA = MinuteA - 60;
    document.getElementById('Sec').value = SecondA;
    document.getElementById('Min').value = MinuteA - 1;
    document.getElementById('Hou').value = Hour - 1;
    document.getElementById('Da').value = DayA;
}

function Countdown()
{
    SecondC = SecondB;
    if(SecondC == 10)
        document.getElementById('down').src = "10.gif";

    if(SecondC == 9)
        document.getElementById('down').src = "9.gif";

    if(SecondC == 8)
        document.getElementById('down').src = "8.gif";

    if(SecondC == 7)
        document.getElementById('down').src = "7.gif";

    if(SecondC == 6)
        document.getElementById('down').src = "6.gif";

    if(SecondC == 5)
        document.getElementById('down').src = "5.gif";

    if(SecondC == 4)
        document.getElementById('down').src = "4.gif";

    if(SecondC == 3)
        document.getElementById('down').src = "3.gif";

    if(SecondC == 2)
        document.getElementById('down').src = "2.gif";

    if(SecondC == 1)
        document.getElementById('down').src = "1.gif";

    if(SecondC == 0)
    {
        document.getElementById('down').src = "fireworks.gif";
        document.getElementById('Currenttime').value = "-:-:-";
        document.getElementById('Currentdate').value = "1/1/" + (Year+1);
    }
}

function Current()
{
    document.getElementById('Currenttime').value = Hour + " : " + Minute + " : " + Second;
    document.getElementById('Currentdate').value = Month+1 + " / " + Day + " / " + Year;
}

function Startup()
{
    Days = 0;
    Now = new Date();
    Hour = Now.getHours();
    Minute = Now.getMinutes();
    Second = Now.getSeconds();
    Month = Now.getMonth();
    Year = Now.getYear();
    Day = Now.getDate();
    leap = Year
    Current();
    Mont();
    Mon();
    DayA = Days;
    Days = Days * 24;
    DaysH = Days;
    Days = Days * 60;
    DaysM = Days;
    Days = Days * 60;
    Minute = (Hour * 60) + Minute;
    SecondA = 86400 - Second;
    Second = (Minute * 60) + Second;
    Second = 86400 - Second;
    Hour = 24 - Hour;
    Minute = 1440 - Minute;
    Act();
    SecondB = Days + Second;
    document.getElementById('Hour').value = DaysH + Hour - 1;
    document.getElementById('Minute').value = DaysM + Minute - 1;
    document.getElementById('Clock').value = SecondB;
    Countdown();
    if(SecondB > 1)
        setTimeout("Startup()",100);
    else
        {
        SecondB = 0;
        setTimeout("Countdown()",1000);
        setTimeout("document.getElementById('Clock').value = 0",1000);
        setTimeout("document.getElementById('Sec').value = 0",1000);
        }

}

function Mont()
{
    if(Month == 0)
    {
        Days = 31 - Day;
    }
    if(Month == 1)
    {
        if ( ( leap % 4 == 0 && leap % 100 != 0 ) || ( leap % 4 == 0 && leap % 400 == 0 ) )
        {
            Days = 29 - Day;
        }
        else
        {
            Days = 28 - Day;
        }
    }
    if(Month == 2)
    {
        Days = 31 - Day;
    }
    if(Month == 3)
    {
        Days = 30 - Day;
    }
    if(Month == 4)
    {
        Days = 31 - Day;
    }
    if(Month == 5)
    {
        Days = 30 - Day;
    }
    if(Month == 6)
    {
        Days = 31 - Day;
    }
    if(Month == 7)
    {
        Days = 31 - Day;
    }
    if(Month == 8)
    {
        Days = 30 - Day;
    }
    if(Month == 9)
    {
        Days = 31 - Day;
    }
    if(Month == 10)
    {
        Days = 30 - Day;
    }
    if(Month == 11)
    {
        Days = 31 - Day;
    }
}

function Mon()
{
    Month = Month + 1;
    if(Month == 1)
    {
        if ( ( leap % 4 == 0 && leap % 100 != 0 ) || ( leap % 4 == 0 && leap % 400 == 0 ) )
        {
            Days = Days + 29;
        }
        else
        {
            Days = Days + 28;
        }
        Month = Month + 1;
    }
    if(Month == 2)
    {
        Days = Days + 31;
        Month = Month + 1;
    }
    if(Month == 3)
    {
        Days = Days + 30;
        Month = Month + 1;
    }
    if(Month == 4)
    {
        Days = Days + 31;
        Month = Month + 1;
    }
    if(Month == 5)
    {
        Days = Days + 30;
        Month = Month + 1;
    }
    if(Month == 6)
    {
        Days = Days + 31;
        Month = Month + 1;
    }
    if(Month == 7)
    {
        Days = Days + 31;
        Month = Month + 1;
    }
    if(Month == 8)
    {
        Days = Days + 30;
        Month = Month + 1;
    }
    if(Month == 9)
    {
        Days = Days + 31;
        Month = Month + 1;
    }
    if(Month == 10)
    {
        Days = Days + 30;
        Month = Month + 1;
    }
    if(Month == 11)
    {
        Days = Days + 31;
    }

}