var next_rss = ""; function get_next_item() { get_request('/feed_item.php', 'exec'); return false; } function new_rss_item(txt) { next_rss = txt; fade_out(100); } function change_rss_item(i) { i.innerHTML = next_rss; set_opacity(i, 100); } function fade_out(o) { var i = document.getElementById('rssitem'); if(o < 0) { change_rss_item(i); } else { set_opacity(i, o); setTimeout('fade_out(' + (o-25) + ')', 10); } } function previous() { get_request('/feed_item.php', 'exec'); return false; } function set_opacity(obj, o) { if(!obj) return; obj.style.opacity = (o / 100); obj.style.MozOpacity = (o / 100); obj.style.KhtmlOpacity = (o / 100); obj.style.filter = 'alpha(opacity=' + o + ')'; }