function AktuellesRotation() {

	this.banners = new Array();
	this.count = document.getElementById('aktuellesrotation').childNodes.length;
	this.opened = undefined;
	this.current = 0;
	this.duration = 10000;
	
	if (this.count>0) {
	
		var b=0;
		for (var i=0; i<this.count; i++) {
		
			var node = document.getElementById("aktuellesrotation").childNodes[i];
		
			if ( (node.nodeName=='DIV') && (node.getAttribute('id')=='aktuellesrotation_aktuelles')) {
			
				this.banners[b] = node;
				b++;
			
			}
		
		}
		this.count = this.banners.length;
	
	}
	
	this.rotate = function() {
	
		if (this.count>0) {
		
			if (this.opened!=undefined) this.opened.style.display = 'none';
		
			this.banners[this.current].style.display = 'block';
			this.opened = this.banners[this.current];
			
			this.current++;
			if (this.current==this.count) this.current = 0;
			
		window.setTimeout(function(){AktuellesRotation.rotate()}, this.duration);
		}
			
	}
	
	this.rotate();

}
AktuellesRotation = new AktuellesRotation();