<!--
// Set image width
var pic_width=177;
// Set image height
var pic_height=230;
// Set delay in milliseconds
var delay=4000;
// Set number of pics to be shown
var numpics=6;

// Dont touch this
imgName="img1";
// Dont touch this
var thenum=0;

if (document.images) {
     pic1= new Image(pic_width,pic_height);
     pic1.src="images/mags_01.gif";  
     pic2= new Image(pic_width,pic_height);
     pic2.src="images/mags_02.gif";
     pic3= new Image(pic_width,pic_height);
     pic3.src="images/mags_03.gif";
     pic4= new Image(pic_width,pic_height);
     pic4.src="images/mags_04.gif";
     pic5= new Image(pic_width,pic_height);
     pic5.src="images/mags_05.gif";
     pic6= new Image(pic_width,pic_height);
     pic6.src="images/mags_06.gif";
}

// create image array (zero based)
var pics= new Array(numpics-1);

// assign images to array
pics[0]=pic1.src;
pics[1]=pic2.src;
pics[2]=pic3.src;
pics[3]=pic4.src;
pics[4]=pic5.src;
pics[5]=pic6.src;

// Call this function from within the page
function change_it() {
   if (document.images) {
      document.write("<img src='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='img1'>\n");
      setTimeout('change_it2()',delay);
   }
}

// Keeps it all rollling
function change_it2() {
	var x=0;
	thenum+=1;
	if (thenum>numpics-1){
		thenum=0;
	}
	document[imgName].src=pics[thenum];
	x+=1;
    setTimeout('change_it2()',delay);       
}

//-->