// Tab Aktuell Rotation

var tabrefresh = 10000; // in ms
var stoptab = 0;
var tabsmax;

function stopptabrotation(){
// if (nohide==false)
if (typeof tabtimer!="undefined")
clearTimeout(tabtimer);
}

function starttabrotation(maxtab,tabnr){
tabnr++;
if (maxtab > 1)tabtimer = setTimeout("tabrotate("+tabnr+","+maxtab+")",tabrefresh);
}

function tabrotate(tabnr,tabsmax) {

tab = tabnr;

document.getElementById( 'gstab' + tab ).style.display = 'block';
document.getElementById( 'tabhead' + tab  ).style.backgroundImage = 'url(/images/tabnews/onleft.gif)';
document.getElementById( 'tabheadr' + tab  ).style.backgroundImage = 'url(/images/tabnews/onright.gif)';
document.getElementById( 'tabhead' + tab  ).style.fontWeight = 'bold';
	
	
	for (i=1; i<=tabsmax; i++) { 
		if (i!=tab) 
			{
			document.getElementById( 'tabhead' + i  ).style.backgroundImage = 'url(/images/tabnews/offleft.gif)';
			document.getElementById( 'tabheadr' + i  ).style.backgroundImage = 'url(/images/tabnews/offright.gif)';
			document.getElementById( 'tabhead' + i  ).style.fontWeight = 'normal';
			document.getElementById( 'gstab' + i ).style.display = 'none';
			}
	}


tab ++;
if (tab>tabsmax) tab = 1;
tabtimer = setTimeout("tabrotate("+tab+","+tabsmax+")",tabrefresh );
}


