var fade=new Array()
fade[0]=["images/ani_01.jpg", "#.htm", "_self"] 
fade[1]=["images/ani_02.jpg", "#.htm", "_self"]  
fade[2]=["images/ani_03.jpg", "#.htm", "_self"] 
fade[3]=["images/ani_04.jpg", "#.htm", "_self"]  
fade[4]=["images/ani_05.jpg", "#.htm", "_self"] 
fade[5]=["images/ani_06.jpg", "#.htm", "_self"] 
fade[6]=["images/ani_07.jpg", "#.htm", "_self"] 
fade[7]=["images/ani_08.jpg", "#.htm", "_self"] 
fade[8]=["images/ani_09.jpg", "#.htm", "_self"] 
fade[9]=["images/ani_10.jpg", "#.htm", "_self"] 

var fade_thermal=new Array()
fade_thermal[0]=["images/thermal_ani_46.jpg", "#.htm", "_self"] 
fade_thermal[1]=["images/thermal_ani_47.jpg", "#.htm", "_self"]  
fade_thermal[2]=["images/thermal_ani_48.jpg", "#.htm", "_self"] 
fade_thermal[3]=["images/thermal_ani_49.jpg", "#.htm", "_self"]  
fade_thermal[4]=["images/thermal_ani_50.jpg", "#.htm", "_self"] 
fade_thermal[5]=["images/thermal_ani_51.jpg", "#.htm", "_self"] 

var fade_injecta=new Array()
fade_injecta[0]=["images/injecta_ani_147.jpg", "#.htm", "_self"] 
fade_injecta[1]=["images/injecta_ani_151.jpg", "#.htm", "_self"]  

var fade_drying=new Array()
fade_drying[0]=["images/drying_ani_212.jpg", "#.htm", "_self"] 
fade_drying[1]=["images/drying_ani_231.jpg", "#.htm", "_self"]  
fade_drying[2]=["images/drying_ani_232.jpg", "#.htm", "_self"] 
fade_drying[3]=["images/drying_ani_234.jpg", "#.htm", "_self"]  
fade_drying[4]=["images/drying_ani_241.jpg", "#.htm", "_self"] 
fade_drying[5]=["images/drying_ani_242.jpg", "#.htm", "_self"] 
fade_drying[6]=["images/drying_ani_244.jpg", "#.htm", "_self"] 
fade_drying[7]=["images/drying_ani_245.jpg", "#.htm", "_self"] 
fade_drying[8]=["images/drying_ani_251.jpg", "#.htm", "_self"] 
fade_drying[9]=["images/drying_ani_257.jpg", "#.htm", "_self"] 
fade_drying[10]=["images/drying_ani_258.jpg", "#.htm", "_self"] 
fade_drying[11]=["images/drying_ani_259.jpg", "#.htm", "_self"] 
fade_drying[12]=["images/drying_ani_260.jpg", "#.htm", "_self"] 

var fade_fire=new Array()
fade_fire[0]=["images/fire_ani_282.jpg", "#.htm", "_self"] 
fade_fire[1]=["images/fire_ani_283.jpg", "#.htm", "_self"]  
fade_fire[2]=["images/fire_ani_284.jpg", "#.htm", "_self"] 
fade_fire[3]=["images/fire_ani_285.jpg", "#.htm", "_self"]  
fade_fire[4]=["images/fire_ani_286.jpg", "#.htm", "_self"] 
fade_fire[5]=["images/fire_ani_287.jpg", "#.htm", "_self"] 
fade_fire[6]=["images/fire_ani_288.jpg", "#.htm", "_self"] 
fade_fire[7]=["images/fire_ani_289.jpg", "#.htm", "_self"]  
fade_fire[8]=["images/fire_ani_291.jpg", "#.htm", "_self"] 
fade_fire[9]=["images/fire_ani_292.jpg", "#.htm", "_self"]  
fade_fire[10]=["images/fire_ani_293.jpg", "#.htm", "_self"] 
fade_fire[11]=["images/fire_ani_294.jpg", "#.htm", "_self"] 

var fade_mold=new Array()
fade_mold[0]=["images/mold_ani_202.jpg", "#.htm", "_self"] 
fade_mold[1]=["images/mold_ani_189.jpg", "#.htm", "_self"]  
fade_mold[2]=["images/mold_ani_184.jpg", "#.htm", "_self"] 
fade_mold[3]=["images/mold_ani_125.jpg", "#.htm", "_self"]  
fade_mold[4]=["images/mold_ani_127.jpg", "#.htm", "_self"] 
fade_mold[5]=["images/mold_ani_128.jpg", "#.htm", "_self"] 

var fade_water=new Array()
fade_water[0]=["images/water_ani_111.jpg", "#.htm", "_self"] 
fade_water[1]=["images/water_ani_123.jpg", "#.htm", "_self"]  

var fade_floor=new Array()
fade_floor[0]=["images/floor_ani_140.jpg", "#.htm", "_self"] 
fade_floor[1]=["images/floor_ani_142.jpg", "#.htm", "_self"]  
fade_floor[2]=["images/floor_ani_143.jpg", "#.htm", "_self"] 
fade_floor[3]=["images/floor_ani_144.jpg", "#.htm", "_self"]  
fade_floor[4]=["images/floor_ani_141.jpg", "#.htm", "_self"] 

var fadebgcolor="#FFFFFF"

////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder == "random")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'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:'+fadewidth+'px;height:'+fadeheight+'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) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=10
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.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 crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}