

<!--
/* define image width and height */

var pic_width=271;
var pic_height=140;

/* define the length of time to stay on each image */ 
/* 1000 = 1 second */

var delay=4000;

/* define image urls */

if (document.images)
 {
     pic1= new Image(pic_width,pic_height);
     pic1.src="http://www.armedandreadyalarms.com/images/swap/p4.gif";  
     pic2= new Image(pic_width,pic_height);
     pic2.src="http://www.armedandreadyalarms.com/images/swap/p2.gif";  
     pic3= new Image(pic_width,pic_height);
     pic3.src="http://www.armedandreadyalarms.com/images/swap/p1.gif";  
     pic4= new Image(pic_width,pic_height);
     pic4.src="http://www.armedandreadyalarms.com/images/swap/p3.gif";  
 }    

var pics= new Array(4) 
   pics[0]=pic1.src;
   pics[1]=pic2.src;
   pics[2]=pic3.src;
   pics[3]=pic4.src;

var numpics=4;
var thenum=0;
imgName="img1";

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);  
   }
}

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);
 }
//-->

