// JavaScript Document
//<![CDATA[

var bDoColor=false;

var cOn = 0;

var changecolor = ["#2929BD", "#FE9900"]; // array that stores the css visibility values

/* function doBlink

	get the object to make blink - its id could be passed as a variable

	check the global bDoBlink to see the status of blinking

	if it is on

		set the vibility of the object opposite of what it was

		use cOn as the index into the array which stores the string values for visibility

		update cOn to the next index (either 0 or 1)

		set the timeout value to call this function again

*/

function doColor() {

	var colorObj = document.getElementById("jsColor");  // could store blinkObj in a global variable so do not have to retrieve each time;

	if (bDoColor == true) {

		colorObj.style.color=changecolor[cOn];

		cOn = ++cOn % 2;

		setTimeout("doColor()",1400);

	}





}

/* function toggleBlink

	turns blinking on or off

	reverse the value of the global bDoBlink

	if blinking is now on,

		call setTimeout to call the doBlink function

	else

		get the blink object and set it to visible

*/

function toggleColor() {

	bDoColor = !bDoColor;

	if (bDoColor == true) {

		setTimeout("doColor()",700);

	}

	else {

		var colorObj = colorObj = document.getElementById("jsColor");

		colorObj.style.color = "red";

	}

}



//]]>