function getsupportedprop(proparray){
	var root=document.documentElement;
	for (var i=0; i<proparray.length; i++){
		if (typeof root.style[proparray[i]]=="string"){
			return proparray[i];
		}
	}
}

var csstransform=getsupportedprop(['transform', 'MozTransform', 'WebkitTransform', 'msTransform', 'OTransform']);

function startClock()
{
	var x=new Date(2012,1,19,8,30);
	var today=new Date();
	var t=x.getTime()-today.getTime();
	if(t<=0)
	{
		setCircle(0,0,0,0);
		return false;
	}
	t=Math.floor(t/1000);
	var d=Math.floor(t/60/60/24);
	t-=d*60*60*24;
	var h=Math.floor(t/60/60);
	t-=h*60*60;
	var m=Math.floor(t/60);
	t-=m*60;
	
	setCircle(d,h,m,t);
	setTimeout('startClock()',500);
}

function setCircle(d,h,m,s)
{
	d*=6;
	if(h>=12)d+=3;
	h*=30;
	m*=6;
	s*=6;
	document.getElementById('c1').style[csstransform]='rotate('+s+'deg)';
	document.getElementById('c2').style[csstransform]='rotate('+m+'deg)';
	document.getElementById('c3').style[csstransform]='rotate('+h+'deg)';
	document.getElementById('c4').style[csstransform]='rotate('+d+'deg)';
	
	
}
