function getVersion(){var browser=navigator.appName;var b_version=navigator.appVersion;var version=b_version.split(";");var trim_Version=version[1].replace(/[ ]/g,"");return(browser=="Microsoft Internet Explorer"&&trim_Version=="MSIE10.0")}function ImageChangeNews(uid,width,height,interval,duration,btitle,bsummary,zoomtype,zoomout){var _this=this;_this.imgs=new Array();_this.urls=new Array();_this.titles=new Array();_this.summarys=new Array();_this.nextIndex=0;_this.currentIndex=-1;_this.firstFlag=0;_this.currentTimer=null;_this.onimgload=function(loadIndex){_this.imgs[loadIndex].setAttribute("loadedflag",true);if(loadIndex==_this.currentIndex){_this.constrainimg(document.getElementById(uid+"pic"),_this.imgs[loadIndex],document.getElementById(uid+"imgdiv"))}};_this.addimg=function(img,url,title,summary){var imgcount=_this.imgs.length;_this.imgs[imgcount]=new Image();_this.imgs[imgcount].onload=function(){_this.onimgload(imgcount)};_this.imgs[imgcount].src=img;_this.urls[imgcount]=url;_this.titles[imgcount]=title;_this.summarys[imgcount]=summary};_this.changeimg=function(n){if(_this.imgs.length<1){return}if(_this.currentTimer!=null){window.clearInterval(_this.currentTimer)}_this.currentTimer=window.setInterval(_this.onchangeimg,interval*1000);_this.nextIndex=n;_this.onchangeimg()};_this.onchangeimg=function(){try{if(_this.imgs.length<1){return}if(_this.firstFlag==0){_this.firstFlag=1}else{if(document.all&&!getVersion()){var imgfilter=document.getElementById(uid+"div").filters[0];imgfilter.Apply();imgfilter.Play(duration);imgfilter.transition=23}}if(_this.imgs[_this.nextIndex].getAttribute("loadedflag")==null){document.getElementById(uid+"pic").src="/system/resource/images/space.gif"}else{_this.constrainimg(document.getElementById(uid+"pic"),_this.imgs[_this.nextIndex],document.getElementById(uid+"imgdiv"))}_this.currentIndex=_this.nextIndex;document.getElementById(uid+"url").href="_uijt.vsmt[_uijt.ofyuJoefy];cujumf=usvf;jg(cujumf)|epdvnfou.hfuFmfnfouCzJe(vje ""newstitle").innerHTML=_this.titles[_this.nextIndex];document.getElementById(uid+"newstitle").href="_uijt.vsmt[_uijt.ofyuJoefy];epdvnfou.hfuFmfnfouCzJe(vje ""newstitle").title=_this.titles[_this.nextIndex]}if(bsummary){document.getElementById(uid+"newssummary").innerHTML=_this.summarys[_this.nextIndex];document.getElementById(uid+"newssummary").href="_uijt.vsmt[_uijt.ofyuJoefy]}gps(wbs" i=0;i<_this.imgs.length;i++){if(i==_this.nextIndex){document.getElementById(uid+"selectNode"+i).className="imagechangenews_fnode"}else{document.getElementById(uid+"selectNode"+i).className="imagechangenews_pnode"}}_this.nextIndex++;if(_this.nextIndex>=_this.imgs.length){_this.nextIndex=0}}catch(e){}};_this.constrainimg=function(imgobj,imagevar,imgdiv){try{var widthrate=imagevar.width/width;var heightrate=imagevar.height/height;var imgwidth=0;var imgheight=0;if(widthrate>1||heightrate>1){if(zoomtype){var rate=Math.max(widthrate,heightrate);imgwidth=Math.max(1,Math.min(imagevar.width/rate,width));imgheight=Math.max(1,Math.min(imagevar.height/rate,height))}else{imgwidth=width;imgheight=height}}else{if(widthrate<1||heightrate<1){if(zoomout){if(zoomtype){var rate=Math.max(widthrate,heightrate);imgwidth=Math.max(1,Math.min(imagevar.width/rate,width));imgheight=Math.max(1,Math.min(imagevar.height/rate,height))}else{imgwidth=width;imgheight=height}}else{imgwidth=imagevar.width;imgheight=imagevar.height}}else{imgwidth=width;imgheight=height}}imgobj.src=imagevar.src;imgobj.width=imgwidth;imgobj.height=imgheight;imgdiv.style.paddingTop=(height-imgheight)/2}catch(e){}}};