<!-- hide this script from non-javascript-enabled browsers
/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2001-3 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

function initImgRotation() {
  // create rotating image objects here 
  // arguments: image name, rotation speed
  var rotator1 = new rotateImgObj('imgRotor',5000);
  // add the images to rotate into that image object  
  rotator1.addImages(aryImg);
  rotator1.rotate();
  rotateImgObj.start();
}

// If all the images you wish to display are in the same location, you can specify the path here 
rotateImgObj.imagesPath = "http://www.roobyte.com.au/SDFC/images/sdfc/";

// no need to edit code below 
/////////////////////////////////////////////////////////////////////
rotateImgObjs = []; // holds all rotating image objects defined
// constructor 
function rotateImgObj(nm,s) {
  this.speed=s; this.ctr=0; this.timer=0;  
  this.imgObj = document.images[nm]; // get reference to the image object
  this.index = rotateImgObjs.length; rotateImgObjs[this.index] = this;
  this.animString = "rotateImgObjs[" + this.index + "]";
}

rotateImgObj.prototype = {
  addImages: function() { // preloads images
    this.imgObj.imgs = [];
		var aryI = arguments[0];
    for (var i=0; i<aryI.length; i++) {
      this.imgObj.imgs[i] = new Image();
      this.imgObj.imgs[i].src = rotateImgObj.imagesPath + aryI[i];
    }
  },

  rotate: function() {
		try { 
			this.imgObj.style.filter="progid:DXImageTransform.Microsoft.Wheel((duration=3, spokes=10)";
			this.imgObj.filters[0].Apply();
			this.imgObj.filters[0].Play();
		} 
		catch(er) {
		} 
    if (this.ctr < this.imgObj.imgs.length-1) this.ctr++;
    else this.ctr = 0;
    this.imgObj.src = this.imgObj.imgs[this.ctr].src;
  }
}

// sets up rotation for all defined rotateImgObjs
rotateImgObj.start = function() {
  for (var i=0; i<rotateImgObjs.length; i++) 
    rotateImgObjs[i].timer = setInterval(rotateImgObjs[i].animString + ".rotate()", rotateImgObjs[i].speed);                     
}

//-->