function $(name){ return document.getElementById(name); }
var _t = [null, 10*1000, 20*1000],_s = {},_i = 0,_n = parseInt(Math.random()*3), _nt=null;
function transition(id){if(_s[id]){var t = _s[id];if(t[4]==t[3]){clearInterval(t[5]);_s[id] = null;}else{var d = (t[3]-t[4])/4;t[4] += d>0? Math.ceil(d):Math.floor(d);t[0][t[1]] = t[4];}}}
function newTransition(obj, property, start, end){obj[property] = start;var iv = setInterval("transition("+_i+")", 10);_s[_i++] = [obj, property, start, end, start, iv];}
function showDot(s){var nv = $('helpDots');for(var i=0;i<nv.childNodes.length;i++)nv.childNodes[i].childNodes[0].src = "i/dot"+(s==i? "1":"0")+".gif";}
function showNews(i,a){if(!a)clearInterval(_nt);clearInterval(_t[0]);var s = $("helpText");var jh = parseInt(s.scrollWidth/3);showDot(i);newTransition(s, "scrollLeft", parseInt(s.scrollLeft), (2-i)*jh);}
function play(i,m){var r=$('Radio');if(!r.loadFeed)r=document.getElementsByName("Radio")[0];r.loadFeed("podcast.aspx?"+(m==1? "p":"t")+"="+i);return false;}
_nt = setInterval("showNews(2-_n++%3,1)", 30*1000);
showNews(2-_n++%3,1);
