var photos=new Array();
var photoslink=new Array();
var photosdesc=new Array();
var photoswidth=new Array();
var photosheight=new Array();
var which=-1;

//Specify whether images should be linked or not (1=linked)
var linkornot=1;

//define images. You can have as many as you want. Images MUST be of the same dimensions (for NS's sake)
photos[0]="images/foto1.gif";
photos[1]="images/foto2.gif";
photos[2]="images/foto3.gif";
photos[3]="images/foto4.gif";
photos[4]="images/foto5.gif";
photos[5]="images/foto6.gif";
photos[6]="images/foto7.gif";
photos[7]="images/foto8.gif";
photos[8]="images/foto9.gif";
photos[9]="images/foto10.gif";
photos[10]="images/foto11.gif";
photos[11]="images/foto12.gif";

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photoslink[0]="foto1";
photoslink[1]="foto2";
photoslink[2]="foto3";
photoslink[3]="foto4";
photoslink[4]="foto5";
photoslink[5]="foto6";
photoslink[6]="foto7";
photoslink[7]="foto8";
photoslink[8]="foto9";
photoslink[9]="foto10";
photoslink[10]="foto11";
photoslink[11]="foto12";

//Set corresponding width for above images.
photoswidth[0]="233";
photoswidth[1]="232";
photoswidth[2]="400";
photoswidth[3]="269";
photoswidth[4]="400";
photoswidth[5]="400";
photoswidth[6]="400";
photoswidth[7]="300";
photoswidth[8]="400";
photoswidth[9]="400";
photoswidth[10]="400";
photoswidth[11]="400";

//Set corresponding height for above images.
photosheight[0]="382";
photosheight[1]="385";
photosheight[2]="300";
photosheight[3]="404";
photosheight[4]="300";
photosheight[5]="300";
photosheight[6]="300";
photosheight[7]="200";
photosheight[8]="300";
photosheight[9]="300";
photosheight[10]="300";
photosheight[11]="300";

//Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1"
photosdesc[0]="The Hotel Miramare";
photosdesc[1]="The castle of Maiori";
photosdesc[2]="A view of Maiori";
photosdesc[3]="The hotel and the beach";
photosdesc[4]="The terrace";
photosdesc[5]="The solarium";
photosdesc[6]="The beach";
photosdesc[7]="The hall";
photosdesc[8]="The reception";
photosdesc[9]="The bar";
photosdesc[10]="One of the rooms";
photosdesc[11]="One of the rooms";

//do NOT edit pass this line
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.revealTrans.Transition=Math.floor(Math.random()*23)
		photoslider.filters.revealTrans.stop()
		photoslider.filters.revealTrans.apply()
	}
}

function playeffect()
{
	if (document.all)	photoslider.filters.revealTrans.play();
}

function keeptrack()
{
	document.all.testo.innerHTML=photosdesc[which];
	window.status=photosdesc[which]+" ("+(which+1)+"/"+photos.length+")";
}

function backward()
{
	if (which>0)	which--;
	else			which=photos.length-1;
	//applyeffect();
	document.images.photoslider.src=photos[which];
	//playeffect();
	keeptrack();
}

function forward()
{
	if (which<photos.length-1)	which++;
	else						which=0;
	//applyeffect();
	document.images.photoslider.src=photos[which];
	//playeffect();
	keeptrack();
}

function transport()
{
	var wdt=parseInt(photoswidth[which])+10;
	var hgt=parseInt(photosheight[which])+35;
	var w=window.open("popup_foto.asp?n="+photoslink[which]+"@"+photoswidth[which]+"@"+photosheight[which],"foto","resizable=no,width="+wdt+",height="+hgt+",scrollbars=no,border=no");
	w.focus();
}