

var current = new Array();
var img = new Array();
var imgwidth = 130;
img['img1'] = new Array();
img['img2'] = new Array();
img['img3'] = new Array();
//compliants
img['img1'][1] = new Image();
img['img1'][1].src = "images/comp/myob.gif";
//accredited
img['img2'][1] = new Image();
img['img2'][2] = new Image();
img['img2'][3] = new Image();
img['img2'][4] = new Image();
img['img2'][5] = new Image();
img['img2'][6] = new Image();
img['img2'][7] = new Image();
img['img2'][8] = new Image();
img['img2'][9] = new Image();
img['img2'][1].src = "images/accred/aicm.gif";
img['img2'][2].src = "images/accred/aim.gif";
img['img2'][3].src = "images/accred/fpa.gif";
img['img2'][3].width = imgwidth;
img['img2'][4].src = "images/accred/iia.gif";
img['img2'][4].width = imgwidth;
img['img2'][5].src = "images/accred/nia.gif";
img['img2'][6].src = "images/accred/unisq.gif";
img['img2'][6].width = imgwidth;
img['img2'][7].src = "images/accred/unisyd.gif";
img['img2'][8].src = "images/accred/unitech.gif";
img['img2'][8].width = imgwidth;
img['img2'][9].src = "images/accred/unsw.gif";
img['img2'][9].width = imgwidth;
//awarded
img['img3'][1] = new Image();
img['img3'][1].src = "images/awards/nia.gif";

//count arrays
var length = new Array();
length['img1'] = img['img1'].length;
length['img2'] = img['img2'].length;
length['img3'] = img['img3'].length;
current['img1'] = 0;
current['img2'] = 0;
current['img3'] = 0;
function swapPicture(num)
{

  if (document.images)
  {
    var nextImage=current[num]+1;
    if (nextImage>=length[num])
      nextImage=1;

      var target=0;
	  var atarget=0;

      if (document.getElementById(num)){
        target=document.getElementById(num);
		
	  }
      // make sure target is valid.  It might not be valid
      //   if the page has not finished loading
      if (target)
      {
        target.src=img[num][nextImage].src;
		if(img[num][nextImage].width){
			target.width=img[num][nextImage].width;
		}
        current[num]=nextImage;
		
      }
 
      setTimeout("swapPicture('" + num + "')", 10000);
 

  }
}

setTimeout("swapPicture('img1')", 22000);
setTimeout("swapPicture('img2')", 23000);
setTimeout("swapPicture('img3')", 24000);


