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: [
"Football games in both the Orange Bowl & Landshark Stadium. Go 'Canes! <blockquote> - Melissa, 2010 Dean's Dozen</blockquote>",
"...it has all the benefits of a large school while allowing for small classes, personal relationships with professors, and involvement in extra-curricular activit<blockquote> - Felice, 2010 Dean's Dozen</blockquote>",
"...the opportunity to observe gen. med. doctors, orthopedists, etc.<blockquote> - Sabrina, 2010 Dean's Dozen</blockquote>",
"...studying abroad in Prague.<blockquote> - Hannah, 2010 Dean's Dozen</blockquote>",
"Teachers, Weather, Campus, Sports.<blockquote> - Shahaan, 2010 Dean's Dozen</blockquote>",
"The People:  whether it be professors, students, or staff, I have met people that have not only changed my career path/pushed me to the highest standards, they have changed my life. <blockquote> - Alison, 2010 Dean's Dozen</blockquote>",
"...applying for Teach for America.<blockquote> - Monica, 2010 Dean's Dozen</blockquote>",
"The diversity at UM gives it a 'global village' feel...<blockquote> - Andrew, 2010 Dean's Dozen</blockquote>",
],
authors: [
"Mark Twain",
"Charles Dickens",
"Edgar Allen Poe"
],
restaurants: [
]
};

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]), 3500);
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);
};
}
