/* *****
 * User defined fade objects and messages
 *
 */
var fader = new Array();

/* • •• º • •• •
 * The code below describes how to make a throbbing or automatic fade
 * sequence of messages.  It is important to note that this function is
 * NOT part of the Buffered Text-Fade Effect, but merely an example of
 * how it can be used.  In this example, the throb() function controls
 * the commands which are sent to the fade engine; it is called
 * repeatedly at set time intervals rather than using mouseover events
 * as triggers.
 *
 * Notes:
 * - A global array "hash" is used to keep track of where each
 *   animation is currently in the sequence.
 * - The list of messages defined in the fader *must* start at one (1)
 *   and count upwards without skipping any integers.
 * - The third line of the throb() function controls how fast
 *   commands get sent to the fade engine.  The first value is the time 
 *   faded out (in milliseconds).  The second value determines (in Milliseconds)
 *   time text remains faded in.
 *
 * Other types of fade animation are possible simply by designing
 * different ways to control the fade-ins and fade-outs!
 */
var hash = new Array();
function throb(item) {

  // If the hash array does not have an entry for this item, initialise it at 2
  if (!hash[item]) hash[item] = 2;

  // Send a fade command, using the hash array to tell us what parameters we should use
  fader[item].fade(Math.floor(hash[item] / 2), !(hash[item] % 2));

  /* Call this function again for this same item after a certain amount of time. 
  * Default was 0 : 5000.  The first number sets the STATIC non fading duration of fade IN color.
  *	The second number sets the STATIC non fading duration of fade OUT color.
  */
  setTimeout(function() { throb(item); }, (hash[item] % 2) ? 350 : 2300);

  // If we have exceeded the number of messages in this fader, start over again at 2
  if (++hash[item] > fader[item].msg.length * 2 - 1) hash[item] = 2;
}

fader[2] = new fadeObject('fade2', '7A3605', '1DFF91', 120, 30);


/*  The first argument ('fade2') is the id of the HTML tag which will
*   be displaying the fading effect.  Usually you'll want to apply some
* 	height and width styles to this element, since it starts out with no
* 	text by default and will probably be collapsed.  You don't want it
* 	jumping around when the script writes new text to it.
*
*   The two hexidecimal values are colour values, (WITHOUT "#" preceding).
* 	The first hex value is the starting colour, or the colour
* 	the text is during fade in & fade out.  The second hex value is the ending
* 	colour, or the colour the text will be when it finishes fading in and
* 	before it fades out.
*
*   The last two values are two integers which indicate the number of
* 	"steps" the script must take to complete a fade-in and a fade-out
* 	respectively.  With a value of 20, there will be 20 colour changes
* 	before the text is fully faded-in or faded-out.
* 	The lower these numbers, the faster the fade will be.
*/

fader[2].msg[1] = "         <h5><u><b>A L L &nbsp; I &nbsp; G O T&nbsp; &nbsp;<i>( f o r &nbsp; M u r r e l )</i>         ";
fader[2].msg[2] = "         <h4><u><b>A L L &nbsp; I &nbsp; G O T&nbsp; &nbsp;<i>( f o r &nbsp; M u r r e l )</i>         ";
fader[2].msg[3] = "         <h4><u><b>A L L &nbsp; I &nbsp; G O T&nbsp; &nbsp;<i>( f o r &nbsp; M u r r e l )</i>         ";
fader[2].msg[4] = "<h5><u><b>L &nbsp;e &nbsp;a &nbsp;r &nbsp;n &nbsp;&nbsp;&nbsp; m &nbsp;o &nbsp;r &nbsp;e .</b></u></h5>";
fader[2].msg[5] = "                   <h3><u><i><b>C l i c k &nbsp; h e r e .</i></b></u></h3>                            ";
fader[2].msg[6] = "";

// Start this fader routine AFTER xx milliseconds
setTimeout(function() { throb(2); }, 700);
