/* *****
 * User defined fade objects and messages
 *
 * These messages are used in fades triggered by mouseovers and
 * mouseouts on table cells.  They are the simplest type of fade and
 * require no extra Javascript code.
 */
var fader = new Array();

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', '4932a7', 'f9f9f9', 60, 60);
fader[2].msg[1] = "<a href=/index.html>Welcome to our new site!</a>";
fader[2].msg[2] = "<a href=/index.html>Stay tuned for information about the next conference...</a>";
fader[2].msg[3] = "<a href=/index.html>You can search our site in the box at the right</a>";
fader[2].msg[4] = "<a href=/index.html>Please contact us for more information!</a>";

// Start this fader
setTimeout(function() { throb(2); }, 1000);
