    

/***********************************************

* 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]=["/galleries/gallery/pic1.jpg", "", ""] //plain image syntax

fadeimages[1]=["/galleries/gallery/pic2.jpg", "", ""] //plain image syntax

fadeimages[2]=["/galleries/gallery/pic3.jpg", "", ""] //plain image syntax

fadeimages[3]=["/galleries/gallery/pic4.jpg", "", ""] //plain image syntax

//fadeimages[1]=["/images/banners/home01.jpg", ""] //image with link syntax

//fadeimages[2]=["/images/banners/home01.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target syntax



var christmas=new Array()

//SET IMAGE PATHS. Extend or contract array as needed

christmas[0]=["/galleries/christmas/pic1.jpg", "", ""] //plain image syntax

christmas[1]=["/galleries/christmas/pic2.jpg", "", ""] //plain image syntax

christmas[2]=["/galleries/christmas/pic3.jpg", "", ""] //plain image syntax

christmas[3]=["/galleries/christmas/pic4.jpg", "", ""] //plain image syntax

christmas[4]=["/galleries/christmas/pic5.jpg", "", ""] //plain image syntax

christmas[5]=["/galleries/christmas/pic6.jpg", "", ""] //plain image syntax

christmas[6]=["/galleries/christmas/pic7.jpg", "", ""] //plain image syntax

christmas[7]=["/galleries/christmas/pic8.jpg", "", ""] //plain image syntax

christmas[8]=["/galleries/christmas/pic9.jpg", "", ""] //plain image syntax

christmas[9]=["/galleries/christmas/pic10.jpg", "", ""] //plain image syntax

christmas[10]=["/galleries/christmas/pic11.jpg", "", ""] //plain image syntax

christmas[11]=["/galleries/christmas/pic12.jpg", "", ""] //plain image syntax

christmas[12]=["/galleries/christmas/pic13.jpg", "", ""] //plain image syntax

christmas[13]=["/galleries/christmas/pic14.jpg", "", ""] //plain image syntax

christmas[14]=["/galleries/christmas/pic15.jpg", "", ""] //plain image syntax



var activities=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

activities[0]=["/galleries/activities/activities1.jpg", "", ""] //plain image syntax

activities[1]=["/galleries/activities/activities2.jpg", "", ""] //image with link syntax

activities[2]=["/galleries/activities/activities2.jpg", "", "_new"] //image with link and target syntax



var sponsor=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

sponsor[0]=["/galleries/sponsor/1.gif", "http://www.vtm.be/deitaliaansedroom", "_new"] //plain image syntax

sponsor[1]=["/galleries/sponsor/3.jpg", "http://www.eotm.be", "_new"] //image with link and target syntax

sponsor[2]=["/galleries/sponsor/4.jpg", "http://www.mielmonato.be", "_new"] //image with link and target syntax

sponsor[3]=["/galleries/sponsor/6.jpg", "http://www.charmelogies.com", "_new"] //image with link and target syntax



var about=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

about[0]=["/galleries/about/about1.jpg", "", ""] //plain image syntax

about[1]=["/galleries/about/about2.jpg", "", ""] //image with link syntax



var room1=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

room1[0]=["/galleries/room1/1.jpg", "", ""] //plain image syntax

room1[1]=["/galleries/room1/2.jpg", "", ""] //image with link syntax

room1[2]=["/galleries/room1/3.jpg", "", ""] //image with link syntax

room1[3]=["/galleries/room1/4.jpg", "", ""] //image with link syntax

room1[4]=["/galleries/room1/5.jpg", "", ""] //plain image syntax

room1[5]=["/galleries/room1/6.jpg", "", ""] //image with link syntax

room1[6]=["/galleries/room1/7.jpg", "", ""] //image with link syntax

room1[7]=["/galleries/room1/8.jpg", "", ""] //image with link syntax


var room5=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

room5[0]=["/galleries/room5/r1pic1.jpg", "", ""] //plain image syntax

room5[1]=["/galleries/room5/r1pic2.jpg", "", ""] //image with link syntax

room5[2]=["/galleries/room5/r1pic3.jpg", "", ""] //image with link syntax

room5[3]=["/galleries/room5/r1pic4.jpg", "", ""] //image with link syntax


var montelpanorama=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

montelpanorama[0]=["/galleries/montelpanorama/1.jpg", "", ""] //plain image syntax

montelpanorama[1]=["/galleries/montelpanorama/2.jpg", "", ""] //image with link syntax

montelpanorama[2]=["/galleries/montelpanorama/3.jpg", "", ""] //image with link syntax

montelpanorama[3]=["/galleries/montelpanorama/4.jpg", "", ""] //plain image syntax

montelpanorama[4]=["/galleries/montelpanorama/5.jpg", "", ""] //image with link syntax

montelpanorama[5]=["/galleries/montelpanorama/6.jpg", "", ""] //image with link syntax


var bocca=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

bocca[0]=["/galleries/bocca/1.jpg", "", ""] //plain image syntax

bocca[1]=["/galleries/bocca/2.jpg", "", ""] //image with link syntax

bocca[2]=["/galleries/bocca/3.jpg", "", ""] //image with link syntax

bocca[3]=["/galleries/bocca/4.jpg", "", ""] //plain image syntax


var chichirichi=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

chichirichi[0]=["/galleries/chichirichi/1.jpg", "", ""] //plain image syntax

chichirichi[1]=["/galleries/chichirichi/2.jpg", "", ""] //image with link syntax

chichirichi[2]=["/galleries/chichirichi/3.jpg", "", ""] //image with link syntax

chichirichi[3]=["/galleries/chichirichi/4.jpg", "", ""] //plain image syntax


var tuin=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

tuin[0]=["/galleries/tuin/1.jpg", "", ""] //plain image syntax

tuin[1]=["/galleries/tuin/2.jpg", "", ""] //image with link syntax

tuin[2]=["/galleries/tuin/3.jpg", "", ""] //image with link syntax

tuin[3]=["/galleries/tuin/4.jpg", "", ""] //image with link syntax

tuin[4]=["/galleries/tuin/5.jpg", "", ""] //plain image syntax

tuin[5]=["/galleries/tuin/6.jpg", "", ""] //image with link syntax

tuin[6]=["/galleries/tuin/7.jpg", "", ""] //image with link syntax

tuin[7]=["/galleries/tuin/8.jpg", "", ""] //image with link syntax


var klooster=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

klooster[0]=["/galleries/klooster/1.jpg", "", ""] //plain image syntax

klooster[1]=["/galleries/klooster/2.jpg", "", ""] //image with link syntax

klooster[2]=["/galleries/klooster/3.jpg", "", ""] //image with link syntax

klooster[3]=["/galleries/klooster/4.jpg", "", ""] //image with link syntax

klooster[4]=["/galleries/klooster/5.jpg", "", ""] //plain image syntax

klooster[5]=["/galleries/klooster/6.jpg", "", ""] //image with link syntax

klooster[6]=["/galleries/klooster/7.jpg", "", ""] //image with link syntax


var agri=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

agri[0]=["/galleries/agri/1.jpg", "", ""] //plain image syntax

agri[1]=["/galleries/agri/2.jpg", "", ""] //image with link syntax

agri[2]=["/galleries/agri/3.jpg", "", ""] //image with link syntax

agri[3]=["/galleries/agri/4.jpg", "", ""] //image with link syntax

agri[4]=["/galleries/agri/5.jpg", "", ""] //plain image syntax

agri[5]=["/galleries/agri/6.jpg", "", ""] //image with link syntax

agri[6]=["/galleries/agri/7.jpg", "", ""] //image with link syntax

agri[7]=["/galleries/agri/8.jpg", "", ""] //image with link syntax

agri[8]=["/galleries/agri/9.jpg", "", ""] //image with link syntax

agri[9]=["/galleries/agri/10.jpg", "", ""] //plain image syntax

agri[10]=["/galleries/agri/11.jpg", "", ""] //image with link syntax

agri[11]=["/galleries/agri/12.jpg", "", ""] //image with link syntax

agri[12]=["/galleries/agri/13.jpg", "", ""] //image with link syntax

agri[13]=["/galleries/agri/14.jpg", "", ""] //image with link syntax

agri[14]=["/galleries/agri/15.jpg", "", ""] //image with link syntax

agri[15]=["/galleries/agri/16.jpg", "", ""] //plain image syntax

agri[16]=["/galleries/agri/17.jpg", "", ""] //image with link syntax

agri[17]=["/galleries/agri/18.jpg", "", ""] //image with link syntax



var pesaro=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

pesaro[0]=["/galleries/pesaro/1.jpg", "", ""] //plain image syntax

pesaro[1]=["/galleries/pesaro/2.jpg", "", ""] //image with link syntax

pesaro[2]=["/galleries/pesaro/3.jpg", "", ""] //image with link syntax



var urbino=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

urbino[0]=["/galleries/urbino/1.jpg", "", ""] //plain image syntax

urbino[1]=["/galleries/urbino/2.jpg", "", ""] //image with link syntax

urbino[2]=["/galleries/urbino/3.jpg", "", ""] //image with link syntax

urbino[3]=["/galleries/urbino/4.jpg", "", ""] //image with link syntax

urbino[4]=["/galleries/urbino/5.jpg", "", ""] //image with link syntax



var grotten=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

grotten[0]=["/galleries/grotten/1.jpg", "", ""] //plain image syntax

grotten[1]=["/galleries/grotten/2.jpg", "", ""] //image with link syntax

grotten[2]=["/galleries/grotten/3.jpg", "", ""] //image with link syntax



var ancona=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

ancona[0]=["/galleries/ancona/1.jpg", "", ""] //plain image syntax

ancona[1]=["/galleries/ancona/2.jpg", "", ""] //image with link syntax

ancona[2]=["/galleries/ancona/3.jpg", "", ""] //image with link syntax



var terme=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

terme[0]=["/galleries/terme/1.jpg", "", ""] //plain image syntax

terme[1]=["/galleries/terme/2.jpg", "", ""] //image with link syntax

terme[2]=["/galleries/terme/3.jpg", "", ""] //image with link syntax




var montelparo=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

montelparo[0]=["/galleries/montelparo/1.jpg", "", ""] //plain image syntax

montelparo[1]=["/galleries/montelparo/2.jpg", "", ""] //image with link syntax

montelparo[2]=["/galleries/montelparo/3.jpg", "", ""] //image with link syntax



var piceno=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

piceno[0]=["/galleries/piceno/1.jpg", "", ""] //plain image syntax

piceno[1]=["/galleries/piceno/2.jpg", "", ""] //image with link syntax

piceno[2]=["/galleries/piceno/3.jpg", "", ""] //image with link syntax



var adria=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

adria[0]=["/galleries/adria/1.jpg", "", ""] //plain image syntax

adria[1]=["/galleries/adria/2.jpg", "", ""] //image with link syntax

adria[2]=["/galleries/adria/3.jpg", "", ""] //image with link syntax


var bed_breakfast1=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

bed_breakfast1[0]=["/images/photo/bed_breakfast/bed1.jpg", "", ""] //plain image syntax

bed_breakfast1[1]=["/images/photo/bed_breakfast/bed1.jpg", "", ""] //image with link syntax

bed_breakfast1[2]=["/images/photo/bed_breakfast/bed1.jpg", "", ""] //image with link syntax

bed_breakfast1[3]=["/images/photo/bed_breakfast/bed4.jpg", "", ""] //image with link syntax



var bed_breakfast2=new Array() //2nd array set example. Remove or add more sets as needed.

//SET IMAGE PATHS. Extend or contract array as needed

bed_breakfast2[0]=["/images/photo/bed_breakfast2/bed1.jpg", "", ""] //plain image syntax

bed_breakfast2[1]=["/images/photo/bed_breakfast2/bed1.jpg", "", ""] //image with link syntax

bed_breakfast2[2]=["/images/photo/bed_breakfast2/bed1.jpg", "", ""] //image with link syntax


var fadebgcolor=""



////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

 

 //code added by TS

 //Image object to preload the images

var heavyImage = new Image(); 

heavyImage.src = "";

var tempIndex =0;

//-------------------------------------------------------

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{

	if(obj.IsImageOk(obj.tempobj)){

		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

		//alert(obj.IsImageOk(obj.tempobj));

		setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)

	}

//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>'



//code added by TS

if(tempIndex < fadeimages.length){

	heavyImage.src =this.postimages[picindex].src;

	tempIndex++;

}else{

	heavyImage.src ="";

}



//---------------------------

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()

}



fadeshow.prototype.IsImageOk=function(divObj) {

	//alert("calling----" + heavyImage.complete);

	img=divObj.getElementsByTagName("img")[0];

    // During the onload event, IE correctly identifies any images that

    // weren't downloaded as not complete. Others should too. Gecko-based

    // browsers act like NS4 in that they report this incorrectly.

    if (!img.complete && !heavyImage.complete) {

        return false;

    }



    // However, they do have two very useful properties: naturalWidth and

    // naturalHeight. These give the true size of the image. If it failed

    // to load, either of these should be zero.

    if (typeof img.naturalHeight != "undefined" && img.naturalHeight == 0 && typeof heavyImage.naturalHeight != "undefined" && heavyImage.naturalHeight == 0) {

        return false;

    }



    // No other way of checking: assume it's ok.

    return true;

}


