Бегущая строка на JS

Пример 1:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Документ Без Имени</title>
</head>

<body>
<SCRIPT LANGUAGE='JavaScript'>
function outmsg(msg,ctrlwidth)
{
msg = " --- "+msg
newmsg = msg
while (newmsg.length < ctrlwidth) {newmsg += msg}
document.write ('<FORM NAME="Outmsg">')
document.write ('<CENTER><INPUT NAME="outmsg" VALUE= "'+newmsg+'" SIZE= '+ctrlwidth+'></CENTER>')
document.write ('</FORM>')
rollmsg()
}
function rollmsg()
{
NowMsg=document.Outmsg.outmsg.value
NowMsg=NowMsg.substring(1,NowMsg.length)+NowMsg.substring(0,1)
document.Outmsg.outmsg.value = NowMsg
bannerid=setTimeout("rollmsg()",100)
}
</SCRIPT>
<SCRIPT language='JavaScript'>
outmsg("ТЕКСТ БЕГУЩЕЙ СТРОКИ !!!",70)
</script>
</body>
</html>

Пример 2:

<html>
<head>
<script language="JavaScript">
<!--
var position=0;
function ticker()
{
var k;
var msg="ТЕКСТ БЕГУЩЕЙ СТРОКИ !!!";
k=(75/msg.length)+1;
for (i = 0; i <= k; i++)
{
msg+=" "+msg;
document.Outmsg.outmsg.value=msg.substring(position,position+75);
}
if (position++==msg.length){ position=0;}
id=setTimeout("ticker()",100);
}
//--<
</script>
</head>
<body onLoad="ticker();">
<form name="Outmsg">
<input type="text" name="outmsg" size="19">
</form>
</body>
</html>