/******************************************************************************
* timer.js                                                             *
*                                                                             *
* Copyright 2002 by Stayfinder.                                               *
* Web address: http://www.stayfinder.com                                      *
* Last update: August 02, 2002.                                                 *
*                                                                             *
* The functions used for image Rotation in stayfinder home page.              *
******************************************************************************/

//*****************************************************************************
// Define the functions used for Rotation                                     *
//*****************************************************************************


var slideShowSpeeda = 2500
var slideShowSpeedb = 2500
var crossFadeDuration = 3
var Pica = new Array()
var Picb = new Array() 

Pica[0] = 'images/home/showcase/timer_india.gif'
Pica[1] = 'images/home/showcase/timer_hawaii.gif'
Pica[2] = 'images/home/showcase/timer_mauritius.gif'
Pica[3] = 'images/home/showcase/timer_dubai.gif'
Pica[4] = 'images/home/showcase/timer_australia.gif'
Pica[5] = 'images/home/showcase/timer_maldives.gif'


Picb[0] = 'images/home/showcase/timer_singapore.gif'
Picb[1] = 'images/home/showcase/timer_southafrica.gif'
Picb[2] = 'images/home/showcase/timer_thailand.gif'
Picb[3] = 'images/home/showcase/timer_seychelles.gif'
Picb[4] = 'images/home/showcase/timer_malaysia.gif'
Picb[5] = 'images/home/showcase/timer_kenya.gif'


var ta
var tb
var ja = 0
var jb = 0
var pa = Pica.length
var pb = Picb.length

var preLoada = new Array()
for (ia = 0; ia < pa; ia++){
   preLoada[ia] = new Image()
   preLoada[ia].src = Pica[ia]
}

var preLoadb = new Array()
for (ib = 0; ib < pb; ib++){
   preLoadb[ib] = new Image()
   preLoadb[ib].src = Picb[ib]
}

function runSlideShowa(){
   
   document.images.SlideShowa.src = preLoada[ja].src
   
   
   ja = ja + 1
   if (ja > (pa-1)) ja=0
  // ta = setTimeout('runSlideShowa()', slideShowSpeeda)
  setTimeout('runSlideShowa()', slideShowSpeeda)
}

function runSlideShowb(){
   
   document.images.SlideShowb.src = preLoadb[jb].src
   
   
   jb = jb + 1
   if (jb > (pb-1)) jb=0
   //tb = setTimeout('runSlideShowb()', slideShowSpeedb)
   setTimeout('runSlideShowb()', slideShowSpeedb)
}

function findSrca(){
   var strSrc
   strSrc = document.images.SlideShowa.src 
   
   document.timerform.sSrc.value=strSrc;
   document.timerform.submit();
}

function findSrcb(){
   var strSrc
   strSrc = document.images.SlideShowb.src 
      
   document.timerform.sSrc.value=strSrc;
   document.timerform.submit();
   
}

function runSlideShow(){
	runSlideShowa();
	runSlideShowb();
}

