var imgs = new Array(); var imgcnt = 0; var thisimg = 0;
imgs[imgcnt++] = 'images\/rotator\/training.gif';
imgs[imgcnt++] = 'images\/rotator\/recruitment.gif';
imgs[imgcnt++] = 'images\/rotator\/hr.gif';

/*
// Straight forward swap image - does not require additional js file
function rotate() {
   if (document.images) {
      thisimg++;
      if (thisimg >= imgcnt) thisimg = 0;
      document.rollimg.src = imgs[thisimg];
      setTimeout("rotate();",5000);
   }
}
setTimeout("rotate();",10000); 
*/

// Fade and swap images - requires crossfade.js file
function rotate() {
	if (document.images) {
		thisimg++;
		if (thisimg >= imgcnt) thisimg = 0;
		crossfade(document.getElementById('rollimg'), imgs[thisimg], '2');
/*****************************************************************************
 Usage
*******
crossfade(document.getElementById('Image object name'), 'New SRC', 'Duration', 'New ALT text');
The crossfade function takes four arguments: 

Image object 
A reference to the image you want to change. 
New SRC 
A string that specifies the src of the new image (which must be the same size as the original). 
Duration 
A string that specifies the total length of the transition, an integer in seconds. 
New ALT text 
An optional string that specifies the alt text of the new image; if this is not included then the alt text will stay the same. 
*****************************************************************************/
		setTimeout("rotate();",10000);
	}
}
setTimeout("rotate();",10000);
