function rotateText(el, textGroup) {
  setOpacity(el, 0);
  var t = rotateText.texts[textGroup];
  var t = t[Math.floor(Math.random() * (t.length - 1))];
  el.innerHTML = t;
  unfadeText(el, textGroup);
}
rotateText.texts = {
  quotes: [
    "''We are amazed at how reliable Patient Prompt is''",
	"''Patient Prompt has reduced our Patient No-Shows by over 80% in just 90 Days''",
	"''Patient Prompt more than pays for itself each month''",
	"''Patient Prompt support is excellent, they assisted immediately on any issue we had.''",
	"''You can tell the team at Patient Prompt know their business''",
	"''Patient Prompt's two way capacity has completely automated our office. I am surprised other appointment reminder applications aren’t designed this way''",
	"''Their ability to communicate directly with our scheduling system is light years ahead of anything out there right now''",
	"''We looked at quite a few applications, none offered the features, and capabilities of Patient Prompt''",
	"''Our patient's love it, our staff loves it, and my accountant loves it... that' s good enough for me.''",
	"''You can tell the team at Patient Prompt know their business''",
	"''Patient Prompt was recommended by our Practice Consultant, we were not dissappointed''",
	"''You guys made it really easy...''",
	"''Patient Prompt is really a fantastic example of great customer service!''",
	"''I wish 1/4 of the vendors we work with were as responsive and efficient as you.''"
  ]
};

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]), 1000);
    return;
  }
  setOpacity(el, v);
  setTimeout(bundleFunction(null, unfadeText, [el, tg]), 5);
}

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]), 5);
}

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);
  };
}