var fader = new Array();

fader[0] = new fadeObject('fade0', 'dddddd', '000000', 20, 20);
fader[0].msg[0] = "This is an optional default message; the fade object on the right side has no default.  Mouseover each topic to make quotes fade in and out.";

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) ? 500 : 9000);

  // 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', '819c6d', 'ffffff', 30, 30);
fader[2].msg[1] = "<em>This approach is exactly what our company needs and already it is making a big impact!</em><br /><br />-Andrew Ryan of EnableSoft ";
fader[2].msg[2] = "<em>After less than 2 weeks of purchasing your kit, I have made a giant leap forward in my business!</em><br /><br />-Tony Snider of RTS Computer Services";


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