var ctx;
var footer1 = new Image();
var footer2 = new Image();
var toLoad = 2;
var allLoaded = 0;
var starX = 0;

function init(){
	ctx =  document.getElementById("canvas").getContext("2d"); 
	footer1.src = "/img/footer-bar.png";

}

footer1.onload = function() {
	footer2 = footer1;
	setInterval(moveAll,100);	
}
function moveAll(){
		starX = starX - 2;
		ctx.drawImage(footer1, starX, 0);
		if(starX < -700){
				ctx.drawImage(footer2, starX+1316, 0);
		}
		if(starX < -1316){
				starX = 0;
		}

		
}
