var quoteldx = 0;

function rotateText(el, textGroup) {
  setOpacity(el, 0);
  el.innerHTML = quotes[quoteldx++%quotes.length];
  unfadeText(el, textGroup);  
}
var quotes = [
    "&quot;...a formalist’s brain and an iconoclast’s heart...&quot;<br><br><small><i>Thea Singer, <br>The Boston Globe</i></small>",
    "&quot;...a master choreographer who is always full of surprises and new ideas.&quot; <br><br><small><i>Theodore Bale, <br>Bay Windows</i></small>",
    "&quot;...Myer explores heaven <br>on earth.&quot; <br><br><small><i>Debra Cash, <br>The Boston Globe</i></small>",
    "&quot;...Myer is a master weaver, smoothly blending ages and degrees of professionalism in intricately plotted yet simple-seeming dance...&quot;<br><br><small><i>Jennifer Dunning, <br>The New York Times</i></small>",
    ];

function setOpacity(el, value) {
  el.style.opacity = value / 100;
  el.style.filter = "alpha(opacity=" + value + ")";
}

function unfadeText(el, tg) {
  var v = el.style.opacity * 100 + 1;
  if(v > 100) {
    setOpacity(el, 100);
    setTimeout(bundleFunction(null, fadeText, [el, tg]), 5000);
    return;
  }
  setOpacity(el, v);
  setTimeout(bundleFunction(null, unfadeText, [el, tg]), 10);
}

function fadeText(el, tg) {
  var v = el.style.opacity * 100 - 1;
  if(v < 0) {
    setOpacity(el, 0);
    rotateText(el, tg);
    //or... setTimeout(bundleFunction(null, rotateText, [el, tg]), NUMBER);
    return;
  }
  setOpacity(el, v);
  setTimeout(bundleFunction(null, fadeText, [el, tg]), 10);
}

function bundleFunction(context, func, args) {
  context = context || null;
  if(typeof func == "string" && context)
    func = context[func];
  if(!args)
    args = [];
  else if(!(args instanceof Array))
    args = [args];
  return function() {
    return func.apply(context, args);
  };
}