function CountdownTimer( type, countdownlimit, end, cdtstyle ) {
	this.initialize.apply( this, arguments );
}
CountdownTimer.prototype = 	{
initialize: function( type, countdownlimit, end, cdtstyle ) {
this.elem = document.getElementById( type );
this.countdownlimit = countdownlimit;
this.end = end;
this.cdtstyle = cdtstyle;
},
countDown : function()	{
var	timer;
var	today = new Date()
var	days = Math.floor( ( this.countdownlimit - today ) / ( 24 * 60 * 60 * 1000 ) );
var	hours = Math.floor( ( ( this.countdownlimit - today ) % ( 24 * 60 * 60 * 1000 ) ) / ( 60 * 60 * 1000 ) );
var	mins = Math.floor( ( ( this.countdownlimit - today ) % ( 24 * 60 * 60 * 1000 ) ) / ( 60 * 1000 ) ) % 60;
var	secs = Math.floor( ( ( this.countdownlimit - today ) % ( 24 * 60 * 60 * 1000 ) ) / 1000 ) % 60 % 60;
var	milis = Math.floor( ( ( this.countdownlimit - today ) % ( 24 * 60 * 60 * 1000 ) ) / 10 ) % 100;
var	me = this;
if( ( this.countdownlimit - today ) > 0 ){
timer = days + '日と' + this.addZero( hours ) + '時間' + this.addZero( mins ) + '分'+ this.addZero( secs ) + '秒'  + this.addZero( milis ) + 'です！' 
this.elem.innerHTML = timer;
tid = setTimeout( function() { me.countDown(); }, 10 );
}else{
this.elem.innerHTML = this.end;
if( this.cdtstyle )	{
this.elem.setAttribute( 'class', this.cdtstyle );
}
return;
}
},
addZero : function( num )	{
num = '00' + num;
str = num.substring( num.length - 2, num.length );
return str ;
}
}

