This javascript is for horizantly moving text. I could not understand this code. pls explain in details....Thanks...

<script language="javascript">
<!--
var bannerID=0
function text(msg,ctrlwidth) {
msg = " --- "+msg
newmsg = msg
while (newmsg.length < ctrlwidth) {
newmsg += msg
}
document.write ('<FORM NAME="Scrolltext">');
document.write ('<CENTER><INPUT NAME="text" VALUE= "'+newmsg+'" SIZE= '+ctrlwidth+' ></CENTER>');
document.write ('</FORM>');
var bannerID = null
rollmsg()
}
function rollmsg() {
NowMsg = document.Scrolltext.text.value
NowMsg = NowMsg.substring(1,NowMsg.length)+NowMsg.substring(0,1)
document.Scrolltext.text.value = NowMsg
bannerID = setTimeout("rollmsg()",100)//change the number 100 to represent the speed of the scroll. The larger the number the slower it moves
}
// -->
</script>