Scrolling Teletype Text for Blogs and Websites:

From: The Blog Guy

This script is for WHITE or Light Colored Backgrounds only.
Please COPY and PASTE the following JavaScript Code into your Blog, Website, or Web Page. For Blogs this works best in the sidebar (column).
Please change the items in Red only.
If you need to ADD more Text Lines, COPY and add a new line under the last number and add the new number in sequence, i.e. - 1,2,3,4,5,6,7.
If you need to DELETE Text Lines, simply remove an entire line, i.e. - 6, 7.
<script language="JavaScript1.2">
<!--

/*
Typing Scroller
Submitted by: The Blog Guy
*/

//Secify scroller contents
var line=new Array()
line[1]="This Blog has"
line[2]="FREE..."
line[3]="Blog and Website"
line[4]="Tips, Tricks, Hints,"
line[5]="HTML Codes, and JavaScripts."
line[6]="They are easy to use."
line[7]="Please Follow this BLOG"

//Specify font size for scoller
var ts_fontsize="16px"

//--Don't edit below this line

var longestmessage=1
for (i=2;i<line.length;i++){
if (line[i].length>line[longestmessage].length)
longestmessage=i
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById){
document.write('<form name="bannerform">')
document.write('<input type="text" name="banner" size="'+tscroller_width+'"')
document.write('  style="background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')
document.write('</form>')
}

temp=""
nextchar=-1;
nextline=1;
cursor="\\"
function animate(){
if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
nextline++;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
nextline=1;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else{
nextstep()}}

function nextstep(){

if (cursor=="\\"){
cursor="|"}
else if (cursor=="|"){
cursor="/"}
else if (cursor=="/"){
cursor="-"}
else if (cursor=="-"){
cursor="\\"}


nextchar++;
temp+=line[nextline].charAt(nextchar);
document.bannerform.banner.value=temp+cursor
setTimeout("animate()",25)}

//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate
// -->
</script>

See how this actually looks on a WHITE Background -
Click on the LINK - to see it at:
 
Blogs I am Following


This script is for BLACK or Dark Colored Backgrounds only.
Please COPY and PASTE the following JavaScript Code into your Blog, Website, or Web Page. For Blogs this works best in the sidebar (column).
Please change the items in Red only.
If you need to ADD more Text Lines, COPY and add a new line under the last number and add the new number in sequence, i.e. - 1,2,3,4,5,6,7.
If you need to DELETE Text Lines, simply remove an entire line, i.e. - 6, 7.
<script language="JavaScript1.2">
<!--

/*
Typing Scroller
Submitted by: The Blog Guy
*/

//Secify scroller contents
var line=new Array()
line[1]="This Blog has"
line[2]="FREE..."
line[3]="Blog and Website"
line[4]="Tips, Tricks, Hints,"
line[5]="HTML Codes, JavaScripts."
line[6]="They are easy to use."
line[7]="Please Follow this BLOG"

//Specify font size for scoller
var ts_fontsize="16px"

//--Don't edit below this line

var longestmessage=1
for (i=2;i<line.length;i++){
if (line[i].length>line[longestmessage].length)
longestmessage=i
}

//Auto set scroller width
var tscroller_width=line[longestmessage].length

lines=line.length-1 //--Number of lines

//if IE 4+ or NS6
if (document.all||document.getElementById){
document.write('<form name="bannerform">')
document.write('<input type="text" name="banner" size="'+tscroller_width+'"')
document.write('  style="background-color: BLACK; font-family: verdana; color: WHITE; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')
document.write('</form>')
}

temp=""
nextchar=-1;
nextline=1;
cursor="\\"
function animate(){
if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){
nextline++;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){
nextline=1;
nextchar=-1;
document.bannerform.banner.value=temp;
temp="";
setTimeout("nextstep()",1000)}
else{
nextstep()}}

function nextstep(){

if (cursor=="\\"){
cursor="|"}
else if (cursor=="|"){
cursor="/"}
else if (cursor=="/"){
cursor="-"}
else if (cursor=="-"){
cursor="\\"}


nextchar++;
temp+=line[nextline].charAt(nextchar);
document.bannerform.banner.value=temp+cursor
setTimeout("animate()",25)}

//if IE 4+ or NS6
if (document.all||document.getElementById)
window.onload=animate
// -->
</script>

See how this actually looks on a Black Background -
Click on the LINK - to see it at:
 Testing Google Blogs