/*Downloading and using this script without obtaining licenses from addobject.com is illegal.*/ /*Copyright 2007 www.addobject.com */ nlsScroller=new Object();_ua=navigator.userAgent;nls_isIE=(_ua.indexOf("MSIE")>=0);nls_isIE5=(_ua.indexOf("MSIE 5.0")>=0);nls_isIE4=(_ua.indexOf("MSIE 4")>=0);nls_isSafari=(_ua.indexOf("Safari")>=0);nls_isOpera=(_ua.indexOf("Opera")>=0);if(nls_isOpera)nls_isIE=false;function NlsScrollerIco(path){if(!path||path==""){var allScs=(document.getElementsByTagName?document.getElementsByTagName("SCRIPT"):document.scripts);for(var i=0;i=0){path=allScs[i].src.replace(/nlsscroller.js/gi,"img/");break}}}this.next=path+"next.gif";this.nextover=path+"nextover.gif";this.prev=path+"prev.gif";this.prevover=path+"prevover.gif";this.resume=path+"play.gif";this.resumeover=path+"playover.gif";this.stop=path+"stop.gif";this.stopover=path+"stopover.gif";this.backgrd=path+"bg.gif";this.modeauto=path+"modeauto.gif";this.modeman=path+"modeman.gif";this.loading=path+"loading.gif";return this}function NlsScroller(s){this.scrlId=s;this.intRef=null;this.blockObj=null;this.helper=null;this.ico=new NlsScrollerIco();nlsScroller[s]=this;this.mode="AUTO";this.effect=new NlsEffContinuous();this.showToolbar=false;this.toolbar=["MODE","PLAY","PREV","NEXT"];this.content=[];this.width=150;this.height=80;this.speed=3500;this.stylePref="";this.stopOnMouseOver=false;this.loadText="Loading...";this.prev=function(){this.effect.prev()};this.next=function(){this.effect.next()};this.onMouseOver=function(){};this.onMouseOut=function(){};return this}NLSSCROLLER=NlsScroller.prototype;NLSSCROLLER.setContent=function(c){var bd=c.match(/]/gi);if(bd){c=c.substr(c.indexOf(bd[0]));c=c.substr(c.indexOf(">")+1);bd=c.match(/<\/body>/gi);if(bd){c=c.substr(0,c.indexOf(bd[0]));}}var s="";c=c.replace(/<\/span>/gi,s);this.content=c.split(s);this.reload();};NLSSCROLLER.setContentById=function(id){var cnt=NlsScroller.GE(id);cnt.style.overflow="hidden";this.setContent(cnt.innerHTML);};NlsScroller.$posAttr=function(){var pos="absolute",dsp="none";if(nls_isIE4){pos="absolute";dsp="block"}return[pos,dsp]};NlsScroller.$genContent=function(c){var str="",atr=NlsScroller.$posAttr();;for(var i=0;i"+c.content[i]+"");}return str};NLSSCROLLER.render=function(plc){var atr=NlsScroller.$posAttr(),sId=this.scrlId,sObj="nlsScroller."+sId;var autoTool="";autoTool+="";autoTool+="";autoTool+="
RunStop
";var manTool="";manTool+="";manTool+="";manTool+="
PreviousNext
";var modeTool="
Toggle scroll mode: auto/manualToggle scroll mode: auto/manual
";var ld="";var str=NlsScroller.$genContent(this);str="
"+str+"
";str+=("
");str=("
"+str+"
");str="
"+str;str+="
";str="";if(this.showToolbar&&this.toolbar.length>0)str+="";str+="
"+ld+str+"
 "+autoTool+manTool+""+modeTool+"
";str+="";if(plc){var tPlc=NlsScroller.GE(plc);tPlc.innerHTML=str;tPlc.style.display="block"}else{document.write(str);str=""}this.helper=NlsScroller.GE(sId+"Helper");this.scrl=NlsScroller.GE(sId);this.cntWin=NlsScroller.GE(sId+"$content");this.ldng=NlsScroller.GE(sId+"$loading");if(nls_isIE){window.attachEvent("onload",function(){nlsScroller[sId].start();});}else{window.addEventListener("load",function(){nlsScroller[sId].start();},false);}return str};NLSSCROLLER.reload=function(){if(!this.cntWin)return;this.stop();this.cntWin.innerHTML=NlsScroller.$genContent(this);};NLSSCROLLER.start=function(){var line=null;this.blockObj=[];for(var i=0;i=bound);}};NlsScroller.prevTopic=function(){this.cfg.topicsequence="prev";this.run();};NlsScroller.nextTopic=function(){this.cfg.topicsequence="next";this.run();};NlsScroller.setTopic=function(){this.crTpc=NlsScroller.getTopic(this);};NlsScroller.getTopic=function(f){var cnt=f.scr.blockObj.length,tp=f.crTpc;if(f.cfg.topicsequence=="next"){tp=(tp==cnt-1?0:tp+1);}else{tp=(tp==0?cnt-1:tp-1);}return tp};NlsScroller.tbMOVR=function(b){NlsScroller.GE(b).style.display="none";NlsScroller.GE(b+"over").style.display=""};NlsScroller.tbMOUT=function(b){NlsScroller.GE(b).style.display="";NlsScroller.GE(b+"over").style.display="none"};NlsScroller.mOver=function(scrlId){var scr=nlsScroller[scrlId];if(scr.mode=="MANUAL")return;if(scr.stopOnMouseOver)scr.stop();scr.onMouseOver();};NlsScroller.mOut=function(scrlId){var scr=nlsScroller[scrlId];if(scr.mode=="MANUAL")return;if(scr.stopOnMouseOver)scr.resume();scr.onMouseOut();};function NlsEffContinuous(conf){var me=this;this.scr=null;this.rtprop={};this.cfg={direction:"up",speed:40,step:1,delay:0};if(conf&&conf!=""){var tcnf=conf.replace(/\s+/gi,"").toLowerCase().split(",");var keyval="";for(var i=0;ithis.scr[p_dim]){pos=parseInt(bl[i-1].style[p_dir])+bl[i-1][p_odim];l.style[p_dir]=pos+"px";break}}l=bl[0];pos=parseInt(l.style[p_dir]);var bound=-l[p_odim];if(NlsScroller.exitView(this.cfg["direction"],pos,bound)){var t=parseInt(this.lsTpc.style[p_dir])+this.lsTpc[p_odim];l.style[p_dir]=(t>this.scr[p_dim]?t:this.scr[p_dim])+"px";this.lsTpc=l;for(var i=0;i0){this.stop();setTimeout(function(){me.run();},+this.cfg["delay"]);}}}function runDownRight(step,p_dir,p_odim,p_dim){var l,pos,bl=this.scr.blockObj;for(var i=0;i0){this.stop();setTimeout(function(){me.run();},+this.cfg["delay"]);}}};this.stop=function(){if(this.rtprop["tmId"]!=null){clearInterval(this.rtprop["tmId"]);this.rtprop["tmId"]=null}}}