<PROPERTY NAME="textcolor1"/>
<PROPERTY NAME="textbkcolor1"/>
<PROPERTY NAME="textcolor2"/>
<PROPERTY NAME="textbkcolor2"/>
<PROPERTY NAME="speed"/>
<PROPERTY NAME="letters1"/>
<PROPERTY NAME="letters2"/>
<PROPERTY NAME="pause"/>
<ATTACH EVENT="ondocumentready" HANDLER="flashIt"/>

<script language="jscript" src="images/z_HighlightTopic/z_timer.js"></script>
<script language="jscript">
var n=0;
var _timer=new Timer(speed);
var message
var basecolor=element.style.color;
var basebkcolor=element.style.backgroundColor;

function flashIt() {
	var flashStr;
	
	message = element.innerText;
	flashStr="";
	for (m=0;m<message.length;m++)
		flashStr=flashStr + "<span id='flashlight"+m+"' style='color:" + basecolor + ";background-color:" + basebkcolor + ";'>" + message.charAt(m) + "</span>";
	element.innerHTML=flashStr;
	_timer.ontimer = function () {flash();};
	_timer.start();
}

function crossref(number) {
	var crossobj=element.children[number];
	return crossobj;
}

function flash() {
	if (n<=message.length-1) {crossref(n).style.color=textcolor1;crossref(n).style.backgroundColor=textbkcolor1;}
	if (n>parseInt(letters1)-1) if(n-parseInt(letters1)<=message.length-1) {crossref(n-parseInt(letters1)).style.color=textcolor2;crossref(n-parseInt(letters1)).style.backgroundColor=textbkcolor2;}
	if (n>(parseInt(letters1)+parseInt(letters2))-1) if(n-parseInt(letters1)-parseInt(letters2)<=message.length-1) {crossref(n-parseInt(letters1)-parseInt(letters2)).style.color=basecolor;crossref(n-parseInt(letters1)-parseInt(letters2)).style.backgroundColor=basebkcolor;}
	if (n<message.length-1+parseInt(letters1)+parseInt(letters2))
		n++;
	else {
		n=0;
		_timer.stop();
		_timer = new Timer(pause);
		_timer.ontimer = function () {_timer.stop();_timer = new Timer(speed);_timer.ontimer = function () {flash();};_timer.start();}
	}
	_timer.start();
}
</script>
