<!---

/*
DHTML slideshow script- 
© Dynamic Drive (www.dynamicdrive.com)
For full source code, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com

MODIFIED BY STEFANO TULINI (Akensoft), 17.9.2005
*/
var iedom=document.all||document.getElementById;

var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
  preloadedimages[i]=new Image();
  preloadedimages[i].src=photos[i];
}

function applyeffect() {
  if (document.all && photoslider.filters) {
		photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23);
		photoslider.filters.revealTrans.stop();
		photoslider.filters.revealTrans.apply();
  }
}

function playeffect() {
  if (document.all && photoslider.filters)
		photoslider.filters.revealTrans.play();
}

function keeptrack() {
  window.status="Immagine "+(which+1)+" di "+photos.length;
}

function backward() {
  if (which > 0) {
		which--;
		applyeffect();
		document.images.photoslider.src=photos[which];
		playeffect();
		keeptrack();
		changetext(content[which]);
  }
}

function forward() {
  if (which<photos.length-1) {
		which++;
		applyeffect();
		document.images.photoslider.src=photos[which];
		playeffect();
		keeptrack();
		changetext(content[which]);
  }
}

function transport() {
  window.location=photoslink[which];
}

function goToItem(whichItem){
  if (whichItem != which) {
      which = whichItem;
      applyeffect();
	  document.images.photoslider.src=photos[which];
	  playeffect();
	  keeptrack();
	  changetext(content[which]);
  }
}

/*
   Codice per cambiare il testo associato alle slide
*/
function changetext(whichcontent) {
  //document.write(ie+'**'+ns+'<br><br>');
	if (iedom) {
		document.getElementById('didascalia').innerHTML = whichcontent;
  } else if (ns) {
		ns_marquee=document.d1.document.d2;
		ns_marquee.document.write('<div align="center"><nobr><font face="Verdana,Arial,Helvetica">'+whichcontent+'</font></nobr></div>')
		ns_marquee.document.close();
  }
}


//-->
