

/****** TEXT COLOUR CYCLER v1.0 by Angus Turnbull http://www.twinhelix.com ******/





// *** COMMON CROSS-BROWSER COMPATIBILITY CODE ***

var isDOM=document.getElementById?1:0;
var isIE=document.all?1:0;
var isNS4=navigator.appName=='Netscape'&&!isDOM?1:0;
var isIE4=isIE&&!isDOM?1:0;
var isOp=window.opera?1:0;
var isDyn=isDOM||isIE||isNS4;

function getRef(id, par)
{
 par=!par?document:(par.navigator?par.document:par);
 return isIE ? par.all[id] :
  (isDOM ? (par.getElementById?par:par.ownerDocument).getElementById(id) :
  (isNS4 ? par.layers[id] : null));
}






// *** TEXT CYCLING FUNCTIONS ***

function txcCycle() { with (this)
{
 if (!div) div = getRef(myName + 'Layer');
 
 // Increment the counter by 1, trim by array length.
 count = ((count - step) % colours.length);

 var str = '<span class="' + myName + '">';
 
 for (var i = 0; i < text.length; i++)
 {
  // For each letter, write a <font> tag with an appropriate colour.
  var pos = (count + i) % colours.length;
  if (pos < 0) pos += colours.length;
  str += '<font color="' + colours[pos] + '">' + text.substring(i, i + 1) + '</font>';
 }
 str += '</span>';

 // Write the content.
 if (isNS4) with (div.document)  { write(str); close() }
 else div.innerHTML = str;

 // Cycle again in a few seconds.
 setTimeout(myName + '.cycle()', interval);
}}

function TextCycler(myName)
{
 this.myName = myName;
 this.div = null;

 // An array of colours...
 this.colours = new Array ('#F2F2F2', '#EEEAEA', '#EAE2E2', '#E6DADA', '#E2D2D2', '#DECACA', '#DAC2C2', '#D6BABA', '#D2B2B2', '#CEAAAA', '#CAA2A2', '#C69A9A', '#C29292', '#BE8A8A', '#BA8282', '#B67A7A', '#B27272', '#B67A7A', '#BA8282', '#BE8A8A', '#C29292', '#C69A9A', '#CAA2A2', '#CEAAAA', '#D2B2B2', '#D6BABA', '#DAC2C2', '#DECACA', '#E2D2D2', '#E6DADA', '#EAE2E2', '#EEEAEA');

 // Interval in ms between cycles.
 this.interval = 50;
 // Current cycle position.
 this.count = 0;

 // How fast to step through the array... negative reverses direction.
 this.step = 1;

 // The all important text.
 this.text = 'Text Colour Cycler';
 this.link = '';
 // Functions.
 this.cycle = txcCycle;
}








// *** START EDITING HERE ***

// Create a new cycler, pass it its own name. Its name is also used as a stylesheet
// class, and the ID of its container layer below.
var waveText = new TextCycler('waveText');
with (waveText)
{
 // Set an array of colours through which it cycles.
//var colours = new Array ('#F2F2F2', '#EEEAEA', '#EAE2E2', '#E6DADA', '#E2D2D2', '#DECACA', '#DAC2C2', //'#D6BABA', '#D2B2B2', '#CEAAAA', '#CAA2A2', '#C69A9A', '#C29292', '#BE8A8A', '#BA8282', '#B67A7A', //'#B27272', '#B67A7A', '#BA8282', '#BE8A8A', '#C29292', '#C69A9A', '#CAA2A2', '#CEAAAA', '#D2B2B2', //'#D6BABA', '#DAC2C2', '#DECACA', '#E2D2D2', '#E6DADA', '#EAE2E2', '#EEEAEA');

 // Some text...
// text = 'SWF Audio Players';

 // Optionally set speed and direction.
// interval = 100;
//step = -1;


}



// Call it onload. Remember to add any other functions you're calling onload in here, and
// don't have a BODY ONLOAD section below.
window.onload = new Function('waveText.cycle()');

// End Hide -->



