var currentNews=0;var intTickSpeed=5000;function ClicktNav(a){if(!arrNewsItems.length)return;$('#'+a).mouseup(function(){$(this).removeClass('tnav'+a)}).mousedown(function(){$(this).addClass('tnav'+a)});if(a=="next")nextNews();else if(a=="back")prevNews()}function nextNews(){setNews(currentNews)}function prevNews(){setNews(currentNews-2)}function initTicker(){if(!arrNewsItems.length)return;$("#ticker")[0].onmouseover=stopTicker;$("#ticker")[0].onmouseout=resumeTicker;$("#back")[0].onmouseover=stopTicker;$("#next")[0].onmouseover=stopTicker;$("#next")[0].onmouseout=resumeTicker;$("#back")[0].onmouseout=resumeTicker;playTicker()}function stopTicker(){clearTimeout(tickerTimerID)}function resumeTicker(){clearTimeout(tickerTimerID);tickerTimerID=self.setTimeout("playTicker()",intTickSpeed)}function playTicker(){setNews(currentNews);tickerTimerID=self.setTimeout("playTicker()",intTickSpeed)}function setNews(a){if(arrNewsItems.length<a+1)a=0;else if(a<0)a=arrNewsItems.length-1;strResults='';strResults+='<a href="'+arrNewsItems[a][1]+'" target="_0">';strResults+=arrNewsItems[a][0]+'</a>';$("#ticker_content").html(strResults);var b=$("#ticker_content").width();var c=$("#ticker_content").height();$("#ticker_typer").css({'width':b,'height':c}).animate({width:0},1000,function(){});currentNews=a+1}
