var currentindex=1;
var stopswitch=0;

function changeslides(which){
	var imghtml=""
	var text=""
	currentindex=which
	var which=numberslide[which]
	imghtml='<a href="'+which[1]+'"><img src="'+which[0]+'" width="292" height="242" border="0" alt="'+which[2]+'" /></a>';
	text='<span class="featured_text_title">'+which[2]+'</span><br />'+which[3]
	document.getElementById("featured_image").innerHTML=imghtml
	document.getElementById("featured_text").innerHTML=text

}
 
function goforward(){
	currentindex++;
	if (currentindex > 5) { currentindex= 1 }
	changeslides(currentindex)
	stopswitch=1;
}
 
function goback(){
	currentindex--;
	if (currentindex < 1) { currentindex= 5 }
	changeslides(currentindex)
	stopswitch=1;
}

function autoforward(){
	if (stopswitch == 0) {
		currentindex++;
		if (currentindex > 5) { currentindex= 1 }
		changeslides(currentindex)
	}	
	else {
		stopswitch = 0;	
	}
}

setInterval("autoforward()",8000);
