
var tomb = document.getElementsByTagName('bdo');
var stamp = new Array(tomb.length);


for( i=0; i<tomb.length; i++ )
{
	stamp[i] = tomb[i].innerHTML;
}


function cdown()
{	

	for(i=0; i<tomb.length; i++ )
	{

		s=stamp[i]--;
		m=0;
		h=0;
		if(s<0)
		{
			if( tomb[i].innerHTML!='---' ) ding();
			
			tomb[i].innerHTML='---';
			//document.location=document.location;
		} 
		else
		{
			if(s>59)
			{
				m=Math.floor(s/60);
				s=s-m*60
			}
			
			if(m>59)
			{
				h=Math.floor(m/60);
				m=m-h*60
			}
			
			if(s<10)
			{
				s="0"+s
			}
			
			if(m<10)
			{
				m="0"+m
			}
			
			tomb[i].innerHTML=" "+h+":"+m+":"+s+'';
		}
	}
	window.setTimeout("cdown();",1005);
}

cdown();