
// This JScript creates a scrolling status bar message

// Define global variables
var str = "";
var timerID = null;
var timerRunning = false;

function setMessage() {
	// Define the message if it has not been set
	if (str == "") {
		for (var i = 0; i < 15; i++)
			{str += "          "}
		str += "Happy New Year!!!";
	}
	// Clip and scroll message
	else {
		str = str.substring(2, str.length);
	}
	window.status = str;
	timerRunning = true;
	timerID = window.setTimeout("setMessage()", 100);
}

function stopTimer() {
	// Stop the clock
	if(timerRunning) {
		clearTimeout(timerID);
		timerRunning = false;
	}
}
