var _fary=new Array()
var dom=(document.getElementById)
var _fbgc="white"
var _fclr=new Array()
var iebrowser=document.all
function imagefade(_a, _b, _c, _d, _e, _f, _g){
this._e=_e
this._fdh=1
this._fcheck=_f
this._moc=0
this._tgb=10
this._dbz=10
this._gzx=0
_fary[_fary.length]=this
this._qtd=_fary.length-1
this._skf="canvas"+this._qtd
this._iio=this._skf+"_0"
if (typeof _g!="undefined")
_a.sort(function() {return 0.5 - Math.random();})
this._a=_a
this._ksd=parseInt(_d)
this._kf2=new Array()
for (p=0;p<_a.length;p++){
this._kf2[p]=new Image()
this._kf2[p].src=_a[p][0]
}
var _b=_b+this._ksd*2
var _c=_c+this._ksd*2
if (iebrowser&&dom||dom)
document.write('<div id="master'+this._qtd+'" style="position:relative;width:100%;height:'+_c+'px;overflow:hidden;"><div id="'+this._skf+'_0" style="position:absolute;width:100%;height:'+_c+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+_fbgc+'"></div><div id="'+this._skf+'_1" style="position:absolute;width:100%;height:'+_c+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+_fbgc+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this._qtd+'" src="'+this._kf2[0].src+'"></div>')
if (iebrowser&&dom||dom)
this.startit()
else{
this._gzx++
setInterval("_fary["+this._qtd+"].rotateimage()", this._e)
}
}
function meth1(obj){
if (obj._dbz<100){
obj._dbz+=obj._tgb
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number")
obj.tempobj.filters[0].opacity=obj._dbz
else
obj.tempobj.style.filter="alpha(opacity="+obj._dbz+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj._dbz/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj._dbz/100
}
else{
obj._tgb=2
clearInterval(_fclr[obj._qtd])
obj.nextcanvas=(obj._iio==obj._skf+"_0")? obj._skf+"_0" : obj._skf+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj._fdh)
obj._fdh=(obj._fdh<obj._kf2.length-1)? obj._fdh+1 : 0
setTimeout("_fary["+obj._qtd+"].rotateimage()", obj._e)
}
}
imagefade.prototype.populateslide=function(picobj, picindex){
var html=""
if (this._a[picindex][2]!="")
html='<h1>'+this._a[picindex][2]+'</h1>'
if (this._a[picindex][1]!="")
html+='<a href="'+this._a[picindex][1]+'" target="'+this._a[picindex][2]+'">'
html+='<img src="'+this._kf2[picindex].src+'" width=100% height=220 border="'+this._ksd+'px">'
if (this._a[picindex][1]!="")
html+='</a>'
picobj.innerHTML=html
}
imagefade.prototype.rotateimage=function(){
if (this._fcheck==1)
var cacheobj=this
if (this._moc==1)
setTimeout(function(){cacheobj.rotateimage()}, 25)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this._iio] : document.getElementById(this._iio)
crossobj.style.zIndex++
_fclr[this._qtd]=setInterval("meth1(_fary["+this._qtd+"])",50)
this._iio=(this._iio==this._skf+"_0")? this._skf+"_1" : this._skf+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this._qtd]
ns4imgobj.src=this._kf2[this._gzx].src
}
this._gzx=(this._gzx<this._kf2.length-1)? this._gzx+1 : 0
}
imagefade.prototype.resetit=function(){
this._dbz=10
var crossobj=iebrowser? iebrowser[this._iio] : document.getElementById(this._iio)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number")
crossobj.filters(0).opacity=this._dbz
else
crossobj.style.filter="alpha(opacity="+this._dbz+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this._dbz/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=obj._dbz/100
}
imagefade.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this._iio] : document.getElementById(this._iio)
this.populateslide(crossobj, this._gzx)
if (this._fcheck==1){
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this._qtd] : document.getElementById("master"+this._qtd)
crossobjcontainer.onmouseover=function(){cacheobj._moc=1}
crossobjcontainer.onmouseout=function(){cacheobj._moc=0}
}
this.rotateimage()
}