// JavaScript Document

// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;

// Duration of crossfade (seconds)
// Turn off crossfade - doesn't work if images are different sizes
var crossFadeDuration = 0;

var t;
var j = 0;
var k = 0;	// Ensures that no image changes on the first call of runSlideShow
var p = Pic.length;
var z = 0;

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
   
}

function runSlideShow() {
   if (j > (p-1)) j=0;
   if (k == 1) {
	   if (document.all){
		  //document.images.SlideShow1.style.filter="blendTrans(duration=2)"
		  //document.images.SlideShow1.style.filter="blendTrans(duration=crossFadeDuration)"
		  //document.images.SlideShow1.filters.blendTrans.Apply()      
	   }
	   set_image(j);
	   if (document.all){
		  //document.images.SlideShow1.filters.blendTrans.Play()
	   }
   } else k++;

   j ++;
   t = setTimeout('runSlideShow()', slideShowSpeed);
}

function over_button(iImg) {
	if (document.images) {
		set_image(iImg);
		t = clearTimeout(t);
		t = setTimeout('runSlideShow()', slideShowSpeed * 2);	// Delay slideshow update
	}
}
function set_image(iImg) {
	if (document.images) {
		document.getElementById("thumb" + z).className = 'iBorder';
		document.getElementById("thumb" + iImg).className = 'iBorder3';
		document.getElementById("SlideShowTxt1").innerHTML = Txt[iImg];
		var sStr = new String(Txt[iImg]);
		var index1 = sStr.indexOf("Ausmos");
		if (index1 == -1) {
			document.getElementById("SlideShowTxtTd").style.backgroundImage = 'url(../Images/Blank.gif)';
		} else {
			document.getElementById("SlideShowTxtTd").style.backgroundImage = 'url(../Images/Ausmos_sm.gif)';
		}
		//alert(Txt[iImg] + sStr.indexOf("Ausmos"));
		document.images.SlideShow1.src = preLoad[iImg].src;
		z = iImg;
	}
}

runSlideShow();
