
function rotateQuotes() {
  var q = rotateQuotes.quotes;
  q = q[Math.floor(Math.random() * q.length)];
  var tr = document.getElementById("textrotator");
  var uf = unfade(tr, 7, 1, 0);
  tr.innerHTML = q;
  new TimeoutChainer({
    callback: function() {
      var f = fade(tr, 7, 1);
      new TimeoutChainer({
        callback: rotateQuotes,
        runAfter: f
      });
    },
    delay: 530000,
    runAfter: uf
  });
}

rotateQuotes.quotes = [

  	"<img src='/images/quotes/1.gif' width='335' height='116'>",
  	"<img src='/images/quotes/2.gif' width='335' height='116'>",
  	"<img src='/images/quotes/3.gif' width='335' height='116'>",
  	"<img src='/images/quotes/4.gif' width='335' height='116'>",
  	"<img src='/images/quotes/5.gif' width='335' height='116'>",
	"<img src='/images/quotes/6.gif' width='335' height='116'>",
	"<img src='/images/quotes/7.gif' width='335' height='116'>",
	"<img src='/images/quotes/8.gif' width='335' height='116'>",
	"<img src='/images/quotes/9.gif' width='335' height='116'>",
	"<img src='/images/quotes/91.gif' width='335' height='116'>",
	"<img src='/images/quotes/92.gif' width='335' height='116'>",
	"<img src='/images/quotes/93.gif' width='335' height='116'>",
	"<img src='/images/quotes/94.gif' width='335' height='116'>"
  
];

rotateQuotes();
