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.  It waits only 100 milli-
 *   seconds when fading out, but 5000 milliseconds (5 seconds) when
 *   fading in; this means the message will remain visible for about 5
 *   seconds before fading out again.
 *
 * 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
  setTimeout(function() { throb(item); }, (hash[item] % 2) ? 100 : 5000);

  // 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', 'bbbbbb', '888888', 30, 30);
fader[2].msg[1] = "<em>I fixed the PO ... you guys are tooo awesome! How in the world are you reducing the price when all others are slamming me with increases? I really appreciate you passing these savings on to us!</em><br/><br/><strong>Overland Storage</strong> ";
fader[2].msg[2] = "<em>Have I ever told you how wonderful you guys are to us? You and all the folks at Alta are the best!</em><br/><br/><strong>Asymtek </strong> ";
fader[2].msg[3] = "<em>We have the proofs, thanks so much! Fantastic service!</em><br/><br/><strong>Chopra Center</strong> ";
fader[2].msg[4] = "<em>Thank you so much for getting everything to us so quickly and I really appreciate your assembly of the binders - what a nice suprise!</em><br/><br/><strong>Make A Wish Foundation</strong> ";
fader[2].msg[5] = "<em>Thanks a million for the quick turn around and delivery service, and of course all your hard work!</em><br/><br/><strong>Century 21 Horizon</strong> ";
fader[2].msg[6] = "<em>Thanks for getting these to me so quickly!</em><br/><br/><strong>Hydranautics</strong> ";
fader[2].msg[7] = "<em>Congratulations, you have met Asymtek’s requirements for quality and delivery! 100% quality!</em><br/><br/><strong>Asymtek</strong> ";
fader[2].msg[8] = "<em>I received the CLSD reception card and they look great! Thank you!</em><br/><br/><strong>California Healthcare Institute</strong> ";
fader[2].msg[9] = "<em>You’re amazing!!! Thank you so much for doing this so quickly and on such short notice.</em><br/><br/><strong>Life Solutions International</strong> ";



// Start this fader
setTimeout(function() { throb(2); }, 1000);