var intReturnSpeed = 1;

function moveText()
{
 document.getElementById('thetext').style.left = objText.left;
}

// ---- Sets up the next story to be shown, setting up necessary var's and divs
function initStory()
{
 objText.left = objText.startLeft;
 moveText();
 writeLoop();
}

function writeLoop()
{
 if (parseInt(objText.left) > 0)
 {
  objText.left = parseInt(objText.left) - intReturnSpeed + 'px';
  moveText();
  setTimeout("writeLoop()",10);
 }
 else
 {
  setTimeout("initStory()",3000);
 }
}

// --- Set up objects with fixed vars - used for Fish and Mask divs
function tickerDiv(strLeft,strWidth,strVis)
{
 this.left = strLeft;
 this.startLeft = strLeft;
 this.width = strWidth;
 this.maxWidth = strWidth;
 this.visibility = strVis;
}

// --- called on page load; set up objects and var's, and first text layer
function initNews()
{
 objText = new tickerDiv('240px','230px',"'visible'");
 initStory();
}
