var customerLogos	= new Array();

var currentImageIndex	= -1;



function LoadImageToArray(array, fileName)

{

	// Load one image into an array.

	array[array.length]		= new Image();

	array[array.length - 1].src	= fileName;

}



function PreloadLogoImages()

{

	// Load all the images into the customerLogos array.

	LoadImageToArray(customerLogos, "/Images/Customers/yahoo.gif");
	
	LoadImageToArray(customerLogos, "/Images/Customers/orange.gif");
		
	LoadImageToArray(customerLogos, "/Images/Customers/Sensis2.gif");
	
	LoadImageToArray(customerLogos, "/Images/Customers/vodafone.jpg");
	
	LoadImageToArray(customerLogos, "/Images/Customers/palm.gif");

	LoadImageToArray(customerLogos, "/Images/Customers/toyota.gif");
	
	LoadImageToArray(customerLogos, "/Images/Customers/groeneveld.gif");
	
	LoadImageToArray(customerLogos, "/Images/Customers/sidewinder.gif");	

	LoadImageToArray(customerLogos, "/Images/Customers/acunia.gif");

//	LoadImageToArray(customerLogos, "/Images/Customers/bell.gif");

	LoadImageToArray(customerLogos, "/Images/Customers/cobra.gif");

	LoadImageToArray(customerLogos, "/Images/Customers/delphi.gif");

//	LoadImageToArray(customerLogos, "/Images/Customers/grizzli.gif");

	LoadImageToArray(customerLogos, "/Images/Customers/intelematics.gif");

	LoadImageToArray(customerLogos, "/Images/Customers/mecel.gif");

//	LoadImageToArray(customerLogos, "/Images/Customers/o2.gif");

//	LoadImageToArray(customerLogos, "/Images/Customers/tim.gif");

//	LoadImageToArray(customerLogos, "/Images/Customers/VirtualComputer.gif");

}



function RotateLogoImages()

{

	// Calculate the current image index.

	currentImageIndex++;

	if(currentImageIndex >= customerLogos.length)

	{

		currentImageIndex = 0;

	}



	// Swap the images.

	document.RotatingLogo.src = customerLogos[currentImageIndex].src;

	

	// Call this function recursively every 2000 milliseconds.

	setTimeout("RotateLogoImages();", 1500);

}



// Load all the images right now.

PreloadLogoImages();



// Start rotating the images when the page loads.

window.onload = RotateLogoImages;