/* Image Fader */



var slideShowSpeedPicOne = 8000;
var crossFadeDurationPicOne = 3;

var slideShowSpeedPicTwo = 10000;
var crossFadeDurationPicTwo = 3;

var slideShowSpeedPicThree = 6000;
var crossFadeDurationPicThree = 3;

var slideShowSpeedPicFour = 11000;
var crossFadeDurationPicFour = 3;

var slideShowSpeedPicFive = 9000;
var crossFadeDurationPicFive = 3;

var slideShowSpeedPicSix = 13000;
var crossFadeDurationPicSix = 3;

var PicOne = new Array() 
PicOne[0] = 'images/homepage/fade_weathervanes1.jpg';
PicOne[1] = 'images/homepage/fade_weathervanes2.jpg';

var PicTwo = new Array() 
PicTwo[0] = 'images/homepage/fade_benches1.jpg';
PicTwo[1] = 'images/homepage/fade_benches2.jpg';

var PicThree = new Array() 
PicThree[0] = 'images/homepage/fade_gazebo1.jpg';
PicThree[1] = 'images/homepage/fade_gazebo2.jpg';

var PicFour = new Array() 
PicFour[0] = 'images/homepage/fade_arch1.jpg';
PicFour[1] = 'images/homepage/fade_arch2.jpg';

var PicFive = new Array() 
PicFive[0] = 'images/homepage/fade_stove1.jpg';
PicFive[1] = 'images/homepage/fade_stove2.jpg';

var PicSix = new Array() 
PicSix[0] = 'images/homepage/fade_lighthouse1.jpg';
PicSix[1] = 'images/homepage/fade_lighthouse2.jpg';

var tOne;
var tTwo;
var tThree;
var tFour;
var tFive;
var tSix;

var jOne = 0;
var jTwo = 0;
var jThree = 0;
var jFour = 0;
var jFive = 0;
var jSix = 0;

var pOne = PicOne.length;
var pTwo = PicTwo.length;
var pThree = PicThree.length;
var pFour = PicFour.length;
var pFive = PicFive.length;
var pSix = PicSix.length;

var preLoadOne = new Array()
for (i = 0; i < pOne; i++){
   preLoadOne[i] = new Image();
   preLoadOne[i].src = PicOne[i];

}

var preLoadTwo = new Array()
for (i = 0; i < pTwo; i++){
   preLoadTwo[i] = new Image();
   preLoadTwo[i].src = PicTwo[i];

}

var preLoadThree = new Array()
for (i = 0; i < pThree; i++){
   preLoadThree[i] = new Image();
   preLoadThree[i].src = PicThree[i];

}

var preLoadFour = new Array()
for (i = 0; i < pFour; i++){
   preLoadFour[i] = new Image();
   preLoadFour[i].src = PicFour[i];

}

var preLoadFive = new Array()
for (i = 0; i < pFive; i++){
   preLoadFive[i] = new Image();
   preLoadFive[i].src = PicFive[i];

}

var preLoadSix = new Array()
for (i = 0; i < pSix; i++){
   preLoadSix[i] = new Image();
   preLoadSix[i].src = PicSix[i];

}


function initiateFades()
{
	runSlideShowOne();
	runSlideShowTwo();
	runSlideShowThree();
	runSlideShowFour();
	runSlideShowFive();
	runSlideShowSix();
}


function runSlideShowOne(){

   if (document.all){
      document.images.picOne.style.filter="blendTrans(duration=2)"
      document.images.picOne.style.filter="blendTrans(duration=crossFadeDurationPicOne)"
      document.images.picOne.filters.blendTrans.Apply()      
   }
   
   document.images.picOne.src = preLoadOne[jOne].src;
       
   if (document.all){
      document.images.picOne.filters.blendTrans.Play()
   }
   jOne = jOne + 1
   if (jOne > (pOne-1)) jOne=0
   tOne = setTimeout('runSlideShowOne()', slideShowSpeedPicOne)
   
}

function runSlideShowTwo(){
   if (document.all){
      document.images.picTwo.style.filter="blendTrans(duration=2)"
      document.images.picTwo.style.filter="blendTrans(duration=crossFadeDurationPicTwo)"
      document.images.picTwo.filters.blendTrans.Apply()      
   }
   
   document.images.picTwo.src = preLoadTwo[jTwo].src;
       
   if (document.all){
      document.images.picTwo.filters.blendTrans.Play()
   }
   jTwo = jTwo + 1
   if (jTwo > (pTwo-1)) jTwo=0
   tTwo = setTimeout('runSlideShowTwo()', slideShowSpeedPicTwo)
   
}

function runSlideShowThree(){
   if (document.all){
      document.images.picThree.style.filter="blendTrans(duration=2)"
      document.images.picThree.style.filter="blendTrans(duration=crossFadeDurationPicThree)"
      document.images.picThree.filters.blendTrans.Apply()      
   }
   
   document.images.picThree.src = preLoadThree[jThree].src;
       
   if (document.all){
      document.images.picThree.filters.blendTrans.Play()
   }
   jThree = jThree + 1
   if (jThree > (pThree-1)) jThree=0
   tThree = setTimeout('runSlideShowThree()', slideShowSpeedPicThree)
   
}

function runSlideShowFour(){
   if (document.all){
      document.images.picFour.style.filter="blendTrans(duration=2)"
      document.images.picFour.style.filter="blendTrans(duration=crossFadeDurationPicFour)"
      document.images.picFour.filters.blendTrans.Apply()      
   }
   
   document.images.picFour.src = preLoadFour[jFour].src;
       
   if (document.all){
      document.images.picFour.filters.blendTrans.Play()
   }
   jFour = jFour + 1
   if (jFour > (pFour-1)) jFour=0
   tFour = setTimeout('runSlideShowFour()', slideShowSpeedPicFour)
   
}

function runSlideShowFive(){
   if (document.all){
      document.images.picFive.style.filter="blendTrans(duration=2)"
      document.images.picFive.style.filter="blendTrans(duration=crossFadeDurationPicFive)"
      document.images.picFive.filters.blendTrans.Apply()      
   }
   
   document.images.picFive.src = preLoadFive[jFive].src;
       
   if (document.all){
      document.images.picFive.filters.blendTrans.Play()
   }
   jFive = jFive + 1
   if (jFive > (pFive-1)) jFive=0
   tFive = setTimeout('runSlideShowFive()', slideShowSpeedPicFive)
   
}
function runSlideShowSix(){
   if (document.all){
      document.images.picSix.style.filter="blendTrans(duration=2)"
      document.images.picSix.style.filter="blendTrans(duration=crossFadeDurationPicSix)"
      document.images.picSix.filters.blendTrans.Apply()      
   }
   
   document.images.picSix.src = preLoadSix[jSix].src;
       
   if (document.all){
      document.images.picSix.filters.blendTrans.Play()
   }
   jSix = jSix + 1
   if (jSix > (pSix-1)) jSix=0
   tSix = setTimeout('runSlideShowSix()', slideShowSpeedPicSix)
   
}

