function countdown_clock(year, month, day, hour, minute, format)
{
var html_code = '<span id="countdown"></span>';

document.write(html_code);
countdown(year, month, day, hour, minute, format);
}

function countdown(year, month, day, hour, minute, second)
{
var output = '';
Today = new Date();

//Convert both today's date and the target date into milliseconds.
Todays_Date = (new Date(Today.getFullYear(), Today.getMonth()+1, Today.getDate(), Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime();
Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime();
//alert(Todays_Date);
//alert(Target_Date);
//Find their difference, and convert that into seconds.
Time_Left = Math.round((Target_Date - Todays_Date) / 1000);

if(Time_Left < 0)
Time_Left = 0;

years = Math.floor(Time_Left / (60 * 60 * 24 * 365));
Time_Left %= (60 * 60 * 24 * 365);
months = Math.floor(Time_Left / (60 * 60 * 24 * 30));
Time_Left %= (60 * 60 * 24 * 30);
days = Math.floor(Time_Left / (60 * 60 * 24));
Time_Left %= (60 * 60 * 24);
hours = Math.floor(Time_Left / (60 * 60));
Time_Left %= (60 * 60);
minutes = Math.floor(Time_Left / (60));
Time_Left %= (60);
seconds = Math.floor(Time_Left);

output = '<span class="countdownNum">' + years + '</span>Yr. ';
output += '<span class="countdownNum">' + months + '</span>M. ';
output += '<span class="countdownNum">' + days + '</span>D. ';
output += '<span class="countdownNum">' + hours + '</span>Hr. ';
//output += '<span class="countdownNum">' + minutes + '</span>M. ';
//output += '<span class="countdownNum">' + seconds + '</span>S. ';
output += 'Remaining (<a href="article-countdown.asp">What\'s this</a>)';
document.getElementById('countdown').innerHTML = output;

//Recursive call, keeps the clock ticking.
setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + second + ');', 1000);
}