')
if(this.dom)//ifmodernbrowserssuchasFirefox,IE5+
this.startit()
else{
this.nextimgidx++
setInterval("iss["+this.issid+"].rotateimg()",this.delay)
}
}
inter_slide.prototype.cntrl=function(){
this.cpad=this.imgs.length.toString().length;
document.write('ViewingImage:of'+this.imgs.length+'');
}
inter_slide.prototype.controls=function(){
varbrs=this.addbr?'
':'';
if(!this.ics&&!this.no_c)
document.write('n'+
(this.no_auto?'':'n')+
'>"onclick="iss['+this.issid+'].changeimg(true,'nav');">'+(this.jumpto?brs+'Jumpto:':'')+'')
elseif(this.ics&&!this.no_c){
varop=document.body.filters?'style="filter:alpha(opacity=100);"':'style="opacity:'+(this.man_start?0.99:0.45)+';"';
document.write(''+(this.no_auto?' | ':'')+'
n');
}
else
this.no_c=1;
}
inter_slide.prototype.jumper=function(e){
varkey;
if(typeofe=='object')
key=e.keyCode?e.keyCode:e.which?e.which:1;
if(key&&key!==13)
return;
varnum=typeofe=='number'?e:parseInt(this.go('goto'+this.issid).value);
if(num<=this.imgs.length&&num>0){
this.nextimgidx=num-2;
this.changeimg(true,'jump');
}
}
inter_slide.prototype.ibute=function(obj,i){
if(!obj.parentNode)
return;
if(i==1)
obj.parentNode.style.backgroundColor=this.ibut_hc?this.ibut_hc:'yellow';
elseif(i==2)
obj.parentNode.style.backgroundColor='transparent';
elseif(i==3){
obj.parentNode.style.borderTop=obj.parentNode.style.borderLeft='1pxsolidgray';
obj.parentNode.style.paddingRight='1px';obj.parentNode.style.paddingBottom=0;
}
if(i==2||i==4){
obj.parentNode.style.borderTop=obj.parentNode.style.borderLeft='none';
obj.parentNode.style.paddingRight='2px';obj.parentNode.style.paddingBottom='1px';
}
}
inter_slide.prototype.fadepic=function(){
if(this.fade&&this.degree<100){
this.faded=0
this.degree+=10
if(this.tempobj.filters&&this.tempobj.filters[0]){
if(typeofthis.tempobj.filters[0].opacity=="number")//ifIE6+
this.tempobj.filters[0].opacity=this.degree
else//elseifIE5.5-
this.tempobj.style.filter="alpha(opacity="+this.degree+")"
}
elseif(this.tempobj.style.MozOpacity)
this.tempobj.style.MozOpacity=this.degree/101
elseif(this.tempobj.style.KhtmlOpacity)
this.tempobj.style.KhtmlOpacity=this.degree/100
elseif(this.tempobj.style.opacity&&!this.tempobj.filters)
this.tempobj.style.opacity=this.degree/101
}
else{
this.faded=1
clearInterval(this.fadeclear)
this.nextcanvas=(this.curcanvas==this.canvasbase+"_0")?this.canvasbase+"_0":this.canvasbase+"_1"
this.tempobj=this.go(this.nextcanvas)
if(this.playing)
this.changeimg()
}
}
inter_slide.prototype.populateslide=function(picobj,picidx){
if(document.getElementsByTagName){
if(picobj.getElementsByTagName('a')[0]&&picobj.getElementsByTagName('a')[0].onclick)
picobj.getElementsByTagName('a')[0].onclick=null;
if(picobj.getElementsByTagName('img')[0]&&picobj.getElementsByTagName('img')[0].onload)
picobj.getElementsByTagName('img')[0].onload=null;
}
picobj.style.backgroundColor=this.imgs[picidx].fadecolor?this.imgs[picidx].fadecolor:this.fadecolor?this.fadecolor:'white';
varslideHTML=''
if(this.imgs[picidx][2]){//ifassociatedlinkexistsforimg
varspecs=this.imgs[picidx][4]?",'"+this.imgs[picidx][4]+"'":this.specs?",'"+this.specs+"'":'';
slideHTML+=''
}
slideHTML+=''
if(this.imgs[picidx][2])//ifassociatedlinkexistsforimg
slideHTML+=''
slideHTML+='
'
picobj.innerHTML=slideHTML
}
inter_slide.prototype.buttons=function(bool){
if(this.no_c)
return;
varnext=this.go('next'+this.issid),prev=this.go('prev'+this.issid);
next.disabled=prev.disabled=!bool;
next.title=bool?'next':'';
prev.title=bool?'previous':'';
if(this.jumpto&&!this.ics)
this.go('go'+this.issid).disabled=this.go('goto'+this.issid).disabled=!bool;
if(this.ics){
if(!this.no_auto){
vargo=this.go('gostp'+this.issid)
go.title=bool?'Play':'Stop';
go.src=bool?playimg:stopimg;
}
if(prev.filters&&prev.parentNode)
prev.parentNode.style.filter=next.parentNode.style.filter='alpha(opacity='+(bool?100:45)+')';
elseif(prev.style.opacity&&!prev.filters)
prev.style.opacity=next.style.opacity=bool?0.99:0.45;
}
}
inter_slide.prototype.imgload=function(el){
if(!el&&!this.imgel)
return;
varel=el?el:this.imgel;
if(el.width==0||el.height==0){
this.imgel=el;
varcacheobj=this;
clearTimeout(this.getdim)
this.getdim=setTimeout(function(){cacheobj.imgload()},300)
return;
}
varm=this.go('master'+this.issid).style,c0=this.go(this.canvasbase+'_0').style,c1=this.go(this.canvasbase+'_1').style;
if(!this.width){
this.width=el.width+this.imgborder*2;
m.width=c0.width=c1.width=this.width+'px';
}
if(!this.height){
this.height=el.height+this.imgborder*2;
m.height=c0.height=c1.height=this.height+'px';
}
}
inter_slide.prototype.changeimg=function(bool,nav){
if(this.playing){
this.buttons(false)
this.nextimgidx=(this.keeptrack()this.populateslide(this.tempobj,this.nextimgidx)
if(bool)
this.rotateimg()
else{
clearTimeout(this.inprocess)
this.inprocess=setTimeout("iss["+this.issid+"].rotateimg()",this.delay)
}
}
else{
if(!this.faded){
if(nav&&nav=='nav')
return;
this.nextimgidx=this.keeptrack()+(bool?1:-1)
this.nextimgidx=(this.nextimgidxthis.nextimgidx=(this.nextimgidx>-1)?this.nextimgidx:this.imgs.length+this.nextimgidx
return;
}
if(this.fadeclear)
clearInterval(this.fadeclear);
if(bool){
varloadidx=this.nextimgidx+2
loadidx=(loadidxloadidx=(loadidx>-1)?loadidx:this.imgs.length+loadidx;
this.loadimgidx[loadidx]=newImage();
this.loadimgidx[loadidx].src=this.imgs[loadidx][0];
}
else{
varloadidx=this.nextimgidx-2
loadidx=(loadidxloadidx=(loadidx>-1)?loadidx:this.imgs.length+loadidx
this.loadimgidx[loadidx]=newImage();
this.loadimgidx[loadidx].src=this.imgs[loadidx][0];
}
if(nav&&nav=='jump')
this.nextimgidx++;
else
this.nextimgidx=this.keeptrack()+(bool?1:-1)
this.nextimgidx=(this.nextimgidxthis.nextimgidx=(this.nextimgidx>-1)?this.nextimgidx:this.imgs.length+this.nextimgidx
this.populateslide(this.tempobj,this.nextimgidx)
this.rotateimg()
}
}
inter_slide.prototype.go=function(id){
returnthis.da?this.da[id]:document.getElementById(id);
}
inter_slide.prototype.rotateimg=function(){
if(this.dom){
varcimg=this.go('theimg'+this.nextimgidx+'_'+this.issid)?this.go('theimg'+this.nextimgidx+'_'+this.issid):null;
if(cimg&&typeofcimg.complete=='boolean'&&!cimg.complete){
varcacheobj=this
clearTimeout(this.loading)
this.loading=setTimeout(function(){cacheobj.rotateimg()},300)
return;
}
if(this.mouseovercheck==1){
varcacheobj=this
clearTimeout(this.mousep)
this.mousep=setTimeout(function(){cacheobj.rotateimg()},100)
return;
}
if(this.fade)
this.resetit()
varcrossobj=this.tempobj=this.go(this.curcanvas)
crossobj.style.zIndex++
varothercanvas=this.curcanvas==this.canvasbase+"_0"?this.go(this.canvasbase+"_1"):this.go(this.canvasbase+"_0");
othercanvas.style.zIndex=0;
if(this.descriptions)
this.go('imgdsc'+this.issid).innerHTML=this.imgs[this.keeptrack()][1];
if(this.counter){
varpadit='';
for(varp=0;ppadit+='0';
this.go('thecnt'+this.issid).innerHTML=padit+(this.keeptrack()}
if(this.jumpto)
this.go('goto'+this.issid).value=this.keeptrack()this.jumperidx=this.keeptrack()varfadeobj=this
clearInterval(this.fadeclear)
this.fadeclear=setInterval(function(){fadeobj.fadepic()},50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")?this.canvasbase+"_1":this.canvasbase+"_0"
}
else{
varv4imgobj=document.images['defaultslide'+this.issid]
v4imgobj.src=this.postimgs[this.nextimgidx].src
this.nextimgidx=(this.nextimgidx}
}
inter_slide.prototype.resetit=function(){
this.degree=10
varcrossobj=this.go(this.curcanvas)
if(crossobj.filters&&crossobj.filters[0]){
if(typeofcrossobj.filters[0].opacity=="number")//ifIE6+
crossobj.filters(0).opacity=this.degree
else//elseifIE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
elseif(crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
elseif(crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
elseif(crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
inter_slide.prototype.startit=function(){
this.playing=1
varcrossobj=this.go(this.curcanvas)
this.populateslide(crossobj,this.nextimgidx)
if(this.pausecheck==1){//ifslideshowshouldpauseonmouseover
varcacheobj=this
varcrossobjcontainer=this.go("master"+this.issid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimg()
if(this.no_auto)
this.gostop();
elseif(this.man_start)
this.gostop(this.go('gostp'+this.issid));
elseif(this.ics&&document.body.filters){//kludgeforIE5.5bug
this.buttons(false);
}
}
inter_slide.prototype.gostop=function(el){
if(el)
el.value=el.value=='Stop'?'Play':'Stop';
if(this.inprocess&&this.playing){
clearTimeout(this.inprocess);
this.nextimgidx-=this.faded;
}
this.playing=!this.playing;
if(this.playing){
clearInterval(this.fadeclear)
this.faded=1
this.changeimg(true);
}
else{
varloadidx=(this.keeptrack()this.loadimgidx[loadidx]=newImage();
this.loadimgidx[loadidx].src=this.imgs[loadidx][0];
this.jumper(this.jumperidx?this.jumperidx:0)
this.buttons(true);
}
}
inter_slide.prototype.keeptrack=function(){
if(!document.getElementsByTagName)
returnthis.nextimgidx;
varcanvases=[this.go('canvas'+this.issid+'_0'),this.go('canvas'+this.issid+'_1')]
if(canvases[0].style.zIndex>canvases[1].style.zIndex&&canvases[0].getElementsByTagName("img")[0])
returnparseInt(canvases[0].getElementsByTagName('img')[0].id.replace(/theimg/,''))
elseif(canvases[1].getElementsByTagName("img")[0])
returnparseInt(canvases[1].getElementsByTagName('img')[0].id.replace(/theimg/,''))
else
returnthis.nextimgidx;
}
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Copyright @ 2015-2024
福编程 fuphp All Rights Reserved.