//  browser sniffer
var IE4 = (document.all && !document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var N6 = (document.getElementById && !document.all) ? true : false;

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = [ 
'/images/logos/ap.gif',
'/images/logos/ariba.gif',
'/images/logos/ask.gif',
'/images/logos/bostoncom.gif',
'/images/logos/easyask.gif',
'/images/logos/ebsco.gif',
'/images/logos/factiva.gif',
'/images/logos/fast.gif',
'/images/logos/logo_forbes.gif',
'/images/logos/hp.gif',
'/images/logos/infospace.gif',
'/images/logos/mit.gif',
'/images/logos/nytimes.gif',
'/images/logos/reed-business.gif',
'/images/logos/sonycomp.gif',
'/images/logos/worldbank.gif', 
'/images/logos/yahoo.gif' ];


// ***************************************
// Index image timer function start
// ***************************************
var t
var p = Pic.length
var sld = 0
var time = 0

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}
var slideShowSpeed1 = 2000

function runSlideShow(){
   var p = Pic.length
   sld = sld + 1
   if (sld > (p-1)) sld=0
   var last = sld-1;
   if (sld==0) last=p-1;
	
   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[sld].src

   // Only for IE & NS6+
   if (!NS4) {
		// Only for IE
		if (document.all){
			document.images.SlideShow.filters.blendTrans.Play()
		}
	} 
	t = setTimeout('runSlideShow()', slideShowSpeed1)
}

// Image swap
function swap(pos){
	eval('document.images.SlideShow.src = Pic['+pos+']')
	sld = pos
	// put something here to reset the setTimeout timer
	clearTimeout(t);
    t = setTimeout('runSlideShow()', slideShowSpeed1);
	}
      
function nextSlide(){
	var nx = sld + 1;
	if (nx >= Pic.length) nx = 0
	swap(nx);
}

function startSlideShow(){t = setTimeout('runSlideShow()', slideShowSpeed1)}


// ***************************************
// Index image timer function end
// ***************************************
