var home_hero_array = new Array(
	'whats-on',
	'creative-producers',
	'management-publishing-touring',
	'partnership-sponsorship',
	'learning-participation',
	'london-jazz-festival'
);

var step = 0;
var slideshow = setInterval("show()",4500)


function show_home_hero(element) {
	
	clearInterval(slideshow);
	document.getElementById('slideshow_stop').style.textDecoration = "underline";
	document.getElementById('slideshow_start').style.textDecoration = "";

	for (i=0; i<home_hero_array.length;i++) {
		if(home_hero_array[i] != element) {
			$(home_hero_array[i] + '_span').style.display = 'none';
			$(home_hero_array[i] + '_img').style.display = 'none';
			$(home_hero_array[i] + '_li').className = home_hero_array[i];
		}
	}
	
	$(element + '_span').style.display = 'block';
	$(element + '_img').style.display = 'block';
	$(element + '_li').className = element + ' current';
	
	if(element == 'whats-on'){
	step = 0;
	}
	
	if(element == 'creative-producers'){
	step = 1;
	}
	
	if(element == 'management-publishing-touring'){
	step = 2;
	}
	
	if(element == 'partnership-sponsorship'){
	step = 3;
	}
	
	if(element == 'learning-participation'){
	step = 4;
	}
	
	if(element == 'london-jazz-festival'){
	step = 5;
	}

}


function show(element){

	if (step<5)
	step++
	else
	step=0

	for (i=0; i<home_hero_array.length;i++) {
		if(home_hero_array[i] != element) {
			$(home_hero_array[i] + '_span').style.display = 'none';
			$(home_hero_array[i] + '_img').style.display = 'none';
			$(home_hero_array[i] + '_li').className = home_hero_array[i];
		}
	}
	
	$(home_hero_array[step] + '_span').appear();
	$(home_hero_array[step] + '_img').appear();
	$(home_hero_array[step] + '_li').className = home_hero_array[step] + ' current';

}


function stop(){
	clearInterval(slideshow);
	document.getElementById('slideshow_stop').style.textDecoration = "underline";
	document.getElementById('slideshow_start').style.textDecoration = "";

}

function start(){
	clearInterval(slideshow);
	document.getElementById('slideshow_start').style.textDecoration = "underline";
	document.getElementById('slideshow_stop').style.textDecoration = "";
	show()
	slideshow = setInterval("show()",4500)
}



