var activeBigNews;

function showHideBigNews(theBox,stopInterval) {

	if(stopInterval && intervalBigNews) {
		window.clearInterval(intervalBigNews);
	}
	var recordVoice = first_child(document.getElementById(activeBigNews+'-r'));
	recordVoice.style.color='#000000';
	
	goTransition(activeBigNews,theBox,'bignews-transparency');

	activeBigNews=theBox;
	
	recordVoice = first_child(document.getElementById(activeBigNews+'-r'));
	recordVoice.style.color='#FF0000';
}

function initBigNews() {
	// get first big news ...
	var bigNewsContainer = document.getElementById('central-big-news');
	var bigNewsDivs = bigNewsContainer.getElementsByTagName('div');
	activeBigNews = bigNewsDivs[1].id;
	showHideBox(activeBigNews);
	goAlpha('bignews-transparency',0);
	var recordVoice = first_child(document.getElementById(activeBigNews+'-r'));
	recordVoice.style.color='#FF0000';
	intervalBigNews = window.setInterval("slideBigNews()",5000);
}

function slideBigNews() {
	var theObj = document.getElementById(activeBigNews);
	var nextSib = nextValidSibling(theObj);
	if(!nextSib) {
		nextSib = nextValidSibling(first_child(theObj.parentNode));
	}
	
	showHideBigNews(nextSib.id);
}



function goTer(iTer) {
	if(territori[iTer]) {
		goLink(territori[iTer]);
	}
}

addEvent(window,'load',initBigNews);
