/***********************************************
* Ultimate Fade-In Slideshow (v1.5): © 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.
***********************************************/
////NO need to edit beyond here/////////////

var fadearraypatrocinadores=new Array() //array to cache fadeshow instances
var fadeclearpatrocinadores=new Array() //array to cache corresponding clearinterval pointers

var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all

function fadeshowpatrocinadores(theimages, fadewidthpatrocinadores, fadeheightpatrocinadores, borderwidth, delay, pause, stylelink, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.stylelink=stylelink
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearraypatrocinadores[fadearraypatrocinadores.length]=this
this.slideshowidpatrocinadores=fadearraypatrocinadores.length-1
this.canvasbase="patrocinadores_canvas"+this.slideshowidpatrocinadores
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 fadewidthpatrocinadores=fadewidthpatrocinadores+this.imageborder*2
var fadeheightpatrocinadores=fadeheightpatrocinadores+this.imageborder*2

if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="masterpatrocinadores'+this.slideshowidpatrocinadores+'" style="position:relative;width:'+fadewidthpatrocinadores+'px;height:'+fadeheightpatrocinadores+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidthpatrocinadores+'px;height:'+fadeheightpatrocinadores+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;-khtml-opacity:10;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidthpatrocinadores+'px;height:'+fadeheightpatrocinadores+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);-moz-opacity:10;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslidepatrocinadores'+this.slideshowidpatrocinadores+'" src="'+this.postimages[0].src+'"></div>')

if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearraypatrocinadores["+this.slideshowidpatrocinadores+"].rotateimage()", this.delay)
}
}

function fadepicpatrocinadores(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{
clearInterval(fadeclearpatrocinadores[obj.slideshowidpatrocinadores])
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("fadearraypatrocinadores["+obj.slideshowidpatrocinadores+"].rotateimage()", obj.delay)
}
}

fadeshowpatrocinadores.prototype.populateslide=function(picobjpatrocinadores, picindexpatrocinadores){
var slideHTMLpatrocinadores=""
slideHTMLpatrocinadores='<div align="center">'
if (this.theimages[picindexpatrocinadores][1]!="") //if associated link exists for image
	if (this.stylelink!="")
		slideHTMLpatrocinadores+='<a href="'+this.theimages[picindexpatrocinadores][1]+'" class="'+this.stylelink+'" target="'+this.theimages[picindexpatrocinadores][2]+'">'
	else
		slideHTMLpatrocinadores+='<a href="'+this.theimages[picindexpatrocinadores][1]+'" target="'+this.theimages[picindexpatrocinadores][2]+'">'
slideHTMLpatrocinadores+='<img src="'+this.postimages[picindexpatrocinadores].src+'" border="'+this.imageborder+'px"></div>'
slideHTMLpatrocinadores+=this.theimages[picindexpatrocinadores][3]
if (this.theimages[picindexpatrocinadores][1]!="") //if associated link exists for image
slideHTMLpatrocinadores+='</a>'
slideHTMLpatrocinadores+='</div>'
picobjpatrocinadores.innerHTML=slideHTMLpatrocinadores
}


fadeshowpatrocinadores.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 crossobjpatrocinadores=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobjpatrocinadores.style.zIndex++
fadeclearpatrocinadores[this.slideshowidpatrocinadores]=setInterval("fadepicpatrocinadores(fadearraypatrocinadores["+this.slideshowidpatrocinadores+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobjpatrocinadores=document.images['defaultslidepatrocinadores'+this.slideshowidpatrocinadores]
ns4imgobjpatrocinadores.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}

fadeshowpatrocinadores.prototype.resetit=function(){
this.degree=10
var crossobjpatrocinadores=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobjpatrocinadores.filters&&crossobjpatrocinadores.filters[0]){
if (typeof crossobjpatrocinadores.filters[0].opacity=="number") //if IE6+
crossobjpatrocinadores.filters(0).opacity=this.degree
else //else if IE5.5-
crossobjpatrocinadores.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobjpatrocinadores.style.MozOpacity)
crossobjpatrocinadores.style.MozOpacity=this.degree/101
else if (crossobjpatrocinadores.style.KhtmlOpacity)
crossobjpatrocinadores.style.KhtmlOpacity=obj.degree/100
}


fadeshowpatrocinadores.prototype.startit=function(){
var crossobjpatrocinadores=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobjpatrocinadores, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobjpatrocinadores=this
var crossobjcontainerpatrocinadores=iebrowser? iebrowser["masterpatrocinadores"+this.slideshowidpatrocinadores] : document.getElementById("masterpatrocinadores"+this.slideshowidpatrocinadores)
crossobjcontainerpatrocinadores.onmouseover=function(){cacheobjpatrocinadores.mouseovercheck=1}
crossobjcontainerpatrocinadores.onmouseout=function(){cacheobjpatrocinadores.mouseovercheck=0}
}
this.rotateimage()
}
