
var textIndex = 0;

function rotateText(el, textGroup) {
setOpacity(el, 0);
var t = rotateText.texts[textGroup];
var t = t[Math.floor((textIndex++) % (t.length))];
el.innerHTML = t;
unfadeText(el, textGroup);
}
rotateText.texts = {
quotes: [
"LAMPOON - ''This one fine app. Kinda Activity Monitor on steroids. :-)''",
"JIMBLU - ''this has become my favorite application of this type.''",
"SIBSCANA - ''The app are beautifull, has all the functions and pretty fast comparable to others.''",
"MORPE - ''wow!! great App!''",
"DOOBIEXX - ''I like it, and I think it has a very bright future.''",
"MAJOR MAUSER - ''Nice little program. Sort of like an activity viewer deluxe.''",
"tbdelivers - ''Definitely worth a try.''",
"Cliff - ''Thank you for atMonitor!''",
"Bruno - ''Run perfect on 10.6.''",
"Robin - ''What a great application!  Thank you.''",
"Devin - ''I've been using atMonitor for about a month and it's great!''", 
"appleaddiction.net - ''I was fortunate enough to stumble upon atMonitor.''",
"macfixit.com - ''(...) has become a permanent member of my troubleshooting utilities arsenal.''",
"Mika - ''Thank you very much for developing such a great program.''",
"Lorin - ''atMonitor rox.''",
"DoFoT9 - ''EXCELLENT!! thankyou times a billion!''",
"Melissa - ''Wow, atMonitor is nice (& free).''",
"FALLSTAFFA - ''I recently began using atMonitor (V 1.60) and find it very useful and elegant''",
"Leo - ''great job!''",
"Jill70 - ''This is THE monitor for OS X.''"
]
};

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 + 10;
if(v > 100) {
setOpacity(el, 100);
setTimeout(bundleFunction(null, fadeText, [el, tg]), 5000);
return;
}
setOpacity(el, v);
setTimeout(bundleFunction(null, unfadeText, [el, tg]), 50);
}

function fadeText(el, tg) {
var v = el.style.opacity * 100 - 10;
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);
};
}

