#fcleft">




This is one of the neat examples brought to you using Javascript1.2. As you can see, the text changes color every second. This is a great way to attract the user's attention to some text without using the annoying BLINK tag. It's also very simple to change to your needs and is supported by both major browsers.
The source..


<script language="Javascript1.2"> 
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

function initArray() {

this.length = initArray.arguments.length;
  for (var i = 0; i < this.length; i++) {
  this[i] = initArray.arguments[i];
  }
}

var ctext = "This message changes color !!!" 
var speed = 1000

var x = 0

var color = new initArray("red", 
"blue", 
"green",
"black"
);

if(navigator.appName == "Netscape") {
document.write('<layer id="c">'+ctext+'</layer><br>');
}

if (navigator.appVersion.indexOf("MSIE") != -1){
document.write('<div id="c">'+ctext+'</div>');
}

function chcolor(){ 

if(navigator.appName == "Netscape") {
document.c.document.write('<font color="'+color[x]+'">'
+ctext+'</font>');
document.c.document.close();
}

else if (navigator.appVersion.indexOf("MSIE") != -1){
document.all.c.style.color = color[x];
}

(x < color.length-1) ? x++  : x=0;
} 

setInterval("chcolor()",1000) 
//-->
</script>


Color coding..


This is the message that you want to change color.
This is the speed that the text will change color (in milliseconds).
These are the actual colors that the text will change to. Each color is stated "color", . Just add and subtract that code from the Javascript and you'll be fine.