var DHTML = (document.getElementById || document.all || document.layers); 
if (!DHTML) 
	{ 
		alert('Your browser is not capable of displaying DHTML'); 
	} 

function getObj(name) 
	{ 
		if (document.getElementById) 
			{ 
				this.obj = document.getElementById(name); 
				this.style = document.getElementById(name).style; 
			} 
		else
		if (document.all) 
			{ 
				this.obj = document.all[name]; 
				this.style = document.all[name].style; 
			} 
		else 
		if (document.layers) 
			{ 
				this.obj = document.layers[name]; 
				this.style = document.layers[name]; 
			} 
	} 

function visib(objName, flag) 
	{ // triggers layer visibility 
		x = new getObj(objName); 
		x.style.display = (flag) ? 'block' : 'none'; 
	} 
	slides = new Array( // The id's of the slides 
	'slide0', 
	'slide1', 
	'slide2',
	'slide3',
	'slide4',
	'slide5',
	'slide6',
	'slide7',
	'slide8',
	'slide9',
	'slide10',
	'slide11',
	'slide12',
	'slide13',
	'slide14',
	'slide15',
	'slide16',
	'slide17',
	'slide18',
	'slide19',
	'slide20',
	'slide21',
	'slide22',
	'slide23',
	'slide24',
	'slide25',
	'slide26'

	); 


var curImg = 0; // index of the array entry 
var lastImg = 0; 
function changeSlide ( change ) 
	{ 
		if (!DHTML) return; 
			curImg += change; 
		if ( curImg < 0 ) curImg = slides.length-1; 
		else 
		if ( curImg >= slides.length ) curImg = 0; 
			visib(slides[lastImg], false); 
			visib(slides[curImg], true); 
			lastImg = curImg; 
	} 
//--------------------Fading----------------------//
var timer
var bTranState = 0;
function fnForward() {
	if (document.all)   		
		{
   			oTransContainer.filters[0].Apply();
   			oTransContainer.filters.item(0).motion ='forward'
   			bTranState = 1;
			oTransContainer.filters[0].Play();
		}
		changeSlide(1);
}

function fnForward2() {
	if (document.all)   		
		{
   			oTransContainer.filters[0].Apply();
   			oTransContainer.filters.item(0).motion ='forward'
    		bTranState = 1;
			oTransContainer.filters[0].Play();
		}	
		changeSlide(1);
		timer = setTimeout('PlayIt()', 8000);
   		clearInterval(mySlideShow)
}

function fnBackward() {
   		if (document.all)   		
		{
   			oTransContainer.filters[0].Apply();
    		oTransContainer.filters.item(0).motion ='reverse'
    		bTranState = 1;
			oTransContainer.filters[0].Play();
		}	
		changeSlide(-1);
}


function fnBackward2() {
   		if (document.all)   		
		{
   			oTransContainer.filters[0].Apply();
    		oTransContainer.filters.item(0).motion ='reverse'
    		bTranState = 1;
			oTransContainer.filters[0].Play();
		}	
		changeSlide(-1);
		timer = setTimeout('PlayIt()', 8000);
   		clearInterval(mySlideShow)
}

function PlayIt()
{
	mySlideShow = setInterval('fnForward()', 6000)
}

