var larghFoto = 90;
var altezFoto = 90;
var a = 0;
var a2 = 1;
var a3 = 2;
var a4 = 3;
var a5 = 4;
imgPath = new Array;
SiClickGoTo = new Array;

if (document.images)
{
	i0 = new Image;
	i0.src = './ROTAZIONI/1.jpg';
	imgPath[0] = i0.src;
	
	i1 = new Image;
	i1.src = './ROTAZIONI/2.jpg';
	imgPath[1] = i1.src;
	
	i2 = new Image;
	i2.src = './ROTAZIONI/3.jpg';
	imgPath[2] = i2.src;
	
	i3 = new Image;
	i3.src = './ROTAZIONI/4.jpg';
	imgPath[3] = i3.src;
	
	i4 = new Image;
	i4.src = './ROTAZIONI/5.jpg';
	imgPath[4] = i4.src;
	
	i5 = new Image;
	i5.src = './ROTAZIONI/6.jpg';
	imgPath[5] = i5.src;
	
	i6 = new Image;
	i6.src = './ROTAZIONI/7.jpg';
	imgPath[6] = i6.src;
	
	i7 = new Image;
	i7.src = './ROTAZIONI/8.jpg';
	imgPath[7] = i7.src;
	
	i8 = new Image;
	i8.src = './ROTAZIONI/9.jpg';
	imgPath[8] = i8.src;

}

function ejs_img_fx(img)
{
	if(img && img.filters && img.filters[0])
	{
		img.filters[0].apply();
		img.filters[0].play();
	}
}

function ejs_img_fx2(img2)
{
	if(img2 && img2.filters && img2.filters[0])
	{
		img2.filters[0].apply();
		img2.filters[0].play();
	}
}

function ejs_img_fx3(img3)
{
	if(img3 && img3.filters && img3.filters[0])
	{
		img3.filters[0].apply();
		img3.filters[0].play();
	}
}

function ejs_img_fx4(img4)
{
	if(img4 && img4.filters && img4.filters[0])
	{
		img4.filters[0].apply();
		img4.filters[0].play();
	}
}

function ejs_img_fx5(img5)
{
	if(img5 && img5.filters && img5.filters[0])
	{
		img5.filters[0].apply();
		img5.filters[0].play();
	}
}

function StartAnim()
{
	if (document.images)
	{
		document.write('<img src="./ROTAZIONI/1.jpg" width="' + larghFoto + '" height="' + altezFoto + '" border="0" name="defil" style="filter:progid:DXImageTransform.Microsoft.Fade(Duration=2)" />');
		defilimg();
	}
	else
	{
		document.write('<img src="./ROTAZIONI/1.jpg" border="0" width="' + larghFoto + '" height="' + altezFoto + '" alt=" " />');
	}
}

function StartAnim2()
{
	if (document.images)
	{
		document.write('<img src="./ROTAZIONI/2.jpg" width="' + larghFoto + '" height="' + altezFoto + '" border="0" name="defil2" style="filter:progid:DXImageTransform.Microsoft.Fade(Duration=2)" />');
		defilimg2();
	}
	else
	{
		document.write('<img src="./ROTAZIONI/2.jpg" border="0" width="' + larghFoto + '" height="' + altezFoto + '" alt=" " />');
	}
}

function StartAnim3()
{
	if (document.images)
	{
		document.write('<img src="./ROTAZIONI/3.jpg" width="' + larghFoto + '" height="' + altezFoto + '" border="0" name="defil3" style="filter:progid:DXImageTransform.Microsoft.Fade(Duration=2)" />');
		defilimg3();
	}
	else
	{
		document.write('<img src="./ROTAZIONI/3.jpg" border="0" width="' + larghFoto + '" height="' + altezFoto + '" alt=" " />');
	}
}

function StartAnim4()
{
	if (document.images)
	{
		document.write('<img src="./ROTAZIONI/4.jpg" width="' + larghFoto + '" height="' + altezFoto + '" border="0" name="defil4" style="filter:progid:DXImageTransform.Microsoft.Fade(Duration=2)" />');
		defilimg4();
	}
	else
	{
		document.write('<img src="./ROTAZIONI/4.jpg" border="0" width="' + larghFoto + '" height="' + altezFoto + '" alt=" " />');
	}
}

function StartAnim5()
{
	if (document.images)
	{
		document.write('<img src="./ROTAZIONI/5.jpg" width="' + larghFoto + '" height="' + altezFoto + '" border="0" name="defil5" style="filter:progid:DXImageTransform.Microsoft.Fade(Duration=2)" />');
		defilimg5();
	}
	else
	{
		document.write('<img src="./ROTAZIONI/5.jpg" border="0" width="' + larghFoto + '" height="' + altezFoto + '" alt=" " />');
	}
}

/*function ImgDest()
{
	document.location.href = SiClickGoTo[a-1];
}*/

function defilimg()
{
//a = num immagini - 1
	
	if (a > 8)
	{
		a = 0;
	}
	if (document.images)
	{
		ejs_img_fx(document.defil);
		document.defil.src = imgPath[a];
		tempo = setTimeout("defilimg()",3000);
		a++;
	}
}

function defilimg2()
{
//a = num immagini - 1
	if (a2 > 8)
	{
		a2 = 0;
	}
	if (document.images)
	{
		ejs_img_fx2(document.defil2);
		document.defil2.src = imgPath[a2];
		tempo2 = setTimeout("defilimg2()",3000);
		a2++;
	}
}

function defilimg3()
{
//a = num immagini - 1
	if (a3 > 8)
	{
		a3 = 0;
	}
	if (document.images)
	{
		ejs_img_fx(document.defil3);
		document.defil3.src = imgPath[a3];
		tempo3 = setTimeout("defilimg3()",3000);
		a3++;
	}
}

function defilimg4()
{
//a = num immagini - 1
	if (a4 > 8)
	{
		a4 = 0;
	}
	if (document.images)
	{
		ejs_img_fx(document.defil4);
		document.defil4.src = imgPath[a4];
		tempo4 = setTimeout("defilimg4()",3000);
		a4++;
	}
}

function defilimg5()
{
//a = num immagini - 1
	if (a5 > 8)
	{
		a5 = 0;
	}
	if (document.images)
	{
		ejs_img_fx(document.defil5);
		document.defil5.src = imgPath[a5];
		tempo5 = setTimeout("defilimg5()",3000);
		a5++;
	}
}
