
var iTransition = 0;
var iImageIndex = 0;
var standstill = 7
var crossFadeDuration = 2

var ns6=document.getElementById&&!document.all?1:0
var standstill=standstill*1000

function init() {
    if (document.all) {
        document.all.SlideShow.innerHTML = ""; 
	document.all.SlideShowText.innerHTML = "";       
    }
    if (ns6) {
        document.getElementById('SlideShow').innerHTML = "";
	document.getElementById('SlideShowText').innerHTML = "";
    }
    rotateimages();
}

function rotateimages() { 
	iTransition = randommaker();

	if (iImageIndex >= arrImage.length){
		iImageIndex = 0;
	}
	if (document.all) {
		document.all.SlideShowText.innerHTML=arrImageText[iImageIndex];
		document.all.SlideShow.style.filter="revealTrans(duration=" + crossFadeDuration + ",transition=" + iTransition + ")";
		document.all.SlideShow.filters.revealTrans.Apply();    
	    	document.all.SlideShow.innerHTML=arrImage[iImageIndex];
		document.all.SlideShow.filters.revealTrans.Play();
	}    
	if (ns6) {
	    	document.getElementById('SlideShow').innerHTML = arrImage[iImageIndex];
		document.getElementById('SlideShowText').innerHTML = arrImageText[iImageIndex];
	}
	iImageIndex = iImageIndex + 1;
	
	timerrotate=setTimeout("rotateimages()", standstill)

}

function init2() {
    if (document.all) {
        document.all.SlideShow.innerHTML = "";	     
	document.all.SlideShowText.innerHTML = "";   
    }
    if (ns6) {
        document.getElementById('SlideShow').innerHTML = "";	
	document.getElementById('SlideShowText').innerHTML = "";
    }
    rotateimages2();
}


function rotateimages2() { 
	
	if (iImageIndex >= arrImage.length){
		iImageIndex = 0;
	}
	if (document.all) {
		document.all.SlideShowText.innerHTML=arrImageText[iImageIndex];
		document.all.SlideShow.style.filter="revealTrans(duration=" + crossFadeDuration + ",transition=1)";
		document.all.SlideShow.filters.revealTrans.Apply();    
	    	document.all.SlideShow.innerHTML=arrImage[iImageIndex];
		document.all.SlideShow.filters.revealTrans.Play();
	}    
	if (ns6) {
	    	document.getElementById('SlideShow').innerHTML = arrImage[iImageIndex];
		document.getElementById('SlideShowText').innerHTML = arrImageText[iImageIndex];
	}
	iImageIndex = iImageIndex + 1;
	
	timerrotate=setTimeout("rotateimages2()", standstill)

}

function randommaker() {
var iRandom		
	iRandom = Math.floor(22*Math.random())
    return iRandom
    
}

