	var ctxSky    = document.getElementById('sky').getContext('2d');
	var ctxGround    = document.getElementById('ground').getContext('2d');
	
	var sWidth = document.getElementById('sky').width;
	var gWidth = document.getElementById('ground').width;

	var fxImg = new Image();
	fxImg.src = "LFAcommon/lfaFX.png";

	var sy2=105, sy3=210, sy4=294, sy5=348, sy6=426, sy7=507, sy8=585;
	var ty2=66, ty3=150, ty4=219, ty6=10, ty7=40, ty8=58;
	var h1=102, h2=102, h3=78, h4=48, h5=72, h6=75, h7=72, h8=96;

	var x1=0, x2=0, x3=0, x4=0, x5=0, x6=0, x7=0, x8=0;
	var uWidth = 912;
	var s1=0.13, s2=0.08, s3=0.05, s4=0.03;

	fxImg.onload = function()
	{

		var lastDraw = new Date();
		var delay = 0;

		var scrollFunc = function()
		{
			//sky
			x4 -= s4 * delay;
				 ctxSky.drawImage(fxImg,0,sy4,uWidth,h4,x4,ty4,uWidth,h4);
			if(x4 < sWidth - uWidth) 
				ctxSky.drawImage(fxImg,0,sy4,uWidth,h4,x4+uWidth,ty4,uWidth,h4);
			if (x4 <= -uWidth){x4=0;}
			
			x3 -= s3 * delay;
				ctxSky.drawImage(fxImg,0,sy3,uWidth,h3,x3,ty3,uWidth,h3);
			if (x3 < sWidth - uWidth) 
				ctxSky.drawImage(fxImg,0,sy3,uWidth,h3,x3+uWidth,ty3,uWidth,h3);
			if (x3 <= -uWidth){x3=0;}
			
			x2 -= s2 * delay;
				ctxSky.drawImage(fxImg,0,sy2,uWidth,h2,x2,ty2,uWidth,h2);
			if (x2 < sWidth - uWidth)  
				ctxSky.drawImage(fxImg,0,sy2,uWidth,h2,x2+uWidth,ty2,uWidth,h2);
			if (x2 <= -uWidth){x2=0;}

			x1 -= s1 * delay;
				ctxSky.drawImage(fxImg,0,0,uWidth,h1,x1,0,uWidth,h1);
			if (x1 < sWidth - uWidth) 
				ctxSky.drawImage(fxImg,0,0,uWidth,h1,x1+uWidth,0,uWidth,h1);
			if (x1 <= -uWidth){x1=0;}
			
			//ground
			x5 -= s4 * delay;
				ctxGround.drawImage(fxImg,0,sy5,uWidth,h5,x5,0,uWidth,h5);
			if (x5 < sWidth - uWidth) 
				ctxGround.drawImage(fxImg,0,sy5,uWidth,h5,x5+uWidth,0,uWidth,h5);
			if (x5 <= -uWidth){x5=0;}

			x6 -= s3 * delay;
				ctxGround.drawImage(fxImg,0,sy6,uWidth,h6,x6,ty6,uWidth,h6);
			if (x6 < sWidth - uWidth) 
				ctxGround.drawImage(fxImg,0,sy6,uWidth,h6,x6+uWidth,ty6,uWidth,h6);
			if (x6 <= -uWidth){x6=0;}
			
			x7 -= s2 * delay;
				ctxGround.drawImage(fxImg,0,sy7,uWidth,h7,x7,ty7,uWidth,h7);
			if (x7 < sWidth - uWidth) 
				ctxGround.drawImage(fxImg,0,sy7,uWidth,h7,x7+uWidth,ty7,uWidth,h7);
			if (x7 <= -uWidth){x7=0;}

			x8 -= s1 * delay;
				ctxGround.drawImage(fxImg,0,sy8,uWidth,h8,x8,ty8,uWidth,h8);
			if (x8 < sWidth - uWidth) 
				ctxGround.drawImage(fxImg,0,sy8,uWidth,h8,x8+uWidth,ty8,uWidth,h8);
			if (x8 <= -uWidth){x8=0;}

			var now = new Date();
			delay = now - lastDraw;
			lastDraw = now;
			setTimeout(scrollFunc,30); //don't 100% the cpu
		};

		scrollFunc();
	};
