// JavaScript Document
//<![CDATA[

var bDoBlink=false;

var bOn = 0;

var visibility = ["hidden", "visible"]; // 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 bOn as the index into the array which stores the string values for visibility

		update bOn to the next index (either 0 or 1)

		set the timeout value to call this function again

*/

function doBlink() {

	var blinkObj = document.getElementById("jsBlink");  // could store blinkObj in a global variable so do not have to retrieve each time;

	if (bDoBlink == true) {

		blinkObj.style.visibility=visibility[bOn];

		bOn = ++bOn % 2;

		setTimeout("doBlink()",1000);

	}





}

/* 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 toggleBlink() {

	bDoBlink = !bDoBlink;

	if (bDoBlink == true) {

		setTimeout("doBlink()",500);

	}

	else {

		var blinkObj = blinkObj = document.getElementById("jsBlink");

		blinkObj.style.visibility = "visible";

	}

}



//]]>
