// ......................................................

// The frames per second for the background scroll.
var fps = 30;


// ......................................................


// Counters and frame counts for the scrolling background
var position = 0;
var frameMs = 1000.0 / fps;

// Brief: Scrolls the background - requires an element with background-repeat set to "repeat" or "repeat-x"
// Returns: Void, but will eventually callback into itself via timeout
function ScrollBackground()
{
document.getElementById("top_bar").style.backgroundPosition = (--position) + "px 0px";
setTimeout("ScrollBackground()", frameMs);
}

// Setup our element for scrolling, then scroll
document.getElementById("top_bar").style.backgroundRepeat = "repeat";
document.getElementById("top_bar").style.backgroundPosition = "0px 0px";
ScrollBackground();