Scrolling status bar

<SCRIPT>

var frontPart, backPart;
var myMsg = "Hey, I know JavaScript - check out my kewl scroller! ... ";
var i = 0;  // counter for keeping track of characters in myMsg that are being added

function scrollMsg() {

/* myMsg is split into two parts, myMsg.substring(i, myMsg.length) returns the part of the string starting with the character at position i and stopping at one character before the total length of string (given by the property myMsg.length) */
frontPart = myMsg.substring(i, myMsg.length);

/* This line sets backPart to the left half of myMsg, starting at  position 0 and continuing to position i.  As i increases, frontPart gets smaller and backPart gets larger. */
backPart = myMsg.substring(0, i);

// This sets the Window's Status Line Property of the window object.
window.
status = frontPart + backPart;

if (i < myMsg.length) i++;  // if we haven't reached the end of the string increase the counter
else  i = 0;  // if we have reached the end of the string reset the counter back to zero

/* Add a pause to the function scrollMsg() using setTimeout.  Here the length of the pause is 50 milliseconds.   If you want a faster scroll, decrease the number of milliseconds, or increase for a slower scroll */
setTimeout("scrollMsg()", 50) ;

}

</SCRIPT>

<Body onLoad="scrollMsg();">