// JavaScript Document
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 10000

// Duration of crossfade (seconds)
var crossFadeDuration = 2
<!--
var ads = new Array(
	'ads/honey01.gif',
	'ads/palmgrove01.gif',
	'ads/honey01.gif',
	'ads/lakepalace01.gif',
	'ads/pagoda01.gif'
    )

var ads0 = new Array(
	'ads/honey01s.gif',
	'ads/palmgrove01S.gif',
	'ads/honey01s.gif',
	'ads/lakepalace01s.gif',
	'ads/pagoda01s.gif'
	
    )

var linkx = new Array(
     'offers/honeymoon-in-kerala-backwaters.asp',
	'alleppey-resorts/lake-resorts/palmgrove-lake-resort/',
	 'offers/honeymoon-in-kerala-backwaters.asp',
	'alleppey-resorts/backwater-resort/lake-palace-resort/',
	'alleppey-resorts/lake-resorts/kayaloram-lake-resort/'
	);

var old1 = 0;
var current1 = 0;
var t =0

var j = 0

var p = ads.length

/*var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = ads[i]
   }
*/
function adinit()
{
	if (screen.height >= 768 && screen.width >= 1024) {
//document.write();
if (document.images)
	{
		newad();
		 if (document.all){
      document.images.ad.style.filter="blendTrans(duration=2)"
      document.images.ad.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.ad.filters.blendTrans.Apply()      
   }
		document.images['ad'].src = ads[current1];
		
	//	 document.images.ad.src = preLoad[current1].src
   if (document.all){
      document.images.ad.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
  // t = setTimeout('runSlideShow()', slideShowSpeed)
		setTimeout('adinit()',10000);
	}
	
}
else {
if (screen.height == 600 && screen.width == 800) {
if (document.images)
	{
		newad();
		 if (document.all){
      document.images.ad.style.filter="blendTrans(duration=2)"
      document.images.ad.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.ad.filters.blendTrans.Apply()      
   }
		document.images['ad'].src = ads0[current1];
		  if (document.all){
      document.images.ad.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
  // t = setTimeout('runSlideShow()', slideShowSpeed)
		setTimeout('adinit()',10000);
	}
	
}
else {
if (document.images)
	{
		newad();
		document.images['ad'].src = ads0[current1];
		setTimeout('adinit()',10000);
	}
   }
}


}

function newad()
{
	current1 = Math.floor(Math.random()*ads.length);
	while (current1 == old1)
	{
		current1 = Math.floor(Math.random()*ads.length);
	}
	old1 = current1; 
}

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
   document.images.SlideShow.src = ads[j]
   
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function sendlink()
{
	//window.open(linkx[current1],'Ad','800,600,toolbar=1,resizable=1') 

location.href = linkx[current1];
}

// -->

