   
/***********************************************
* 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]=["images/photo01.jpg", "EN/gallery/AMERICA/01/gallery_america_01.html", "_new"]
fadeimages[1]=["images/photo02.jpg", "EN/gallery/AMERICA/02/gallery_america_02.html", "_new"]
fadeimages[2]=["images/photo03.jpg", "EN/gallery/AMERICA/03/gallery_america_03.html", "_new"]
fadeimages[3]=["images/photo04.jpg", "EN/gallery/AMERICA/04/gallery_america_04.html", "_new"]
fadeimages[4]=["images/photo05.jpg", "EN/gallery/AMERICA/05/gallery_america_05.html", "_new"]
fadeimages[5]=["images/photo06.jpg", "EN/gallery/AMERICA/06/gallery_america_06.html", "_new"]
fadeimages[6]=["images/photo07.jpg", "EN/gallery/AMERICA/08/gallery_america_08.html", "_new"]
fadeimages[7]=["images/photo08.jpg", "EN/gallery/AMERICA/09/gallery_america_09.html", "_new"]
fadeimages[8]=["images/photo09.jpg", "EN/gallery/AMERICA/11/gallery_america_11.html", "_new"]
fadeimages[9]=["images/photo10.jpg", "EN/gallery/ASIA/01/gallery_asia_01.html", "_new"]
fadeimages[10]=["images/photo11.jpg", "EN/gallery/ASIA/02/gallery_asia_02.html", "_new"]
fadeimages[11]=["images/photo12.jpg", "EN/gallery/ASIA/05/gallery_asia_05.html", "_new"]
fadeimages[12]=["images/photo13.jpg", "EN/gallery/ASIA/08/gallery_asia_08.html", "_new"]
fadeimages[13]=["images/photo14.jpg", "EN/gallery/ASIA/10/gallery_asia_10.html", "_new"]
fadeimages[14]=["images/photo15.jpg", "EN/gallery/ASIA/14/gallery_asia_14.html", "_new"]
fadeimages[15]=["images/photo16.jpg", "EN/gallery/ASIA/16/gallery_asia_16.html", "_new"]
fadeimages[16]=["images/photo17.jpg", "EN/gallery/ASIA/19/gallery_asia_19.html", "_new"]
fadeimages[17]=["images/photo18.jpg", "EN/gallery/EUROPE/02/gallery_europe_02.html", "_new"]
fadeimages[18]=["images/photo19.jpg", "EN/gallery/EUROPE/03/gallery_europe_03.html", "_new"]
fadeimages[19]=["images/photo20.jpg", "EN/gallery/EUROPE/04/gallery_europe_04.html", "_new"]
fadeimages[20]=["images/photo21.jpg", "EN/gallery/EUROPE/05/gallery_europe_05.html", "_new"]
fadeimages[21]=["images/photo22.jpg", "EN/gallery/EUROPE/06/gallery_europe_06.html", "_new"]
fadeimages[22]=["images/photo23.jpg", "EN/gallery/EUROPE/07/gallery_europe_07.html", "_new"]
fadeimages[23]=["images/photo24.jpg", "EN/gallery/EUROPE/10/gallery_europe_10.html", "_new"]
fadeimages[24]=["images/photo25.jpg", "EN/gallery/EUROPE/08/gallery_europe_08.html", "_new"]
fadeimages[25]=["images/photo26.jpg", "EN/gallery/EUROPE/09/gallery_europe_09.html", "_new"]
fadeimages[26]=["images/photo27.jpg", "EN/gallery/EUROPE/11/gallery_europe_11.html", "_new"]
fadeimages[27]=["images/photo28.jpg", "EN/gallery/EUROPE/12/gallery_europe_12.html", "_new"]
fadeimages[28]=["images/photo29.jpg", "EN/gallery/EUROPE/13/gallery_europe_13.html", "_new"]
fadeimages[29]=["images/photo30.jpg", "EN/gallery/EUROPE/14/gallery_europe_14.html", "_new"]
fadeimages[30]=["images/photo31.jpg", "EN/gallery/EUROPE/15/gallery_europe_15.html", "_new"]
fadeimages[31]=["images/photo32.jpg", "EN/gallery/EUROPE/16/gallery_europe_16.html", "_new"]
fadeimages[32]=["images/photo33.jpg", "EN/gallery/EUROPE/18/gallery_europe_18.html", "_new"]
fadeimages[33]=["images/photo34.jpg", "EN/gallery/EUROPE/19/gallery_europe_19.html", "_new"]
fadeimages[34]=["images/photo35.jpg", "EN/gallery/EUROPE/21/gallery_europe_21.html", "_new"]
fadeimages[35]=["images/photo36.jpg", "EN/gallery/EUROPE/23/gallery_europe_23.html", "_new"]
fadeimages[36]=["images/photo37.jpg", "EN/gallery/EUROPE/24/gallery_europe_24.html", "_new"]
fadeimages[37]=["images/photo38.jpg", "EN/gallery/EUROPE/25/gallery_europe_25.html", "_new"]
fadeimages[38]=["images/photo39.jpg", "EN/gallery/EUROPE/26/gallery_europe_26.html", "_new"]
fadeimages[39]=["images/photo40.jpg", "EN/gallery/EUROPE/28/gallery_europe_28.html", "_new"]
fadeimages[40]=["images/photo41.jpg", "EN/gallery/EUROPE/30/gallery_europe_30.html", "_new"]
fadeimages[41]=["images/photo42.jpg", "EN/gallery/EUROPE/38/gallery_europe_38.html", "_new"]
fadeimages[42]=["images/photo43.jpg", "EN/gallery/EUROPE/44/gallery_europe_44.html", "_new"]
fadeimages[43]=["images/photo44.jpg", "EN/gallery/EUROPE/53/gallery_europe_53.html", "_new"]
fadeimages[44]=["images/photo45.jpg", "EN/gallery/EUROPE/58/gallery_europe_58.html", "_new"]
fadeimages[45]=["images/photo46.jpg", "EN/gallery/EUROPE/59/gallery_europe_59.html", "_new"]
fadeimages[46]=["images/photo47.jpg", "EN/gallery/EUROPE/61/gallery_europe_61.html", "_new"]
fadeimages[47]=["images/photo48.jpg", "EN/gallery/EUROPE/62/gallery_europe_62.html", "_new"]
fadeimages[48]=["images/photo49.jpg", "EN/gallery/OCEANIA/01/gallery_oceania_01.html", "_new"]
fadeimages[49]=["images/photo50.jpg", "EN/gallery/OCEANIA/02/gallery_oceania_02.html", "_new"]
fadeimages[50]=["images/photo51.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]
fadeimages[51]=["images/photo52.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]
fadeimages[52]=["images/photo53.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]
fadeimages[53]=["images/photo54.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]
fadeimages[54]=["images/photo55.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]
fadeimages[55]=["images/photo56.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]
fadeimages[56]=["images/photo57.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]
fadeimages[57]=["images/photo58.jpg", "EN/gallery/ASIA/20/gallery_asia_20.html", "_new"]



 
var fadebgcolor="black"

////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()
}
