[2,0 , 2,4 , 6,2 , 6,2 , 6,0 , 6,4] ,
[9,9 , 4,2 , 9,9 , 6,2 , 9,9 , 6,6] ,
[0,0 , 4,2 , 0,2 , 6,4 , 6,0 , 4,4] ,
[0,0 , 4,2 , 0,0 , 4,6 , 0,0 , 4,6] ,
[2,2 , 2,2 , 6,0 , 4,6 , 9,9 , 6,6] ,
[2,0 , 4,4 , 6,0 , 2,4 , 0,0 , 4,6] ,
[2,0 , 4,4 , 6,2 , 2,4 , 6,0 , 4,6] ,
[0,0 , 4,2 , 9,9 , 6,2 , 9,9 , 6,6] ,
[0,2 , 4,2 , 6,0 , 6,4 , 0,6 , 4,6] ,
[0,2 , 4,2 , 6,0 , 6,2 , 0,0 , 6,4]];
var clockContainer = document.getElementById("clockclock");
function resizeContainer()
clockContainer.style.width = document.body.clientWidth+"px";
clockContainer.style.height = Math.floor(document.body.clientWidth*0.5)+"px";
clockContainer.style.marginTop = Math.floor(-0.25*document.body.clientWidth)+"px";
window.onresize = resizeContainer;
this.node = document.createElement("div");
this.node.setAttribute("class","clock");
this.setNeedle = function(n, pos) {
this.needles[n].setAttribute("style","background-color:#eee;");
var angle = pos*45+"deg";
this.needles[n].setAttribute("style","-webkit-transform: rotate("+angle+"); -moz-transform: rotate("+angle+"); transform: rotate("+angle+")");
var needle = document.createElement("div");
needle.setAttribute("class","needle "+(n===0?"short":"long"));
this.needles.push(needle);
this.node.appendChild(needle);
this.clocks[c].setNeedle(0,digitsArray[d][2*c]);
this.clocks[c].setNeedle(1,digitsArray[d][2*c+1]);
this.clocks[6+c].setNeedle(0,digitsArray[u][2*c]);
this.clocks[6+c].setNeedle(1,digitsArray[u][2*c+1]);
var digit = document.createElement("div");
digit.setAttribute("class","block");
digit.appendChild(clock.node);
clockContainer.appendChild(digit);
this.hourBlock = new Block();
this.minuteBlock = new Block();
this.secondBlock = new Block();
this.dayBlock = new Block();
this.monthBlock = new Block();
this.yearBlock = new Block();
this.hourBlock.set(time.getHours());
this.minuteBlock.set(time.getMinutes());
this.secondBlock.set(time.getSeconds());
this.dayBlock.set(time.getDate());
this.monthBlock.set(time.getMonth()+1);
this.yearBlock.set(time.getFullYear()%100);
var clockclock = new ClockClock();
setInterval(function() { clockclock.update(); }, 1000);