/***********************************************
* 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 haus=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
haus[0]=["../global/images/slideshow/haus_1.jpg", "", ""] //plain image syntax
haus[1]=["../global/images/slideshow/haus_2.jpg", "", ""] //image with link syntax
haus[2]=["../global/images/slideshow/landschaft_dreizinnen_030_h_oberhofer.jpg", "", ""] //image with link syntax
haus[3]=["../global/images/slideshow/freizeit_05_shopping_freizeit_shopping_011_m_schoenegger.jpg", "", ""] //image with link syntax
haus[4]=["../global/images/slideshow/freizeit_02_winter_01_ski_freizeit_winter_ski_014_m_schoenegger.jpg", "", ""] //image with link and target syntax
haus[5]=["../global/images/slideshow/tradition_1.jpg", "", ""] //image with link and target syntax


var lage=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
lage[0]=["../global/images/slideshow/landschaft_02_innichen_landschaft_innichen_001_m_schoenegger.jpg", "", ""] //plain image syntax
lage[1]=["../global/images/slideshow/freizeit_sommer_funbob_008_h_rier.jpg", "", ""] //image with link syntax
lage[2]=["../global/images/slideshow/landschaft_02_innichen_landschaft_innichen_025_m_gratton.jpg", "", ""] //image with link syntax
lage[3]=["../global/images/slideshow/gastronomie_gastronomie_009_m_schoenegger.jpg", "", ""] //image with link syntax
lage[4]=["../global/images/slideshow/freizeit_01_sommer_02_radfahren_freizeit_sommer_radfahren_002_m_schoenegger.jpg", "", ""] //plain image syntax

var wohnen1=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
wohnen1[0]=["../global/images/slideshow/wohnen_1_1.jpg", "", ""] //plain image syntax
wohnen1[1]=["../global/images/slideshow/wohnen_1_2.jpg", "", ""] //image with link syntax
wohnen1[2]=["../global/images/slideshow/wohnen_1_3.jpg", "", ""] //image with link syntax
wohnen1[3]=["../global/images/slideshow/wohnen_1_4.jpg", "", ""] //image with link and target syntax

var wohnen2=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
wohnen2[0]=["../global/images/slideshow/wohnen_2_1.jpg", "", ""] //plain image syntax
wohnen2[1]=["../global/images/slideshow/wohnen_2_2.jpg", "", ""] //image with link syntax
wohnen2[2]=["../global/images/slideshow/wohnen_2_3.jpg", "", ""] //image with link syntax
wohnen2[3]=["../global/images/slideshow/wohnen_2_4.jpg", "", ""] //image with link and target syntax

var wohnen3=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
wohnen3[0]=["../global/images/slideshow/wohnen_3_1.jpg", "", ""] //plain image syntax
wohnen3[1]=["../global/images/slideshow/wohnen_3_2.jpg", "", ""] //image with link syntax
wohnen3[2]=["../global/images/slideshow/wohnen_3_3.jpg", "", ""] //image with link syntax
wohnen3[3]=["../global/images/slideshow/wohnen_3_4.jpg", "", ""] //image with link and target syntax

var wohnen4=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
wohnen4[0]=["../global/images/slideshow/wohnen_4_1.jpg", "", ""] //plain image syntax
wohnen4[1]=["../global/images/slideshow/wohnen_4_2.jpg", "", ""] //image with link syntax
wohnen4[2]=["../global/images/slideshow/wohnen_4_3.jpg", "", ""] //image with link syntax
wohnen4[3]=["../global/images/slideshow/wohnen_4_4.jpg", "", ""] //image with link syntax
wohnen4[4]=["../global/images/slideshow/wohnen_4_5.jpg", "", ""] //image with link and target syntax

var sommer=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
sommer[0]=["../global/images/slideshow/freizeit_04_nordicwalking_freizeit_nordicwalking_006_m_schoenegger.jpg", "", ""] //plain image syntax
sommer[1]=["../global/images/slideshow/freizeit_sommer_radfahren_029_n_eisele_hein.jpg", "", ""] //image with link syntax
sommer[2]=["../global/images/slideshow/freizeit_sommer_klettern_026_n_eisele_hein.jpg", "", ""] //plain image syntax
sommer[3]=["../global/images/slideshow/freizeit_01_sommer_09_reiten_freizeit_sommer_reiten_001_m_schoenegger.jpg", "", ""] //plain image syntax
sommer[4]=["../global/images/slideshow/tradition_tradition_011_m_schoenegger.jpg", "", ""] //image with link and target syntax


var winter=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
winter[0]=["../global/images/slideshow/freizeit_02_winter_01_ski_freizeit_winter_ski_075_c_tschurtschenthaler.jpg", "", ""] //image with link syntax
winter[1]=["../global/images/slideshow/landschaft_dreizinnen_028_h_oberhofer.jpg", "", ""] //image with link syntax
winter[2]=["../global/images/slideshow/freizeit_02_winter_02_langlauf_freizeit_winter_langlauf_001_m_schoenegger.jpg", "", ""] //image with link syntax
winter[3]=["../global/images/slideshow/freizeit_02_winter_01_ski_freizeit_winter_ski_055_c_tschurtschenthaler.jpg", "", ""] //image with link syntax

var acquafun=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
acquafun[0]=["../global/images/slideshow/acquafun_1.jpg", "", ""] //plain image syntax
acquafun[1]=["../global/images/slideshow/acquafun_2.jpg", "", ""] //image with link syntax
acquafun[2]=["../global/images/slideshow/acquafun_3.jpg", "", ""] //image with link syntax
acquafun[3]=["../global/images/slideshow/acquafun_4.jpg", "", ""] //image with link and target syntax

var summeractivity=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
summeractivity[0]=["../global/images/slideshow/summeractivity_1.jpg", "", ""] //plain image syntax
summeractivity[1]=["../global/images/slideshow/freizeit_sommer_wandern_070_h_rier.jpg", "", ""] //image with link syntax
summeractivity[2]=["../global/images/slideshow/summeractivity_2.jpg", "", ""] //image with link syntax

var sommerpreise=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
sommerpreise[0]=["../global/images/slideshow/senso_01.jpg", "", ""] //plain image syntax
sommerpreise[1]=["../global/images/slideshow/landschaft_02_innichen_landschaft_innichen_004_h_oberhofer.jpg", "", ""] //plain image syntax
sommerpreise[2]=["../global/images/slideshow/freizeit_sommer_wandern_045_h_rier.jpg", "", ""] //plain image syntax


var winterpreise=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
winterpreise[0]=["../global/images/slideshow/freizeit_02_winter_04_schneeschuhw_freizeit_winter_schneeschuhwandern_006_f_oddoux.jpg", "", ""] //plain image syntax
winterpreise[1]=["../global/images/slideshow/senso_02.jpg", "", ""] //plain image syntax
winterpreise[2]=["../global/images/slideshow/landschaft_02_innichen_landschaft_innichen_021_m_gratton.jpg", "", ""] //plain image syntax
winterpreise[3]=["../global/images/slideshow/freizeit_winter_ski_088_h_rier.jpg", "", ""] //image with link syntax

var angebote=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
angebote[0]=["../global/images/slideshow/senso_03.jpg", "", ""] //plain image syntax
angebote[1]=["../global/images/slideshow/freizeit_02_winter_09_winterspass_freizeit_winter_winterspass_005_m_gratton.jpg", "", ""] //image with link syntax
angebote[2]=["../global/images/slideshow/landschaft_06_dreizinnen_landschaft_dreizinnen_002_m_schoenegger.jpg", "", ""] //image with link syntax

var kontakt=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
kontakt[0]=["../global/images/slideshow/veranstaltungen_dolomiti_balloonfestival_038_j_klaehn.jpg", "", ""] //plain image syntax
kontakt[1]=["../global/images/slideshow/freizeit_02_winter_01_ski_freizeit_winter_ski_054_c_tschurtschenthaler.jpg", "", ""] //image with link syntax
kontakt[2]=["../global/images/slideshow/freizeit_sommer_wandern_053_h_rier.jpg", "", ""] //image with link syntax

var anreise=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
anreise[0]=["../global/images/slideshow/senso_04.jpg", "", ""] //plain image syntax
anreise[1]=["../global/images/slideshow/freizeit_winter_schneemannfamilie_006_h_rier.jpg", "", ""] //image with link syntax
anreise[2]=["../global/images/slideshow/senso_07.jpg", "", ""] //image with link syntax

var wetter=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
wetter[0]=["../global/images/slideshow/senso_05.jpg", "", ""] //plain image syntax
wetter[1]=["../global/images/slideshow/freizeit_02_winter_01_ski_freizeit_winter_ski_001_m_schoenegger.jpg", "", ""] //image with link syntax
wetter[2]=["../global/images/slideshow/landschaft_02_innichen_landschaft_innichen_005_h_oberhofer.jpg", "", ""] //image with link syntax

var gaestebuch=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
gaestebuch[0]=["../global/images/slideshow/freizeit_04_nordicwalking_freizeit_nordicwalking_005_m_schoenegger.jpg", "", ""] //plain image syntax
gaestebuch[1]=["../global/images/slideshow/freizeit_02_winter_08_pferdeschlittenfahrten_freizeit_winter_pferdeschlitten_003_m_schoenegger.jpg", "", ""] //image with link syntax
gaestebuch[2]=["../global/images/slideshow/senso_06.jpg", "", ""] //image with link syntax

var fotogalerie=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fotogalerie[0]=["../global/images/slideshow/freizeit_winter_rodeln_013_h_rier.jpg", "", ""] //plain image syntax
fotogalerie[1]=["../global/images/slideshow/freizeit_sommer_radfahren_024_h_rier.jpg", "", ""] //image with link syntax
fotogalerie[2]=["../global/images/slideshow/freizeit_02_winter_07_rentierewi_freizeit_winter_rentiere_001_h_innerkofler.jpg", "", ""] //image with link syntax

/*
fadeimages[1]=["../global/images/kopf1.jpg", "http://www.cssdrive.com", ""] //image with link syntax
fadeimages[2]=["../global/images/kopf1.jpg", "http://www.javascriptkit.com", "_new"] //image with link and target 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=0 //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+=5
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()
}