
var TickerFramework = {

	children: new Array() ,
	size: "" ,
	index: 0,
	
	init:function () {
		this.fillChildArray() ;
		this.size = this.children.length-1 ;
		this.toggle() ;
	},
	
	toggle: function () {
		var ticker = this ;
		this.hide() ;
		
		if(this.index > this.size) this.index = 0 ;
		
		this.children[this.index].style.display = 'block' ;
		this.index++ ;
		
		window.setTimeout(function () { ticker.toggle(); }, 5000);
	},
	
	hide: function () {
			for (var i=0; i<=this.size; i++) {
				this.children[i].style.display = 'none' ;
			}
	},
	
	fillChildArray: function () {
		childs = document.getElementById('text2').childNodes ;
		var i = 0;
		for (var index=0; index<childs.length; index++) {
			if(childs[index].tagName == 'DIV') {this.children[i] = childs[index] ; i++}
		}
		
	}

}

