// JScript source code
// The list of images to display in the supporters slideshow
//creating a array of the image object
var imageBusiness=new Array(
"images/Business/0290.jpg",
"images/Business/KerrSmith.jpg")
          
//variable that will increment through the images
var initialB = true;

// set the delay between images
var timeDelayB;

// number of last image ... used to ensure we don't get
// the same image twice in a row
var numB = -1;
 
//preload the images in the cache so that the images load faster
//create new instance of images in memory 
var imagePreloadB = new Array()
for (i=0;i<imageSupporters.length;i++)
{
   	imagePreloadB [i]=new Image()
	// set the src attribute
	imagePreloadB [i].src=imageBusiness[i]
}

// Find the next image by random - and ensure it is not the 
// same as the one previously selected.
function nextImageB()
{
	var newNum = num;
	while (newNum == num)
	{
		newNum = Math.floor(Math.random()*2);
	}
	num = newNum;
	return imageBusiness[num];
}



	
//for automatic Slideshow of the Images
function slideshowBusiness_automatic(pathToRoot)
{ 
	// Is this the first time? setthe first image some more time.
	if (initialB )
	{	
		initialB = false;	
		timeDelayB=setTimeout("slideshowBusiness_automatic('" + pathToRoot + "')", 4000) 
	}
    else
    {
    	if (document.images.business.filters)
    	{
    		document.images.business.filters.item(0).Apply();
     		document.images.business.filters.item(0).Play();
     	}
     	
       	//sets the timer value to 4 seconds,we can create a timing loop by using the setTimeout method
       	timeDelayB=setTimeout("slideshowBusiness_automatic('" + pathToRoot + "')", 8000) 
       	document.images.business.src= pathToRoot + nextImageB();  
     }
}