currentdiv = 1;

ng5 = (document.getElementById) ? true:false 
ns4 = (document.layers) ? 1 : 0;
ie4 = (document.all) ? 1 : 0;
ver4 = (ns4 || ie4) ? 1 : 0;   
isMac = (navigator.appVersion.indexOf("Mac") != -1) ? 1 : 0;
isTrans = (ns4 || (ie4 && !isMac)) ? 1 : 0;
if (isTrans) {
  WriteTrans();
}

function ShowDiv(currDivObj) {	  
  if (ng5) {
    document.getElementById(currDivObj).style.visibility = "visible"; 
    document.getElementById(currDivObj).style.display = "block";
  } 
  if (ns4) {
    document.layers[currDivObj].visibility = "show"; 
    document.layers[currDivObj].display = "block";
  }
  if (ie4) {
    document.all[currDivObj].style.visibility = "visible";
    document.all[currDivObj].style.display = "block";
  }
}

function HideDiv(currDivObj) {	
  if (ng5) {
    document.getElementById(currDivObj).style.visibility = "hidden"; 
    document.getElementById(currDivObj).style.display = "none";
  } 
  if (ns4) {
    document.layers[currDivObj].visibility = "hide"; 
    document.layers[currDivObj].display = "none";
  }
  if (ie4) {
    document.all[currDivObj].style.visibility = "hidden";
    document.all[currDivObj].style.display = "none";
  }
}

function shownext(max) {  	
  olddivname = 'oDIV'+currentdiv;  
  currentdiv++;
  if (currentdiv > max) {
    currentdiv = 1;
  }
  newdivname = 'oDIV'+currentdiv;    
  setTimeout("shownext("+max+")",10000);
  if (isTrans) {
    oTransContainer.filters[0].Apply();  
  }
  ShowDiv(newdivname);  
  HideDiv(olddivname);
  if (isTrans) {
    oTransContainer.filters[0].Play(duration=2);
  }
}

function WriteTrans() {
  document.write('<DIV ID="oTransContainer" STYLE="position:relative; width: 0px; height:0px;  filter:progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=1.0)">');
}