// JavaScript Document
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original:  Pete Thompson (thompp@globalnet.co.uk) -->
<!-- Web Site:  http://www.users.globalnet.co.uk/~thompp -->

<!-- Begin
// news ticker function
var newslist=new Array();
var cnt=0;			// current news item
var curr = "";
var i=-1;			// current letter being typed

newslist[0]=new Array("Check out this JavaScript!","")
newslist[1]=new Array("Use this JavaScript to post news items on your Web site","")
newslist[2]=new Array("Create a list of specials for the day","")
newslist[3]=new Array("Visit JavaScript Source","")
newslist[4]=new Array("The links can even be linked to other pages","")

function newsticker()
{
  // next character of current item
  if (i < newslist[cnt][0].length - 1)
  {
    i++;
    temp1 = newslist[cnt][0];
    temp1 = temp1.split('');
    curr = curr+temp1[i];
    temp2 = newslist[cnt][1];
    mtxt.innerHTML = " <small><font color='#ffffff'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>NEWS:</b> "+curr+"_</small></font>";
    setTimeout('newsticker()',10)
    return;
  }
  // new item
  i = -1; curr = "";
  if (cnt<newslist.length-1)
    cnt++;
  else
    cnt=0;
  setTimeout('newsticker()',3000)
}
//  End -->
