var items; var currentItem = 0; var autoProgressId = null; function getRFPFeed() { $("#flipper")[0].innerHTML = "Loading..."; onFeedLoad(feeder); }
function onFeedLoad(a) { items = a.split("|"); items.splice(items.length - 1, 1); showItem(0); $("#flipper").bind("mouseenter mousemove mouseover", function(e) { stopAutoProgress(); return true; }); $("#flipper").bind("mouseleave", function(e) { startAutoProgress(); return false; }); startAutoProgress(); }
function showNextItem() {
    var a = currentItem + 1; if (a >= items.length) { a = 0 }
    showItem(a)
}
function showItem(b) {
    currentItem = b; var a = items[b]; if (a.length > 355) { a = a.substr(0, 355); a = a.substr(0, a.lastIndexOf(" ")) + "..." }
    $("#flipper").fadeOut("slow", function() { $("#flipper").html(a).fadeIn("slow") })
}
function startAutoProgress() { if (!autoProgressId) { autoProgressId = setInterval(showNextItem, cycleTime * 1000); } }
function stopAutoProgress() { if (autoProgressId) { clearInterval(autoProgressId); autoProgressId = null; } }
