// Set of functions to control status bar ticker
function StatusBar_Update() {
	if (this.loc < this.width) 	{
		window.status = this.spaces.substring(0,this.width-this.loc)+this.text.substring(0,this.loc);
	} else {
		var len = (this.loc-this.width > this.text.length) ? (this.loc-this.width - this.text.length) : this.width;
		window.status = this.text.substr(this.loc-this.width,len);
	}
	this.loc++;
	if (this.loc > this.text.length+this.width) this.loc = 0;
}

function StatusBar_Start() {
	for (var i=0;i<this.width;i++) this.spaces +=" ";
	setInterval("sBar.Update()",this.speed);
}

function StatusBar() {
	this.width = 100;
	this.text = "";
	this.speed = 100;
	
	this.loc = 0;
	this.spaces = "";

	this.Update = StatusBar_Update;
	this.Start = StatusBar_Start;
}
