Scrolling Status Assignment

Due April 8 at midnight.


Create two Web pages with a scrolling status bar, one scrolling left and the other scrolling right. You may choose your own message.

In general the scrolling status works as follows:
message = "This message scrolls! ..." creates a string containing the words This message scrolls! ...
window.status = message puts this message on the status bar
Now how do we get the message to scroll? Simple.
Put the message This message scrolls! ... on the status bar.
Then replace it with the message his message scrolls! ...T
Then replace it with the message is message scrolls! ...Th
and continue this process of stripping the first character from the string and glueing it to the end.
or you can scroll in the opposite direction by stripping the last character off and glueing it to the beginning.

How do we implement this?
Check out the DOM for strings and you'll see several interesting properties and methods:
message.length returns the length of the message.
message.charAt(x) returns the character at position x of message. Remember that the first character is at position zero.
message.substring(x,y) returns the substring of message starting at position x and ending with the character BEFORE position y.
Why the position BEFORE? Because y-x is the length of the string and the entire string is message.substring(0,message.length)
So use a function something like the following:
function scroll() {
message = whatever;
window.status = message;
setTimeout(scroll, someAmountOfTime);
}

And put it all together.