var useBSNns;if(useBSNns){if(typeof(bsn)=="undefined"){bsn={}}var _bsn=bsn}else{var _bsn=this}_bsn.Crossfader=function(e,d,a,c){this.nAct=-1;this.aDivs=e;for(var b=0;b<e.length;b++){document.getElementById(e[b]).style.position="absolute";document.getElementById(e[b]).style.opacity=0;document.getElementById(e[b]).style.filter="alpha(opacity=0)";document.getElementById(e[b]).style.visibility="hidden";document.getElementById(e[b]).style.display="block"}this.nDur=d;this.nDelay=a;this._newfade(c)};_bsn.Crossfader.prototype._newfade=function(a){if(this.nID1){clearInterval(this.nID1)}this.nOldAct=this.nAct;this.nAct++;if(!this.aDivs[this.nAct]){this.nAct=0}if(this.nAct==this.nOldAct){return false}document.getElementById(this.aDivs[this.nAct]).style.visibility="visible";this.nInt=50;this.nTime=0;var b=this;this.nID2=setInterval(function(){b._fade(a)},this.nInt)};_bsn.Crossfader.prototype._fade=function(a){this.nTime+=this.nInt;var b;if(a==1){b=Math.round(this._easeInOut(this.nTime,1,0,this.nDur)*100)}else{b=Math.round(this._easeInOut(this.nTime,0,1,this.nDur)*100)}var d=b/100;document.getElementById(this.aDivs[this.nAct]).style.opacity=d;document.getElementById(this.aDivs[this.nAct]).style.filter="alpha(opacity="+b+")";if(this.nOldAct>-1){document.getElementById(this.aDivs[this.nOldAct]).style.opacity=1-d;document.getElementById(this.aDivs[this.nOldAct]).style.filter="alpha(opacity="+(100-b)+")"}if(this.nTime==this.nDur){clearInterval(this.nID2);if(this.nOldAct>-1){document.getElementById(this.aDivs[this.nOldAct]).style.visibility="hidden"}var c=this;this.nID1=setInterval(function(){c._newfade(0)},this.nDelay)}};_bsn.Crossfader.prototype._easeInOut=function(e,a,g,f){return g/2*(1-Math.cos(Math.PI*e/f))+a};