/* javascript */

 var index = 0;

 /* preload all images */

  image1 = new Image(547,410);
  image1.src = "images/tonyandwyatt.jpg";
  image2 = new Image(547,410);
  image2.src = "images/ricebrothers.jpg";
  image3 = new Image(307,410);
  image3.src = "images/tony.jpg";
  image4 = new Image(270,410);
  image4.src = "images/tony1a.jpg";
  image5 = new Image(547,410);
  image5.src = "images/sq1.jpg";
  image6 = new Image(402,410);
  image6.src = "images/sq2.jpg";
  image7 = new Image(547,410);
  image7.src = "images/sq3.jpg";
  image8 = new Image(379,410);
  image8.src = "images/sq4.jpg";
  image9 = new Image(547,410);
  image9.src = "images/sq5.jpg";
  image10 = new Image(453,410);
  image10.src = "images/sq6.jpg";
  image11 = new Image(416,410);
  image11.src = "images/sq7.jpg";
  image12 = new Image(439,410);
  image12.src = "images/sq8.jpg";
  image13 = new Image(307,410);
  image13.src = "images/sq9.jpg";
  image14 = new Image(307,410);
  image14.src = "images/woody_gtr.jpg";
  image15 = new Image(700,370);
  image15.src = "images/hd_flt.jpg"; 
  image16 = new Image(700,350);
  image16.src = "images/d2h_flt.jpg";
  image17 = new Image(275,400);
  image17.src = "images/d2h_hd.jpg";
  image18 = new Image(533,400);
  image18.src = "images/collings_wkshp/clinicgroup.jpg";
  image19 = new Image(533,400);
  image19.src = "images/collings_wkshp/toby_kenny.jpg";
  image20 = new Image(533,400);
  image20.src = "images/collings_wkshp/kenny_d1.jpg";
  image21 = new Image(533,400);
  image21.src = "images/collings_wkshp/kenny_ds2h.jpg";
  image22 = new Image(533,400);
  image22.src = "images/collings_wkshp/kenny_0m2h.jpg";
  image23 = new Image(533,400);
  image23.src = "images/collings_wkshp/jam.jpg";
  image24 = new Image(533,400);
  image24.src = "images/collings_wkshp/shop_talk.jpg";

 picarray0 = new Array(image1.src, image2.src, image3.src, image4.src); 
 
 picarray1 = new Array(image5.src, image6.src, image7.src, image8.src,
                  image9.src, image10.src, image11.src, image12.src,
                  image13.src); 
                                     
 picarray2 = new Array(image14.src, image15.src); 
   
 picarray3 = new Array(image16.src, image17.src);      
  
 picarray4 = new Array(image18.src, image19.src,
                  image20.src, image21.src,
                  image22.src, image23.src, image24.src); 
                                                           
 txtarray0 = new Array("Wyatt and Tony","Rice Brothers","Tony","Tony in Austin");                  
 txtarray1 = new Array("Pickin' on the Square","Jon's Tricky Upright Bass","Ladies Too!","Roy and James",
                  "Roy and Bill","Bill, Gerald and Mark","Bill and Woody","Steve and Monty",
                  "Jim Miller");                                    
 txtarray2 = new Array("Woody and HD-28","I985 Martin HD-28");                  
 txtarray3 = new Array("2001 Collings D2H","D2H Headstock");                         
 txtarray4 = new Array("Collings Clinic Group","Kenny Smith & Toby Crowder","Kenny with D1","Kenny with DS2H",
                  "Kenny with OM2H","Jamming with Kenny","Workshop in progress");               
 var allarray  = new Array();              
 allarray[0] = picarray0;
 allarray[1] = picarray1;
 allarray[2] = picarray2;
 allarray[3] = picarray3;
 allarray[4] = picarray4;
 
 var tallarray = new Array();
 tallarray[0] = txtarray0;
 tallarray[1] = txtarray1;
 tallarray[2] = txtarray2;
 tallarray[3] = txtarray3;
 tallarray[4] = txtarray4;

 function slindex( dir,aindx )
 { 
	 var max = allarray[aindx].length - 1;
	  
	 
	 if( dir == 1)  // go forward
	   {
		  if(index == max)
		     index = 0; // wrap index
		  else
		     index++; // else increment
	   }
	 else // must be zero, go backward
	   {
		 if(index == 0)
		 	index = max; // wrap index
		 else
		   index--;  // else decrement 
	   }
	    
  document.inline.src = allarray[aindx][index]; // update image
  textNode.data= tallarray[aindx][index];       // update text
  
}
