var n= 1;
var n1= 1;
var n2= 1;
var n3= 1;

timedelay = 3;  // secs between pics
if (document.all){ // need more time with fade
 timedelay += 0; // removed extra time later
}
timedelay *= 1000;

// Set the delay for the fading effect in seconds
var fadeDelay = 3;
if (document.images) {
    splash1 = new Image
	splash2 = new Image
	splash3 = new Image
	splash4 = new Image
	splash5 = new Image
	splash6 = new Image
	splash7 = new Image
	
  // for dial-up users, load the splash page non-rotating images/navigation before slideshow:
    splash1.src="images/splash-r1c1.jpg";
    splash2.src="images/splash-campers.jpg"
	splash3.src="images/splash-parents2.jpg";
    splash4.src="images/splash-staff.jpg";
	splash5.src="images/splash-home.jpg";
    splash6.src="images/splash-r2c3.jpg";
	splash7.src="images/splash-r3c3.jpg";
	
	
 // Row 1 photos to rotate:
   var imgs1 = new Array(); /* 171 */
   imgs1[0] = 'images/home_2008_171.jpg'; /* mulch */
   imgs1[1] = 'images/splash-rotate08/Friends-171.jpg';     
   imgs1[2] = 'images/splash-rotate08/girls-171.jpg';       
   imgs1[3] = 'images/splash-rotate08/Picture-035-171.jpg';  
   imgs1[4] = 'images/splash-rotate08/Pool2-171.jpg'; 
   /* extra photo stained glass could use */
   
  // Row 2:
   var imgs2 = new Array(); /* 299 */
   imgs2[0] = 'images/home_2008_299.jpg'; /* boys-299 */
   imgs2[1] = 'images/splash-rotate08/Boys_Girls-299.jpg';     
   imgs2[2] = 'images/splash-rotate08/masks-299.jpg';       
   imgs2[3] = 'images/splash-rotate08/Pool-299.jpg';      
   imgs2[4] = 'images/splash-rotate08/Youngins-299.jpg';   
   
   // Row 3:
   var imgs3 = new Array(); /* 271 */
   imgs3[0] = 'images/home_2008_271.jpg'; /* girls-271 */
   imgs3[1] = 'images/splash-rotate08/Biking-271.jpg';     
   imgs3[2] = 'images/splash-rotate08/boys-271.jpg';       
   imgs3[3] = 'images/splash-rotate08/youngins-271.jpg';  
   imgs3[4] = 'images/splash-rotate08/2007-271w.jpg';  
   // want main photo to reappear with other main photos.
   
    // Row 4:
   var imgs4 = new Array(); /* 285 */
   imgs4[0] = 'images/home_2008_285.jpg'; /* 2007 rock climing */
   imgs4[1] = 'images/splash-rotate08/Boat-285.jpg';     
   imgs4[2] = 'images/splash-rotate08/Picture-030-285.jpg';       
   imgs4[3] = 'images/splash-rotate08/Yarn-285.jpg';  
   imgs4[4] = 'images/splash-rotate08/Picture-034-285.jpg';  
   // want main photo to reappear with other main photos.
   
   //Pre-load the secondary images for sake of dial-up folks:
   var imageLoader = new Array(); 
   for (i = 1; i < 5; i++){
	imageLoader[i] = new Image();
	imageLoader[i].src = imgs1[i];
}
   for (i = 1; i < 5; i++){
	imageLoader[i].src = imgs2[i];
}
   for (i = 1; i < 4; i++){
	imageLoader[i].src = imgs3[i];
}
   for (i = 1; i < 4; i++){
	imageLoader[i].src = imgs4[i];
}
   
   function rotateAll() {
	if (document.all){
     document.images.SlideShow.style.filter="blendTrans(duration=fadeDelay)";
     document.images.SlideShow.filters.blendTrans.Apply();
	 document.images.SlideShow1.style.filter="blendTrans(duration=fadeDelay)";
     document.images.SlideShow1.filters.blendTrans.Apply();
	 document.images.SlideShow2.style.filter="blendTrans(duration=fadeDelay)";
     document.images.SlideShow2.filters.blendTrans.Apply();
	 document.images.SlideShow3.style.filter="blendTrans(duration=fadeDelay)";
     document.images.SlideShow3.filters.blendTrans.Apply();
	}
   document.images.SlideShow.src =  imgs1[n];
   document.images.SlideShow1.src = imgs2[n1];
   document.images.SlideShow2.src = imgs3[n2];
   document.images.SlideShow3.src = imgs4[n3];
   if (document.all) {
	   document.images.SlideShow.filters.blendTrans.Play();
	   document.images.SlideShow1.filters.blendTrans.Play();
	   document.images.SlideShow2.filters.blendTrans.Play();
	   document.images.SlideShow3.filters.blendTrans.Play();
	}
    (n  == (imgs1.length - 1)) ? n = 0 : n++;
    (n1 == (imgs2.length - 1)) ? n1 = 0 : n1++;
	(n2 == (imgs3.length - 1)) ? n2 = 0 : n2++;
	(n3 == (imgs4.length - 1)) ? n3 = 0 : n3++;
	
    window.setTimeout("rotateAll()", timedelay);   
   }  
   //window.onload = rotateAll;  
  }
  
