(function(){
	var div=document.createElement('div');
	div.id='newYear';
	var img=document.createElement('img');
	img.src='images/bg01.jpg';
	img.onload=animate;
	div.appendChild(img);
	div.style.width=document.documentElement.clientWidth+'px';
	div.style.height='788px';
	document.body.appendChild(div);
})();

var num=100;
function animate()
{
	var div=document.getElementById('newYear');
	var t=setTimeout(fn,5000);
	function fn()
	{
		num-=10;
		div.style.opacity=num/100+'';
		div.style.filter='alpha(opacity='+num+')';
		if(num!='0')
		{
			t=setTimeout(fn,1);
		}
		else
		{
			div.style.display='none';
		}
	}
}
function showYear()
{
	num=100;
	var div=document.getElementById('newYear');

	div.style.display='block';
	div.style.opacity='100';
	div.style.filter='alpha(opacity=100)';
	animate();
}
