// Version 1.0.2
// Last Updated 1/19/2007
// Copyright 2007 The Metis Web Snc Inc
// To use this, you'll need an Imagewith the name/id= rotateimg
// Also, if you have useLinks set to true, you'll need an anchor
// with the name = rotatelink

// example setup
// <body onload="runRotator()" bgcolor="#000000">
// <a href="#" name="rotatelink" id="rotatelink"><img src="rotator/1.jpg" width="734" height="174" id="rotateimg" name="rotateimg" border="0"></a>

var fadeDuration = 3; // time it takes to fade between Images
var Img = new Array();
var Lnk = new Array();
var LnkTargt = new Array();
var ShwTime = new Array();
var preLoad = new Array();
var useLinks = false; // set to false if you do not use href
var x = -1; // This is the number used for the array


// set all the Images, links, targets, and speed
// To add Images, copy a section place it where you want it
x++;
Img[x] 		= 'Images/rotator/web.jpg';
Lnk[x] 		= '#';
LnkTargt[x] = '_self';
ShwTime[x] 	= 12000;

x++;
Img[x] 		= 'Images/rotator/comunicazione.jpg';
Lnk[x] 		= '#';
LnkTargt[x] = '_blank';
ShwTime[x] 	= 12000;

x++;
Img[x] 		= 'Images/rotator/grafica.jpg';
Lnk[x] 		= '#';
LnkTargt[x] = '_blank';
ShwTime[x] 	= 12000;

x++;
Img[x] 		= 'Images/rotator/musica.jpg';
Lnk[x] 		= '#';
LnkTargt[x] = '_blank';
ShwTime[x] 	= 12000;

x++;
Img[x] 		= 'Images/rotator/ilteam.jpg';
Lnk[x] 		= '#';
LnkTargt[x] = '_blank';
ShwTime[x] 	= 12000;

var t;
var j = 0;
var p = Img.length;

for (i = 0; i < p; i++)
{
   preLoad[i] = new Image();
   preLoad[i].src = Img[i];
}

function runRotator()
{

	if (document.all)
	{
		document.Images.rotateimg.style.filter="blendTrans(duration=fadeDuration)";
		document.Images.rotateimg.filters.blendTrans.Apply();
		document.Images.rotateimg.filters.blendTrans.Play();
	}

	document.images.rotateimg.src = Img[j];
	if (useLinks==true)
	{
		document.getElementById("rotatelink").href = Lnk[j];
		document.getElementById("rotatelink").target = LnkTargt[j];
	}

	j = j + 1;
	if (j > (p-1))
	{
	  j=0;
	}
	t = setTimeout('runRotator()',ShwTime[j]);

}