if (document.images) {
	
	img1on = new Image();           // The onmouseover image
	img1on.src = "images/10.gif";  
	img2on = new Image();
	img2on.src = "images/20.gif";  
	img3on = new Image();
	img3on.src = "images/30.gif";
	img1off = new Image();          // The normally seen image
	img1off.src = "images/1.gif"; 
	img2off = new Image();
	img2off.src = "images/2.gif"; 
	img3off = new Image();
	img3off.src = "images/3.gif";
	}				  
	//This function changes the image when over.
    function imgOn(imgName) {
            if (document.images) {
            document[imgName].src = eval(imgName + "on.src");
            }
    }				   //This function changes the image back when off.
    function imgOff(imgName) {
            if (document.images) {
            document[imgName].src = eval(imgName + "off.src");        
            }
    }


// set the following variables

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 1

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/bath1.jpg'
Pic[1] = 'images/bed2.jpg'
Pic[2] = 'images/bed4.jpg'
Pic[3] = 'images/bed5.jpg'

// =======================================
// do not edit anything below this line
// =======================================

var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
