var tlc_flag =
{
	init: function()
	{
		tlc_flag.div = document.getElementById("tlc_flag");
		tlc_flag.frameHeight = 76;
		tlc_flag.frameWidth = 76;
		tlc_flag.frames = 2;
		tlc_flag.offsetX = 0;

		/* Include this code to run animation on opening the page */
		tlc_flag.animate();
	},
	
	animate: function()
	{
		tlc_flag.offsetX += tlc_flag.frameWidth;
		
		/* Use this code to play an infinite loop */
		if (tlc_flag.offsetX >= tlc_flag.frameWidth * tlc_flag.frames)
		{
			tlc_flag.offsetX = 0;
		}

		tlc_flag.div.style.backgroundPosition = -tlc_flag.offsetX + "px" + " 0";
		
		tlc_flag.timer = setTimeout(tlc_flag.animate, 300);
	}
}

/* Ensure the javascript only runs on completion of page load */
Core.start(tlc_flag);

