
var SlideShowSpeed = 7000;
var CrossFadeDuration = 3;
var Picture = new Array(); 

Picture[1]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera.jpg';
Picture[2]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera2.jpg';
Picture[3]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera3.jpg';
Picture[4]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera4.jpg';
Picture[5]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera5.jpg';
Picture[6]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera6.jpg';
Picture[7]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera7.jpg';
Picture[8]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera8.jpg';
Picture[9]  = 'http://www.albudeite.com/img/es/portal/banner/cabecera9.jpg';
var tss;
var iss;
var jss = 1;
var pss = Picture.length-1;

var preLoad = new Array();
for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}

function RunSlideShow(){


if (document.all){
document.images.PictureBox.style.filter="blendTrans(duration=2)";
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Apply();}
else
{
imageId = 'PictureBox';
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);
}
document.images.PictureBox.src = preLoad[jss].src;
if (document.all) document.images.PictureBox.filters.blendTrans.Play();
jss = jss + 1;
if (jss > (pss)) jss=1;
tss = setTimeout('RunSlideShow()', SlideShowSpeed);
}

function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  //obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}
function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 1;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 6);
    }
  }
}

