var pauze=new Array()
var verzameling=new Array()
var dom=(document.getElementById)
var iebrowser=document.all
function afspelen(plaatjes, breed, hoog, dik, tempo, wacht, volgorde)
{
this.muiseffect=wacht
this.muis=0
this.tempo=tempo
this.transparantie=10
this.deze=0
this.volgende=1
this.rand=parseInt(dik)
verzameling[verzameling.length]=this
this.foto=verzameling.length-1
this.startplaats="plaats"+this.foto
this.plaatsing=this.startplaats+"_0"
this.plaatjes=plaatjes
if (typeof volgorde!="undefined")
this.plaatjes.sort(function() {return 0.5 - Math.random();})
this.voorladen=new Array()
for (p=0;p<plaatjes.length;p++){
this.voorladen[p]=new Image()
this.voorladen[p].src=this.plaatjes[p][0]
}
var breed=breed+this.rand*2
var hoog=hoog+this.rand*2
if (iebrowser&&dom||dom)
document.write('<div id="lens'+this.foto+'" style="position:relative;width:'+breed+'px;height:'+hoog+'px;overflow:hidden;"><div id="'+this.startplaats+'_0" style="position:absolute;width:'+breed+'px;height:'+hoog+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:10;-moz-opacity:10;-khtml-opacity:10;background-color:'+kleur+'"></div><div id="'+this.startplaats+'_1" style="position:absolute;width:'+breed+'px;height:'+hoog+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:10;-moz-opacity:10;background-color:'+kleur+'"></div></div>')
else
document.write('<div><img name="fotografie'+this.foto+'" src="'+this.voorladen[0].src+'"></div>')
if (iebrowser&&dom||dom)
this.start()
else{
this.deze++
setInterval("verzameling["+this.foto+"].doorgaan()", this.tempo)
}}
function fade(obj){
if (obj.transparantie<100){
obj.transparantie+=2
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="waarde")
obj.tempobj.filters[0].opacity=obj.transparantie
else
obj.tempobj.style.filter="alpha(opacity="+obj.transparantie+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.transparantie/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.transparantie/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.transparantie/101
}
else{
clearInterval(pauze[obj.foto])
obj.nextplaats=(obj.plaatsing==obj.startplaats+"_0")? obj.startplaats+"_0" : obj.startplaats+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextplaats] : document.getElementById(obj.nextplaats)
obj.invoegen(obj.tempobj, obj.volgende)
obj.volgende=(obj.volgende<obj.voorladen.length-1)? obj.volgende+1 : 0
setTimeout("verzameling["+obj.foto+"].doorgaan()", obj.tempo)
}}
afspelen.prototype.invoegen=function(picobj, fotoindex){
var HTM='<table width="100%" height="100%"><tr><td align="center" valign="middle">'
if (this.plaatjes[fotoindex][1]!="")
HTM+='<a href="'+link+'" target="'+doel+'">'//voor elke foto
HTM+='<img src="'+this.voorladen[fotoindex].src+'" border="'+this.rand+'px">'
if (this.plaatjes[fotoindex][1]!="")
HTM+='</a>'
HTM+='</td></tr></table>'
picobj.innerHTML=HTM
}
afspelen.prototype.doorgaan=function(){
if (this.muiseffect==1)
var geheugen=this
if (this.muis==1)
setTimeout(function(){geheugen.doorgaan()}, 100)
else if (iebrowser&&dom||dom){
this.herstart()
var overvloeier=this.tempobj=iebrowser? iebrowser[this.plaatsing] : document.getElementById(this.plaatsing)
overvloeier.style.zIndex++
pauze[this.foto]=setInterval("fade(verzameling["+this.foto+"])",50)
this.plaatsing=(this.plaatsing==this.startplaats+"_0")? this.startplaats+"_1" : this.startplaats+"_0"
}
else{
var ns4imgobj=document.images['fotografie'+this.foto]
ns4imgobj.src=this.voorladen[this.deze].src
}
this.deze=(this.deze<this.voorladen.length-1)? this.deze+1 : 0
}
afspelen.prototype.herstart=function(){
this.transparantie=10
var overvloeier=iebrowser? iebrowser[this.plaatsing] : document.getElementById(this.plaatsing)
if (overvloeier.filters&&overvloeier.filters[0]){
if (typeof overvloeier.filters[0].opacity=="waarde")
overvloeier.filters(0).opacity=this.transparantie
else
overvloeier.style.filter="alpha(opacity="+this.transparantie+")"
}
else if (overvloeier.style.MozOpacity)
overvloeier.style.MozOpacity=this.transparantie/101
else if (overvloeier.style.KhtmlOpacity)
overvloeier.style.KhtmlOpacity=this.transparantie/100
else if (overvloeier.style.opacity&&!overvloeier.filters)
overvloeier.style.opacity=this.transparantie/101
}
afspelen.prototype.start=function(){
var overvloeier=iebrowser? iebrowser[this.plaatsing] : document.getElementById(this.plaatsing)
this.invoegen(overvloeier, this.deze)
if (this.muiseffect==1){
var geheugen=this
var fotocontainer=iebrowser? iebrowser["lens"+this.foto] : document.getElementById("lens"+this.foto)
fotocontainer.onmouseover=function(){geheugen.muis=1}
fotocontainer.onmouseout=function(){geheugen.muis=0}
}
this.doorgaan()
}
// afspelen plaatjes