window.onload = function(){
var oC = document.getElementById('c1');
var oGC = oC.getContext('2d');
var num = 0;
var num1 = 0;
oGC.fillRect(0,0,100,100);
oGC.fillStyle='red';
setInterval(function(){
num = num+1;
oGC.clearRect(0,0,oC.width,oC.height);
oGC.fillRect(num,300,30,30);
},10);