If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

<script language="javascript">
<!--
var bannerID=0
function text(msg,ctrlwidth) {
//Prepend hyphens to the inputted text
msg = " --- "+msg;
//Set the newmsg, which will be used for length of the whole message
newmsg = msg;
while (newmsg.length < ctrlwidth) {
//While the newmsg is shorther than the maxlength, ctrlwidth, that you privided, append the string
newmsg += msg;
}
//Put the container for the input on the page
document.write ('<FORM NAME="Scrolltext">');
//Put a text-box on the page. Set the width of that textbox to the maxwidth you provided
document.write ('<CENTER><INPUT NAME="text" VALUE= "'+newmsg+'" SIZE= '+ctrlwidth+' ></CENTER>');
//Close the form tag
document.write ('</FORM>');
//This doesn't have any effect on anything, you could delete it and it would still work, so I'll comment it out.
var bannerID = null;
//Inititate phase 2 (call the other function)
rollmsg()
}
function rollmsg() {
//Figures out what is showing right now.
NowMsg = document.Scrolltext.text.value
//Make what needs to be showing by cutting off the first letter of what is showing and appending the sting to itself but mising the last letter.
NowMsg = NowMsg.substring(1,NowMsg.length)+NowMsg.substring(0,1)
//Make the textbox have the new value
document.Scrolltext.text.value = NowMsg
//I dont know why this banner ID is here.
/*bannerID = */setTimeout("rollmsg()",100)//change the number 100 to represent the speed of the scroll. The larger the number the slower it moves
}
// -->
</script>

It should be noted that this script was probably written over a decade ago (or by someone who didn't learn anything since over a decade ago). It is littered with out-dated stuff and I would strongly advise not to use this piece of crap code. Sorry for the strong words, but by today's standards it's just true. A few notes:

- the language attribute was deprecated at least since HTML 4.01
- using html comments surrounding the javascript became obsolete with browsers such as IE 2 (released in 1995!)
- document.write should be avoided in favor of DOM methods