// Title: Tigra Fader // URL: http://www.softcomplex.com/products/tigra_fader/ // Version: 1.0 // Date: 07/23/2007 // Notes: This script is free. Visit official site for further details. // Modified for ASC by Chris Hansen of Nifty Technologies (19-Jun-2008). function tFader(a_items,a_labels,a_tpl) { if(!a_items) return alert("items structure is missing"); if(typeof(a_items)!='object') return alert("format of the items structure is incorrect"); if(a_items[a_items.length-1]==null) return alert("last element of the items structure is undefined"); if(!a_labels) return alert("labels structure is missing"); if(typeof(a_labels)!='object') return alert("format of the labels structure is incorrect"); if(a_labels[a_labels.length-1]==null) return alert("last element of the labels structure is undefined"); if(a_labels.length != a_items.length) return alert(a_labels.length + " labels are defined, but there are " + a_items.length + " items defined"); if(!a_tpl) { a_tpl=[]; } for (var i=0;i'); } document.write('',this.a_labels[0],''); if (slidesAreLinks) { document.write(''); } firstLabel = this.a_labels[0]; this.a_imgRefs[0]=document.images['tslide'+this.n_id+'_0']; this.n_currentSlide=0; if(!this.a_imgRefs[0]||!this.a_imgRefs[0].style||this.a_imgRefs[0].style.marginLeft==null)return; for(var i=1;i'); } document.write('',this.a_labels[i],''); if (slidesAreLinks) { document.write(''); } this.a_imgRefs[i]=document.images['tslide'+this.n_id+'_'+i]; this.a_imgRefs[i].style.marginLeft='-'+this.a_tpl.width+'px'; this.f_slideOp(i,0); this.a_imgRefs[i].style.zIndex=i; } this.H=Math.round(this.a_tpl['transtime']*1e3/this.a_tpl['steps']); this.D=Math.round(100/this.a_tpl['steps']); this.f_run(); } function O(G,C) { if(this.I) { clearTimeout(this.I); this.I=null; if(this.n_nextSlide){ this.f_slideOp(this.n_nextSlide,0); this.n_nextSlide=null; } } this.n_nextSlide=(G==null?this.n_currentSlide+1:G)%this.a_items.length; if(this.n_nextSlide==this.n_currentSlide) return; this.I=setTimeout('A_SLIDES['+this.n_id+'].f_fade'+(this.n_nextSlide>this.n_currentSlide?'In':'Out')+'()',(C?0:this.a_tpl['slidetime']*1e3)); // labeling goes here // alert(document.getElementById('PhotoTagText').firstChild.nodeType); if (document.getElementById('PhotoTagText') && document.getElementById('PhotoTagText').firstChild && typeof(document.getElementById('PhotoTagText').firstChild) == 'object') { var PhotoTagText = document.getElementById('PhotoTagText').firstChild; PhotoTagText.replaceData(0,PhotoTagText.length, document.images['tslide'+this.n_id+'_'+this.n_currentSlide].alt); } // thumb switching goes here if (document.getElementById('thumb_' + this.n_currentThumb) && typeof(document.getElementById('thumb_' + this.n_currentThumb)) == 'object') { document.getElementById('thumb_' + this.n_currentThumb).className = inactiveThumbClassName; this.n_currentThumb = this.n_currentSlide; document.getElementById('thumb_' + this.n_currentThumb).className = activeThumbClassName; } } function M(F) { if(F==null){F=0;} F+=this.D; if(F>99) { this.f_slideOp(this.n_nextSlide,99); this.f_slideOp(this.n_currentSlide,0); this.n_currentSlide=this.n_nextSlide; this.n_nextSlide=null; return this.f_run(); } this.f_slideOp(this.n_nextSlide,F); this.J=setTimeout('A_SLIDES['+this.n_id+'].f_fadeIn('+F+')',this.H); } function N(F) { if(F==null) { F=99; this.f_slideOp(this.n_nextSlide,99); } F-=this.D; if(F<0) { this.f_slideOp(this.n_currentSlide,0); this.n_currentSlide=this.n_nextSlide; this.n_nextSlide=null; return this.f_run(); } this.f_slideOp(this.n_currentSlide,F); this.J=setTimeout('A_SLIDES['+this.n_id+'].f_fadeOut('+F+')',this.H); } function R(G,F) { if(!G) return; var e_slide=this.a_imgRefs[G]; Q(e_slide,F); } function P(B,L) { var n_index,o_index,a_items=[],ta_labels=[]; // since arrays are passed by reference, we'll make a manual copy for (var i=0; i< L.length; ++i) { ta_labels[i] = L[i]; } // now handle the randomization bit while(B.length) { n_index=Math.ceil(Math.random()*B.length)-1; o_index=a_items.length; a_items[o_index]=B[n_index]; L[o_index]=ta_labels[n_index]; B[n_index]=B[B.length-1]; ta_labels[n_index]=ta_labels[ta_labels.length-1]; B.length=B.length-1; ta_labels.length=ta_labels.length-1; } return a_items; } var L=navigator.userAgent.toLowerCase(); if(L.indexOf('opera')!=-1||L.indexOf('safari')!=-1)window.Q=function(e_element,F){e_element.style.opacity=F/100;}; else if(L.indexOf('gecko')!=-1)window.Q=function(e_element,F){e_element.style.MozOpacity=F/100;}; else if(L.indexOf('msie')!=-1)window.Q=function(e_element,F){try{e_element.filters.alpha.opacity=F}catch(e){};}; else window.Q=null; var A=['steps',40,'css','','transtime',0.5,'slidetime',2]; var firstLabel = '';