function ncBuildScrollTicker(pName, pWidth, pHeight, pSpeed, pClassName, p_lScrollType, p_bStartEmpty){var oTicker=window[pName]=new ncScrollTicker(pName, pWidth, pHeight, pSpeed, pClassName, p_lScrollType, p_bStartEmpty);oTicker.Build();oTicker.Init();}function ncScrollTicker(pName, pWidth, pHeight, pSpeed, pClassName, p_lScrollType, p_bStartEmpty){var t=this, d=document;t.Name=pName;t.Width=!isNaN(pWidth)?pWidth+"px":pWidth;t.Height=!isNaN(pHeight)?pHeight+"px":pHeight;t.Pauseable=1;t.OutputType=d.getElementById?t.UP_LEVEL:t.NON_COMPAT;t.ClassName=pClassName;var oDiv=d.getElementById(t.Name);t.Content=oDiv.innerHTML;oDiv.innerHTML="";oDiv.style.display="block";t.CurrentCopy=1;t.Speed=pSpeed>3?pSpeed-3:pSpeed * 0.25;t.Interval=25;t.CurrSpeed=t.Speed;t.PauseSpeed=t.Pauseable?0:t.CurrSpeed;t.ContentHeight="";t.FirstScroll=1;t.ScrollType=p_lScrollType==t.SCROLL_LEFT?t.SCROLL_LEFT:t.SCROLL_UP;t.StartEmpty=p_bStartEmpty;return t;}ncScrollTicker.prototype.UP_LEVEL=0;ncScrollTicker.prototype.NON_COMPAT=2;ncScrollTicker.prototype.SCROLL_UP=0;ncScrollTicker.prototype.SCROLL_LEFT=1;ncScrollTicker.prototype.Build=function(){var t=this;if(t.OutputType==t.UP_LEVEL){var sStyle='overflow:hidden;';if(t.ScrollType==t.SCROLL_UP){sStyle+='width:'+t.Width+';height:'+t.Height+';';}var sHtml='<div class="'+t.ClassName+'" style="'+sStyle+'" '+'onmouseover="'+t.Name+'.CurrSpeed='+t.Name+'.PauseSpeed;" '+'onmouseout="'+t.Name+'.CurrSpeed='+t.Name+'.Speed">'+'<div id="'+t.Name+'_CH" style="position:relative;overflow:hidden;height:100%;width:100%;">'+'<div id="'+t.Name+'_C1" style="position:relative;left:0px;top:0px;"></div>'+'<div id="'+t.Name+'_C2" style="position:relative;left:0px;top:0px;"></div>'+'</div></div>';  document.getElementById(t.Name).innerHTML=sHtml;}"";};ncScrollTicker.prototype.Init=function(){var t=this;if(t.OutputType==t.UP_LEVEL){t.Top=parseInt(t.Height)+8;var oContentHolder=document.getElementById(t.Name+"_CH");var lScrollWidth=t.Left=oContentHolder.offsetWidth;oContentHolder.style.width=lScrollWidth+"px";var te1=t.TargetEl1=document.getElementById(t.Name+"_C1");if(!t.StartEmpty){t.Top=0;t.Left=0;}if(t.ScrollType==t.SCROLL_LEFT){te1.style.left=t.Left+"px";}else{te1.style.top=t.Top+"px";}te1.innerHTML='<div'+(t.ScrollType==t.SCROLL_LEFT?' style="white-space:nowrap;"':'')+'>'+t.Content+'</div>';var te2=t.TargetEl2=document.getElementById(t.Name+"_C2");if(t.ScrollType==t.SCROLL_UP){t.ContentHeight=te1.offsetHeight;if(parseInt(t.Height, 10)>parseInt(t.ContentHeight, 10)){var copiesRequired=Math.ceil(parseInt(t.Height, 10) / parseInt(t.ContentHeight, 10))-1;copiesRequired=Math.min(copiesRequired, 10);for(var i=0;i<copiesRequired;i++){ te1.innerHTML+='<div>'+t.Content+'</div>';}t.ContentHeight=te1.offsetHeight;}}else{te2.style.top=-(t.TargetEl1.offsetHeight)+"px";te2.style.left=t.Left;var oTest=oContentHolder.appendChild(document.createElement("div"));oTest.style.position="absolute";oTest.style.visibility="hidden";oTest.style.width="auto";oTest.innerHTML=te1.innerHTML;var lTrueWidth=oTest.childNodes[0].offsetWidth;oContentHolder.removeChild(oTest);if(lTrueWidth<lScrollWidth){var lCopies=Math.ceil(lScrollWidth / lTrueWidth);var sHtml=t.Content;for(var i=0;i<lCopies;i++){sHtml+=t.Content;}te1.innerHTML='<div style="white-space:nowrap;">'+sHtml+'</div>';lTrueWidth=lTrueWidth * (lCopies+1);}te1.style.width=te2.style.width=lTrueWidth+'px';t.ContentWidth=te1.offsetWidth;}te2.innerHTML=te1.innerHTML;var sScrollCall=t.ScrollType==t.SCROLL_LEFT?".ScrollH();":".ScrollV()";t.__ScrollInterval=setInterval(t.Name+sScrollCall, t.Interval);}};ncScrollTicker.prototype.CleanUp=function(){var t=this;if(t.__ScrollInterval){clearInterval(t.__ScrollInterval);t.__ScrollInterval=null;}};ncScrollTicker.prototype.ScrollV=function(){var t=this;if(t.Top>=t.ContentHeight *-1){t.Top=t.Top-t.CurrSpeed;}else{t.FirstScroll=0;t.Top=parseInt(t.ContentHeight);}var top=parseInt(t.Top);te2Below=t.FirstScroll||top<0;t.TargetEl1.style.top=top+"px";if(te2Below){t.TargetEl2.style.top=(top)+"px";}else{t.TargetEl2.style.top=(top-(t.ContentHeight * 2))+"px";}};ncScrollTicker.prototype.ScrollH=function(){var t=this;if(t.Left>=t.ContentWidth *-1){t.Left=t.Left-t.CurrSpeed;}else{t.FirstScroll=0;t.Left=parseInt(t.ContentWidth);}var left=parseInt(t.Left);te2Right=t.FirstScroll||left<0;t.TargetEl1.style.left=left+"px";if(te2Right){t.TargetEl2.style.left=(left+t.ContentWidth)+"px";}else{t.TargetEl2.style.left=(left-t.ContentWidth)+"px";}};