<!--
// © copyright 2009 - MRE Software / Author: Emery Wooten / www.mresoftware.com
var pause = false; // Boolean to trigger pause on mouseover event
var t1,t2,t3; // Timer ID variables.
var icnt = 0; // Outside loop counter
var currentChar=1; //Inside loop counter and pointer into characters of the lines.

// The next code writes the div tag on the page complete with mouseover code.

//document.write("<div id=\'breakNews\'><div class=\'Header\'>LATEST NEWS: </div><div id=\'tick1\' class=\'tickl\' OnMouseOver=\'pause=true;\' OnMouseOut=\'pause=false; t3=setTimeout(\"type()\",2000);\'></div></div>");

document.write("<div id=\'breakNews\'><div id=\'tick1\' class=\'tickl\' OnMouseOver=\'pause=true;\' OnMouseOut=\'pause=false; t3=setTimeout(\"type()\",2000);\'></div></div>");

//
function type(){
clearTimeout(t1); //clear all timing
clearTimeout(t2); //clear all timing
clearTimeout(t3); //clear all timing

// The next code checks for mouseover pause and completes the line instantly if true.
if(pause && currentChar==1){return;}
else if (pause){currentChar=tickercontent[icnt].length-1;}

// The next code fast fills html tags by rapidly moving to the closing >.
if(tickercontent[icnt].charAt(currentChar-1)=='<'){
	while (tickercontent[icnt].charAt(currentChar-1)!='>'){
		currentChar++;
		if (currentChar>tickercontent[icnt].length){
		tickercontent[icnt]=tickercontent[icnt]+'>'; // correct for missing > overflow condition
		currentChar--;
		}
	}
}
// The next code types the textual part of the line and indexes to the next line
      document.getElementById('tick1').innerHTML=tickercontent[icnt].substr(0, currentChar);
      currentChar++
      if (currentChar>tickercontent[icnt].length)  // Are we at the last character in the line?
      {
        icnt++;
        if (icnt==tickercontent.length){  // Are we at the last line in the array?
        icnt=0;
        }
        currentChar=1;
        t1=setTimeout("type()", 5000);  // This is the pause between lines in ms   
      }
      else
      {
     pause=false; 
     t2=setTimeout("type()", 50);  // This is the pause between typed characters in ms
      }
}
//
type();  // This runs it!
//-->// JavaScript Document
