// BROWSER SNIFFER (Sniff out the good and bad browsers)

function Is() {
    var agent = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);
    this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
    this.ns2 = (this.ns && (this.major == 2));
    this.ns3 = (this.ns && (this.major == 3));
    this.ns4b = (this.ns && (this.minor < 4.04));
    this.ns4 = (this.ns && (this.major >= 4));
    this.ie   = (agent.indexOf("msie") != -1);
    this.ie3  = (this.ie && (this.major == 2));
    this.ie4  = (this.ie && (this.major >= 4));
    this.op3 = (agent.indexOf("opera") != -1);
    this.win   = (agent.indexOf("win")!=-1);
    this.mac   = (agent.indexOf("mac")!=-1);
    this.unix  = (agent.indexOf("x11")!=-1);
}

var is = new Is();


 var pics=new Array();
 pics[0]="../Images/contents/stone_red.gif";
 pics[1]="img/effects/auge01.gif";
 pics[2]="img/effects/mund01.gif";
 pics[3]="img/effects/auge02.gif";
 pics[4]="img/effects/mund02.gif";
 pics[5]="img/effects/pigment01.gif";

 var preloadedpics=new Array();

 for (i=1;i<pics.length;i++)
 {
   preloadedpics[i]=new Image();
   preloadedpics[i].src=pics[i];
 }


  window.onerror=reapply


 //change speed below (in seconds)
 var speed=2;
 var step=0;


function slideit()
{


//  alert("step = " +step+ ".");


  if(is.ie4)
  {
   document.images.slide.filters.blendTrans.apply();
   document.all.LayEffects.document.slide.src=pics[step];
  }
  else if(is.ns4)
  {
   document.LayEffects.document.slide.src=pics[step];
  }


  if (is.ie4)
  {
   document.images.slide.filters.blendTrans.play();
  }

  if (step < pics.length - 1)
  {
   step++;
  }
  else
  {
   step=0;
  }


  setTimeout("slideit()",speed*1000+3000);

}


function reapply()
{
  setTimeout("slideit()",2000);
  return true;
}
