//##################################################
// カウントダウンスクリプト
// 2005/11/29 平成すねいく
//
// 色設定とイベント設定を変更して使ってください
//##################################################
var now = new Date();
document.write(now.getFullYear(),'/', now.getMonth()+1,'/', now.getDate(),'
');
// 色設定
var nameColor = '#ff0000'; // イベント名の色
var daysColor = '#00ff00'; // 残りの日数の色
// イベント設定 (年, 月, 日, 'イベント名')
countdown(2005,12,25,'クリスマス');
countdown(2006,1,1,'正月');
function countdown(year,month,day,name){
var point = new Date(year,month-1,day);
var count = Math.ceil( ( point.getTime() - now.getTime() ) / (1000*60*60*24) );
if(count > 1) {
document.write('', name, ' (', year, '/', month, '/', day, ') ');
document.write('まで あと ', count, ' 日
');
}
else if(count == 1) {
document.write('明日は ', name, '
');
}
else if(count == 0) {
document.write('今日は ', name, '
');
}
else {
}
}