/*
 * This script will fade text from white to red.
 * Include the following in your html file...
 *
 * <head>
 *   <script language="JavaScript" type="text/javascript" src="./flashText.js">
 *   </script>
 *
 * <body>
 *                     <div id="flashingText">
 *                       <b>
 *                         Your Text Here
 *                       </b>
 *                     </div>
 * </body>
 */
var colour = 1;
var textcolours = Array( '#ffffff',
    '#acffff',
    '#aca0a0',
    '#ac8080',
    '#ac4040',
    '#ac1815',
    '#ac4040',
    '#ac8080',
    '#aca0a0',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff',
    '#ffffff'
    );

setInterval( 'flashText()', 60 );

colour = textcolours.length/4;
function flashText() {
    colour = colour + 1;
 
    if(colour > textcolours.length){
        colour = 0;
    }
 
    document.getElementById( 'flashingText' ).style.color = textcolours[ colour ];
   
} 


