var fadebgcolor="black";var fadearray=new Array();var fadeclear=new Array();var dom=(document.getElementById);var iebrowser=document.all;var imgWidth;var imgHeight;function fadeshow(b,c,a,g,e,f,d,h){this.pausecheck=f;this.mouseovercheck=0;this.delay=e;this.degree=10;this.curimageindex=0;this.nextimageindex=1;this.rotateSpeed=d;fadearray[fadearray.length]=this;this.slideshowid=fadearray.length-1;this.canvasbase="canvas"+this.slideshowid;this.curcanvas=this.canvasbase+"_0";if(h==1){b.sort(function(){return 0.5-Math.random()})}this.theimages=b;this.imageborder=parseInt(g);this.postimages=new Array();for(p=0;p<b.length;p++){this.postimages[p]=new Image();this.postimages[p].src=b[p][0]}c=c+this.imageborder*2;a=a+this.imageborder*2;imgWidth=c;imgHeight=a;if(iebrowser&&dom||dom){document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+c+"px;height:"+a+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+c+"px;height:"+a+"px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:"+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+c+"px;height:"+a+"px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:"+fadebgcolor+'"></div></div>')}else{document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')}if(iebrowser&&dom||dom){this.startit()}else{this.curimageindex++;setInterval("fadearray["+this.slideshowid+"].rotateimage()",this.delay)}}function fadepic(a){if(a.degree<100){a.degree+=5;if(a.tempobj.filters&&a.tempobj.filters[0]){if(typeof a.tempobj.filters[0].opacity=="number"){a.tempobj.filters[0].opacity=a.degree}else{a.tempobj.style.filter="alpha(opacity="+a.degree+")"}}else{if(a.tempobj.style.MozOpacity){a.tempobj.style.MozOpacity=a.degree/101}else{if(a.tempobj.style.KhtmlOpacity){a.tempobj.style.KhtmlOpacity=a.degree/100}else{if(a.tempobj.style.opacity&&!a.tempobj.filters){a.tempobj.style.opacity=a.degree/101}}}}}else{clearInterval(fadeclear[a.slideshowid]);a.nextcanvas=(a.curcanvas==a.canvasbase+"_0")?a.canvasbase+"_0":a.canvasbase+"_1";a.tempobj=iebrowser?iebrowser[a.nextcanvas]:document.getElementById(a.nextcanvas);a.populateslide(a.tempobj,a.nextimageindex);a.nextimageindex=(a.nextimageindex<a.postimages.length-1)?a.nextimageindex+1:0;setTimeout("fadearray["+a.slideshowid+"].rotateimage()",a.delay)}}fadeshow.prototype.populateslide=function(b,a){var c="";c+='<img src="'+this.postimages[a].src+'" border="'+this.imageborder+'px" width="'+imgWidth+'" height="'+imgHeight+'">';b.innerHTML=c};fadeshow.prototype.rotateimage=function(){if(this.pausecheck==1){var b=this}if(this.mouseovercheck==1){setTimeout(function(){b.rotateimage()},100)}else{if(iebrowser&&dom||dom){this.resetit();var a=this.tempobj=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas);a.style.zIndex++;fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",this.rotateSpeed);this.curcanvas=(this.curcanvas==this.canvasbase+"_0")?this.canvasbase+"_1":this.canvasbase+"_0"}else{var c=document.images["defaultslide"+this.slideshowid];c.src=this.postimages[this.curimageindex].src}}this.curimageindex=(this.curimageindex<this.postimages.length-1)?this.curimageindex+1:0};fadeshow.prototype.resetit=function(){this.degree=10;var a=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas);if(a.filters&&a.filters[0]){if(typeof a.filters[0].opacity=="number"){a.filters(0).opacity=this.degree}else{a.style.filter="alpha(opacity="+this.degree+")"}}else{if(a.style.MozOpacity){a.style.MozOpacity=this.degree/101}else{if(a.style.KhtmlOpacity){a.style.KhtmlOpacity=this.degree/100}else{if(a.style.opacity&&!a.filters){a.style.opacity=this.degree/101}}}}};fadeshow.prototype.startit=function(){var b=iebrowser?iebrowser[this.curcanvas]:document.getElementById(this.curcanvas);this.populateslide(b,this.curimageindex);if(this.pausecheck==1){var a=this;var c=iebrowser?iebrowser["master"+this.slideshowid]:document.getElementById("master"+this.slideshowid);c.onmouseover=function(){a.mouseovercheck=1};c.onmouseout=function(){a.mouseovercheck=0}}this.rotateimage()};
