//<![CDATA[
window.addEventListener ? window.addEventListener("load", init, false) : window.attachEvent("onload", init);
var divs = new Array(), zInterval = null, current = 0, pause = false;
function init() {
  divs = document.getElementById("bl").getElementsByTagName("div");
  for(i=1;i<divs.length;i++) { 
    divs[i].xOpacity = 0;
  };
  divs[0].style.display = "block";
  divs[0].xOpacity = .99;
  setTimeout(fade, 5000);
};
function fade() {
  cOpacity = divs[current].xOpacity;
  nIndex = divs[current+1] ? current + 1  :0;
  nOpacity = divs[nIndex].xOpacity;
  cOpacity -= .05; 
  nOpacity += .05;
  divs[nIndex].style.display = "block";
  divs[current].xOpacity = cOpacity;
  divs[nIndex].xOpacity = nOpacity;
  setOpacity(divs[current]); 
  setOpacity(divs[nIndex]);
  if(cOpacity <= 0) {
    divs[current].style.display = "none";
    current = nIndex;
    setTimeout(fade, 5000);
  } else {
    setTimeout(fade, 50);
  };
  function setOpacity(obj) {
    if(obj.xOpacity > .99) {
      obj.xOpacity = .99;
      return;
    };
    obj.style.opacity = obj.xOpacity;
    obj.style.MozOpacity = obj.xOpacity;
    obj.style.filter = "alpha(opacity=" + (obj.xOpacity * 100) + ")";
  };
};
//]]>