// java
function diashow(){
  foto('A')
} 

function foto(aktie){
  if ((aktie=="+")&&(index<x.length-1)) {
   stopshow(nId)
   index++
  }
  if ((aktie=='-')&&(index>0)) {
   stopshow(nId)
	index--
  }
  if (aktie=='B') {
    stopshow()
	index = 0
  }
  if (aktie=='E') {
    stopshow()
    index = x.length-1
  }
  if (aktie=='A'){
	  stopshow()
    index++
    if (index>x.length-1) {
      index = 0
	  }
  }
	document.images["foto"].src = x[index]
	
	if(document.images['foto'].width > 650) document.images['foto'].width = 650;
	
  document.getElementById("msg").innerHTML = " Foto "+parseInt(index+1)+" van "+x.length;

  if ((document.all) && (document.images['foto'].style.filter != null )){
   document.images['foto'].style.filter="BlendTrans(duration=2)"
   document.images['foto'].filters.BlendTrans.Apply() 
    document.images['foto'].filters.BlendTrans.Play()
  }
	if (aktie=='A'){
	  nId = setInterval("foto('A')",4000)
	}
}

function stopshow() {
  if (nId>0) clearInterval(nId)
 }

