/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
 
var fadeimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages[0]=["http://www.burystedmundshotel.com/images/home/home1.jpg", ""] //plain image syntax
fadeimages[1]=["http://www.burystedmundshotel.com/images/home/home2.jpg", ""] //image with link syntax
fadeimages[2]=["http://www.burystedmundshotel.com/images/home/home3.jpg", ""] //image with link and target syntax
fadeimages[3]=["http://www.burystedmundshotel.com/images/home/home4.jpg", ""] //image with link and target syntax
fadeimages[4]=["http://www.burystedmundshotel.com/images/home/home5.jpg", ""] //plain image syntax
fadeimages[5]=["http://www.burystedmundshotel.com/images/home/home6.jpg", ""] //image with link syntax
fadeimages[6]=["http://www.burystedmundshotel.com/images/home/home7.jpg", ""] //image with link and target syntax
fadeimages[7]=["http://www.burystedmundshotel.com/images/home/home8.jpg", ""] //image with link and target syntax
fadeimages[8]=["http://www.burystedmundshotel.com/images/home/home9.jpg", ""] //image with link and target syntax

var fadeimages2=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["http://www.burystedmundshotel.com/images/home/history/history1.jpg", ""] //plain image syntax
fadeimages2[1]=["http://www.burystedmundshotel.com/images/home/history/history2.jpg", ""] //image with link syntax
fadeimages2[2]=["http://www.burystedmundshotel.com/images/home/history/history3.jpg", ""] //image with link and target syntax
fadeimages2[3]=["http://www.burystedmundshotel.com/images/home/history/history4.jpg", ""] //image with link and target syntax

var fadeimages3=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages3[0]=["http://www.burystedmundshotel.com/images/spa/spa1.jpg", ""] //plain image syntax
fadeimages3[1]=["http://www.burystedmundshotel.com/images/spa/spa2.jpg", ""] //image with link syntax
fadeimages3[2]=["http://www.burystedmundshotel.com/images/spa/spa3.jpg", ""] //image with link and target syntax
fadeimages3[3]=["http://www.burystedmundshotel.com/images/spa/spa4.jpg", ""] //image with link and target syntax
fadeimages3[4]=["http://www.burystedmundshotel.com/images/spa/spa5.jpg", ""] //plain image syntax
fadeimages3[5]=["http://www.burystedmundshotel.com/images/spa/spa6.jpg", ""] //image with link syntax
fadeimages3[6]=["http://www.burystedmundshotel.com/images/spa/spa7.jpg", ""] //image with link and target syntax
fadeimages3[7]=["http://www.burystedmundshotel.com/images/spa/spa8.jpg", ""] //image with link and target syntax

var fadeimages4=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages4[0]=["http://www.burystedmundshotel.com/images/spa/face/face1.jpg", ""] //plain image syntax
fadeimages4[1]=["http://www.burystedmundshotel.com/images/spa/face/face2.jpg", ""] //image with link syntax
fadeimages4[2]=["http://www.burystedmundshotel.com/images/spa/face/face3.jpg", ""] //image with link and target syntax
fadeimages4[3]=["http://www.burystedmundshotel.com/images/spa/face/face4.jpg", ""] //image with link and target syntax
fadeimages4[4]=["http://www.burystedmundshotel.com/images/spa/face/face5.jpg", ""] //plain image syntax

var fadeimages5=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages5[0]=["http://www.burystedmundshotel.com/images/spa/wax/wax1.jpg", ""] //plain image syntax
fadeimages5[1]=["http://www.burystedmundshotel.com/images/spa/wax/wax2.jpg", ""] //image with link syntax
fadeimages5[2]=["http://www.burystedmundshotel.com/images/spa/wax/wax3.jpg", ""] //image with link and target syntax
fadeimages5[3]=["http://www.burystedmundshotel.com/images/spa/wax/wax4.jpg", ""] //image with link and target syntax

var fadeimages6=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages6[0]=["http://www.burystedmundshotel.com/images/spa/facials/facials1.jpg", ""] //plain image syntax
fadeimages6[1]=["http://www.burystedmundshotel.com/images/spa/facials/facials2.jpg", ""] //image with link syntax
fadeimages6[2]=["http://www.burystedmundshotel.com/images/spa/facials/facials3.jpg", ""] //image with link and target syntax
fadeimages6[3]=["http://www.burystedmundshotel.com/images/spa/facials/facials4.jpg", ""] //image with link and target syntax
fadeimages6[4]=["http://www.burystedmundshotel.com/images/spa/facials/facials5.jpg", ""] //image with link and target syntax
fadeimages6[5]=["http://www.burystedmundshotel.com/images/spa/facials/facials6.jpg", ""] //image with link and target syntax

var fadeimages7=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages7[0]=["http://www.burystedmundshotel.com/images/spa/hands_feet/feet1.jpg", ""] //plain image syntax
fadeimages7[1]=["http://www.burystedmundshotel.com/images/spa/hands_feet/feet2.jpg", ""] //image with link syntax
fadeimages7[2]=["http://www.burystedmundshotel.com/images/spa/hands_feet/feet3.jpg", ""] //image with link and target syntax
fadeimages7[3]=["http://www.burystedmundshotel.com/images/spa/hands_feet/feet4.jpg", ""] //image with link and target syntax
fadeimages7[4]=["http://www.burystedmundshotel.com/images/spa/hands_feet/feet5.jpg", ""] //image with link and target syntax
fadeimages7[5]=["http://www.burystedmundshotel.com/images/spa/hands_feet/feet6.jpg", ""] //image with link and target syntax

var fadeimages8=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages8[0]=["http://www.burystedmundshotel.com/images/spa/spam/spam1.jpg", ""] //plain image syntax
fadeimages8[1]=["http://www.burystedmundshotel.com/images/spa/spam/spam2.jpg", ""] //image with link syntax
fadeimages8[2]=["http://www.burystedmundshotel.com/images/spa/spam/spam3.jpg", ""] //image with link and target syntax
fadeimages8[3]=["http://www.burystedmundshotel.com/images/spa/spam/spam4.jpg", ""] //image with link and target syntax
fadeimages8[4]=["http://www.burystedmundshotel.com/images/spa/spam/spam5.jpg", ""] //image with link and target syntax
fadeimages8[5]=["http://www.burystedmundshotel.com/images/spa/spam/spam6.jpg", ""] //image with link and target syntax

var fadeimages9=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages9[0]=["http://www.burystedmundshotel.com/images/spa/holistic/holl1.jpg", ""] //plain image syntax
fadeimages9[1]=["http://www.burystedmundshotel.com/images/spa/holistic/holl2.jpg", ""] //image with link syntax
fadeimages9[2]=["http://www.burystedmundshotel.com/images/spa/holistic/holl3.jpg", ""] //image with link and target syntax
fadeimages9[3]=["http://www.burystedmundshotel.com/images/spa/holistic/holl4.jpg", ""] //image with link and target syntax
fadeimages9[4]=["http://www.burystedmundshotel.com/images/spa/holistic/holl5.jpg", ""] //image with link and target syntax
fadeimages9[5]=["http://www.burystedmundshotel.com/images/spa/holistic/holl6.jpg", ""] //image with link and target syntax

var fadeimages10=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages10[0]=["http://www.burystedmundshotel.com/images/spa/makeover/make1.jpg", ""] //plain image syntax
fadeimages10[1]=["http://www.burystedmundshotel.com/images/spa/makeover/make2.jpg", ""] //image with link syntax
fadeimages10[2]=["http://www.burystedmundshotel.com/images/spa/makeover/make3.jpg", ""] //image with link and target syntax
fadeimages10[3]=["http://www.burystedmundshotel.com/images/spa/makeover/make4.jpg", ""] //image with link and target syntax
fadeimages10[4]=["http://www.burystedmundshotel.com/images/spa/makeover/make5.jpg", ""] //image with link and target syntax
fadeimages10[5]=["http://www.burystedmundshotel.com/images/spa/makeover/make6.jpg", ""] //image with link and target syntax


var fadeimages11=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages11[0]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well1.jpg", ""] //plain image syntax
fadeimages11[1]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well2.jpg", ""] //image with link syntax
fadeimages11[2]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well3.jpg", ""] //image with link and target syntax
fadeimages11[3]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well4.jpg", ""] //image with link and target syntax
fadeimages11[4]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well5.jpg", ""] //image with link and target syntax
fadeimages11[5]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well6.jpg", ""] //image with link and target syntax
fadeimages11[6]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well7.jpg", ""] //image with link and target syntax
fadeimages11[7]=["http://www.burystedmundshotel.com/images/spa/wellbeing/well8.jpg", ""] //image with link and target syntax

var fadeimages12=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages12[0]=["http://www.burystedmundshotel.com/images/accomodation/acc1.jpg", ""] //plain image syntax
fadeimages12[1]=["http://www.burystedmundshotel.com/images/accomodation/acc2.jpg", ""] //image with link syntax
fadeimages12[2]=["http://www.burystedmundshotel.com/images/accomodation/acc3.jpg", ""] //image with link and target syntax
fadeimages12[3]=["http://www.burystedmundshotel.com/images/accomodation/acc4.jpg", ""] //image with link and target syntax
fadeimages12[4]=["http://www.burystedmundshotel.com/images/accomodation/acc5.jpg", ""] //image with link and target syntax
fadeimages12[5]=["http://www.burystedmundshotel.com/images/accomodation/acc6.jpg", ""] //image with link and target syntax
fadeimages12[6]=["http://www.burystedmundshotel.com/images/accomodation/acc7.jpg", ""] //image with link and target syntax

var fadeimages13=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages13[0]=["http://www.burystedmundshotel.com/images/accomodation/bridal/bride1.jpg", ""] //plain image syntax
fadeimages13[1]=["http://www.burystedmundshotel.com/images/accomodation/bridal/bride2.jpg", ""] //image with link syntax
fadeimages13[2]=["http://www.burystedmundshotel.com/images/accomodation/bridal/bride3.jpg", ""] //image with link and target syntax
fadeimages13[3]=["http://www.burystedmundshotel.com/images/accomodation/bridal/bride4.jpg", ""] //image with link and target syntax
fadeimages13[4]=["http://www.burystedmundshotel.com/images/accomodation/bridal/bride5.jpg", ""] //image with link and target syntax
fadeimages13[5]=["http://www.burystedmundshotel.com/images/accomodation/bridal/bride6.jpg", ""] //image with link and target syntax
fadeimages13[6]=["http://www.burystedmundshotel.com/images/accomodation/bridal/bride7.jpg", ""] //image with link and target syntax

var fadeimages14=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages14[0]=["http://www.burystedmundshotel.com/images/accomodation/standard/sta1.jpg", ""] //plain image syntax
fadeimages14[1]=["http://www.burystedmundshotel.com/images/accomodation/standard/sta2.jpg", ""] //image with link syntax
fadeimages14[2]=["http://www.burystedmundshotel.com/images/accomodation/standard/sta3.jpg", ""] //image with link and target syntax
fadeimages14[3]=["http://www.burystedmundshotel.com/images/accomodation/standard/sta4.jpg", ""] //image with link and target syntax
fadeimages14[4]=["http://www.burystedmundshotel.com/images/accomodation/standard/sta5.jpg", ""] //image with link and target syntax
fadeimages14[5]=["http://www.burystedmundshotel.com/images/accomodation/standard/sta6.jpg", ""] //image with link and target syntax
fadeimages14[6]=["http://www.burystedmundshotel.com/images/accomodation/standard/sta7.jpg", ""] //image with link and target syntax

var fadeimages15=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages15[0]=["http://www.burystedmundshotel.com/images/accomodation/single/sin1.jpg", ""] //plain image syntax
fadeimages15[1]=["http://www.burystedmundshotel.com/images/accomodation/single/sin2.jpg", ""] //image with link syntax
fadeimages15[2]=["http://www.burystedmundshotel.com/images/accomodation/single/sin3.jpg", ""] //image with link and target syntax
fadeimages15[3]=["http://www.burystedmundshotel.com/images/accomodation/single/sin4.jpg", ""] //image with link and target syntax
fadeimages15[4]=["http://www.burystedmundshotel.com/images/accomodation/single/sin5.jpg", ""] //image with link and target syntax

var fadeimages16=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages16[0]=["http://www.burystedmundshotel.com/images/accomodation/log_cabin/log1.jpg", ""] //plain image syntax
fadeimages16[1]=["http://www.burystedmundshotel.com/images/accomodation/log_cabin/log2.jpg", ""] //image with link syntax
fadeimages16[2]=["http://www.burystedmundshotel.com/images/accomodation/log_cabin/log3.jpg", ""] //image with link and target syntax
fadeimages16[3]=["http://www.burystedmundshotel.com/images/accomodation/log_cabin/log4.jpg", ""] //image with link and target syntax
fadeimages16[4]=["http://www.burystedmundshotel.com/images/accomodation/log_cabin/log5.jpg", ""] //image with link and target syntax
fadeimages16[5]=["http://www.burystedmundshotel.com/images/accomodation/log_cabin/log6.jpg", ""] //image with link and target syntax

var fadeimages17=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages17[0]=["http://www.burystedmundshotel.com/images/accomodation/conferance/conf1.jpg", ""] //plain image syntax
fadeimages17[1]=["http://www.burystedmundshotel.com/images/accomodation/conferance/conf2.jpg", ""] //image with link syntax
fadeimages17[2]=["http://www.burystedmundshotel.com/images/accomodation/conferance/conf3.jpg", ""] //image with link and target syntax
fadeimages17[3]=["http://www.burystedmundshotel.com/images/accomodation/conferance/conf4.jpg", ""] //image with link and target syntax
fadeimages17[4]=["http://www.burystedmundshotel.com/images/accomodation/conferance/conf5.jpg", ""] //image with link and target syntax
fadeimages17[5]=["http://www.burystedmundshotel.com/images/accomodation/conferance/conf6.jpg", ""] //image with link and target syntax

var fadeimages18=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages18[0]=["http://www.burystedmundshotel.com/images/dining/banquets/ban.jpg", ""] //plain image syntax
fadeimages18[1]=["http://www.burystedmundshotel.com/images/dining/banquets/ban1.jpg", ""] //image with link syntax
fadeimages18[2]=["http://www.burystedmundshotel.com/images/dining/banquets/ban2.jpg", ""] //image with link and target syntax
fadeimages18[3]=["http://www.burystedmundshotel.com/images/dining/banquets/ban3.jpg", ""] //plain image syntax
fadeimages18[4]=["http://www.burystedmundshotel.com/images/dining/banquets/ban5.jpg", ""] //image with link syntax
fadeimages18[5]=["http://www.burystedmundshotel.com/images/dining/banquets/ban6.jpg", ""] //image with link and target syntax

var fadeimages19=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages19[0]=["http://www.burystedmundshotel.com/images/dining/menus/menu1.jpg", ""] //plain image syntax
fadeimages19[1]=["http://www.burystedmundshotel.com/images/dining/menus/menu2.jpg", ""] //image with link syntax
fadeimages19[2]=["http://www.burystedmundshotel.com/images/dining/menus/menu3.jpg", ""] //image with link and target syntax
fadeimages19[3]=["http://www.burystedmundshotel.com/images/dining/menus/menu4.jpg", ""] //plain image syntax
fadeimages19[4]=["http://www.burystedmundshotel.com/images/dining/menus/menu5.jpg", ""] //image with link syntax
fadeimages19[5]=["http://www.burystedmundshotel.com/images/dining/menus/menu6.jpg", ""] //image with link and target syntax

var fadeimages20=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages20[0]=["http://www.burystedmundshotel.com/images/dining/din1.jpg", ""] //plain image syntax
fadeimages20[1]=["http://www.burystedmundshotel.com/images/dining/din2.jpg", ""] //image with link syntax
fadeimages20[2]=["http://www.burystedmundshotel.com/images/dining/din3.jpg", ""] //image with link and target syntax
fadeimages20[3]=["http://www.burystedmundshotel.com/images/dining/din4.jpg", ""] //plain image syntax
fadeimages20[4]=["http://www.burystedmundshotel.com/images/dining/din5.jpg", ""] //image with link syntax
fadeimages20[5]=["http://www.burystedmundshotel.com/images/dining/din6.jpg", ""] //image with link and target syntax
fadeimages20[6]=["http://www.burystedmundshotel.com/images/dining/din7.jpg", ""] //image with link syntax
fadeimages20[7]=["http://www.burystedmundshotel.com/images/dining/din8.jpg", ""] //image with link and target syntax

var fadeimages21=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages21[0]=["http://www.burystedmundshotel.com/images/dining/private/private1.jpg", ""] //plain image syntax
fadeimages21[1]=["http://www.burystedmundshotel.com/images/dining/private/private2.jpg", ""] //image with link syntax
fadeimages21[2]=["http://www.burystedmundshotel.com/images/dining/private/private3.jpg", ""] //image with link and target syntax
fadeimages21[3]=["http://www.burystedmundshotel.com/images/dining/private/private4.jpg", ""] //plain image syntax
fadeimages21[4]=["http://www.burystedmundshotel.com/images/dining/private/private5.jpg", ""] //image with link syntax
fadeimages21[5]=["http://www.burystedmundshotel.com/images/dining/private/private6.jpg", ""] //image with link and target syntax

var fadeimages22=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages22[0]=["http://www.burystedmundshotel.com/images/weddings/wedd1.jpg", ""] //plain image syntax
fadeimages22[1]=["http://www.burystedmundshotel.com/images/weddings/wedd2.jpg", ""] //image with link syntax
fadeimages22[2]=["http://www.burystedmundshotel.com/images/weddings/wedd3.jpg", ""] //image with link and target syntax
fadeimages22[3]=["http://www.burystedmundshotel.com/images/weddings/wedd4.jpg", ""] //plain image syntax
fadeimages22[4]=["http://www.burystedmundshotel.com/images/weddings/wedd5.jpg", ""] //image with link syntax
fadeimages22[5]=["http://www.burystedmundshotel.com/images/weddings/wedd6.jpg", ""] //image with link and target syntax

var fadeimages23=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages23[0]=["http://www.burystedmundshotel.com/images/weddings/ceremony/cer1.jpg", ""] //plain image syntax
fadeimages23[1]=["http://www.burystedmundshotel.com/images/weddings/ceremony/cer2.jpg", ""] //image with link syntax
fadeimages23[2]=["http://www.burystedmundshotel.com/images/weddings/ceremony/cer3.jpg", ""] //image with link and target syntax
fadeimages23[3]=["http://www.burystedmundshotel.com/images/weddings/ceremony/cer4.jpg", ""] //plain image syntax

var fadeimages24=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages24[0]=["http://www.burystedmundshotel.com/images/weddings/exclusive/exc1.jpg", ""] //plain image syntax
fadeimages24[1]=["http://www.burystedmundshotel.com/images/weddings/exclusive/exc2.jpg", ""] //image with link syntax
fadeimages24[2]=["http://www.burystedmundshotel.com/images/weddings/exclusive/exc3.jpg", ""] //image with link and target syntax
fadeimages24[3]=["http://www.burystedmundshotel.com/images/weddings/exclusive/exc4.jpg", ""] //plain image syntax
fadeimages24[4]=["http://www.burystedmundshotel.com/images/weddings/exclusive/exc5.jpg", ""] //image with link syntax
fadeimages24[5]=["http://www.burystedmundshotel.com/images/weddings/exclusive/exc6.jpg", ""] //image with link and target syntax
fadeimages24[6]=["http://www.burystedmundshotel.com/images/weddings/exclusive/exc7.jpg", ""] //image with link and target syntax

var fadeimages25=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages25[0]=["http://www.burystedmundshotel.com/images/weddings/customers/cus1.jpg", ""] //plain image syntax
fadeimages25[1]=["http://www.burystedmundshotel.com/images/weddings/customers/cus2.jpg", ""] //image with link syntax
fadeimages25[2]=["http://www.burystedmundshotel.com/images/weddings/customers/cus3.jpg", ""] //image with link and target syntax
fadeimages25[3]=["http://www.burystedmundshotel.com/images/weddings/customers/cus4.jpg", ""] //plain image syntax
fadeimages25[4]=["http://www.burystedmundshotel.com/images/weddings/customers/cus5.jpg", ""] //image with link syntax
fadeimages25[5]=["http://www.burystedmundshotel.com/images/weddings/customers/cus6.jpg", ""] //image with link and target syntax

var fadeimages26=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages26[0]=["http://www.burystedmundshotel.com/images/dining/bbq/bbq1.jpg", ""] //plain image syntax
fadeimages26[1]=["http://www.burystedmundshotel.com/images/dining/bbq/bbq2.jpg", ""] //image with link syntax
fadeimages26[2]=["http://www.burystedmundshotel.com/images/dining/bbq/bbq3.jpg", ""] //image with link and target syntax
fadeimages26[3]=["http://www.burystedmundshotel.com/images/dining/bbq/bbq4.jpg", ""] //plain image syntax
fadeimages26[4]=["http://www.burystedmundshotel.com/images/dining/bbq/bbq5.jpg", ""] //image with link syntax

var fadeimages27=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages27[0]=["http://www.grangecountryhousehotel.com/images/spa/bodytreatment/BOD1.jpg", ""] //plain image syntax
fadeimages27[1]=["http://www.grangecountryhousehotel.com/images/spa/bodytreatment/BOD2.jpg", ""] //image with link syntax
fadeimages27[2]=["http://www.grangecountryhousehotel.com/images/spa/bodytreatment/BOD3.jpg", ""] //image with link and target syntax
fadeimages27[3]=["http://www.grangecountryhousehotel.com/images/spa/bodytreatment/BOD4.jpg", ""] //plain image syntax
fadeimages27[4]=["http://www.grangecountryhousehotel.com/images/spa/bodytreatment/BOD5.jpg", ""] //image with link syntax

var fadebgcolor="white"

////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!="undefined")
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()
}