// automatic promo switch
//-----------------------
var stat = 0;

function switchHeadline(hnr, nr1){
	var i = 0;
	var controlelement = '';

	for (i = 1 ; i <= nr1 ; i++) {
		document.getElementById('he'+i).style.display = 'none';
/*		document.getElementById('nr'+i).className = '';*/
		
		if (hnr == i) {
			
			document.getElementById('he'+hnr).style.display = 'block';
			/*document.getElementById('nr'+hnr).className = 'current'	*/
		}
	}	 
		
	if (stat != 1) {	
		setTimeout("switchHeadlines("+nr1+", "+hnr+")", 5000);
	} 
		controlelement = document.getElementById('promosControls').getElementsByTagName('li');
		for(var i=0; i<controlelement.length; i++){
			promo_link = controlelement[i];
			if (promo_link.id == 'nr'+hnr) {
					activecontrol = promo_link
				}
		}
		
		set_Current(activecontrol);
	
}

function switchHeadlines(nr, starth) {

		if (starth == nr) {
			nexth = 1;
		}
			else {
				nexth = starth+1;
			}
		
/*		if (stat != 1) {*/
			switchHeadline(nexth, nr);
/*		}*/
}
