﻿
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.";
fader[0].msg[1] = "Nowhere can a man find a quieter or more untroubled retreat than in his own soul.<br />- Marcus Aurelius";
fader[0].msg[2] = "Feeding the starving poor only increases their number.<br />- Ben Bova";
fader[0].msg[3] = "The limits of tyrants are prescribed by the endurance of those whom they oppose.<br />- Frederick Douglass";
fader[0].msg[4] = "The foolish man seeks happiness in the distance, the wise grows it under his feet.<br />- James Oppenheim";

fader[1] = new fadeObject('fade1', 'bbbbbb', '000000', 20, 20);
fader[1].msg[1] = "Success is relative. It is what we can make of the mess we have made of things.<br />- T.S. Eliot";
fader[1].msg[2] = "We have two ears and one mouth so we may listen more and talk the less.<br />- Epictetus";
fader[1].msg[3] = "It is better to be violent, if there is violence in our hearts, than to put on the cloak of nonviolence to cover impotence.<br />- Mahatma Gandhi";
fader[1].msg[4] = "Don't part with your illusions. When they are gone you may still exist, but you have ceased to live.<br />- Mark Twain";

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', '151f53', 30, 30);
fader[2].msg[1] = "Produits dérivés";
fader[2].msg[2] = "";
fader[2].msg[3] = "Optimisation";

fader[3] = new fadeObject('fade3', 'bbbbbb', '151f53', 50, 60);
fader[3].msg[1] = "Risk management";
fader[3].msg[2] = "";
fader[3].msg[3] = "Volatilité";


fader[4] = new fadeObject('fade4', 'bbbbbb', '151f53', 70, 60);
fader[4].msg[1] = "Trading";
fader[4].msg[2] = "";
fader[4].msg[3] = "Stochastique";

fader[5] = new fadeObject('fade5', 'bbbbbb', '151f53', 10, 60);
fader[5].msg[1] = "Corporate";
fader[5].msg[2] = "";
fader[5].msg[3] = "Benchmark";

fader[6] = new fadeObject('fade6', 'bbbbbb', '151f53', 40, 60);
fader[6].msg[1] = "Taux";
fader[6].msg[2] = "";
fader[6].msg[3] = "Stratégies";

fader[7] = new fadeObject('fade7', 'bbbbbb', '151f53', 60, 60);
fader[7].msg[1] = "Actions";
fader[7].msg[2] = "";
fader[7].msg[3] = "Arbitrage";
// Start this fader
setTimeout(function() { throb(2); }, 1000);
setTimeout(function() { throb(3); }, 2500);
setTimeout(function() { throb(4); }, 3500);
setTimeout(function() { throb(5); }, 1500);
setTimeout(function() { throb(6); }, 5500);
setTimeout(function() { throb(7); }, 500);