
function times(y,BM,BD)
{
time=new Date(y,BM-1,BD);
time=Math.ceil((time.getTime()-new Date().getTime())/86400000); 
return time;
}

function count(BM,BD)
{
var saba='easy';
var y = new Date().getFullYear();
times(y,BM,BD);
if(time<=-1){times(y+1,BM,BD);}

if(time>0)
{
document.write( '<Table Border="0" Cellspacing="0" cellpadding="0" Width="200" Height="15" style=" background-image: url(http://'+saba+'.freespace.jp/happytime/1/count/'+BM+'_'+BD+'.gif); background-repeat:no-repeat;">');
document.write( '<Tr><Td Width="81"><A Href="http://start.freespace.jp/happytime/" Target="_blank"><Img Src="http://'+saba+'.freespace.jp/happytime/1/1.png" Border="0"></A></Td>');
document.write( '<Td Width="27" Align="center"><B><Font style="font-size: 10pt; LINE-HEIGHT: 10pt;" face="Times New Roman" Color="#000000">'+time+'</Font></B></Td>');
document.write( '<Td Width="92"><A Href="http://start.freespace.jp/happytime/" Target="_blank"><Img Src="http://'+saba+'.freespace.jp/happytime/1/2.png" Border="0"></A></Td></Tr></Table>');
}

else
{
document.write( '<Table Border="0" Cellspacing="0" cellpadding="0" Width="200" Height="15" Background="http://'+saba+'.freespace.jp/happytime/1/today/'+BM+'_'+BD+'.gif">');
document.write( '<Tr><Td Width="200"><A Href="http://start.freespace.jp/happytime/" Target="_blank"><Img Src="http://'+saba+'.freespace.jp/happytime/1/0.png" Border="0"></A></Td></Tr></Table>');
}
}

count(12,2);