var aSlideShow;

function oslideshow() {
this.cnews = 0;
this.news = new Array();
advance = true;
var container = document.getElementById("newsnow");
if( container != null ) {
	this.news = container.getElementsByTagName("DIV");
}

setTimeout( "aSlideShow.flip()", 8000);
}
oslideshow.prototype.flip=function()
{
	if( this.news.length > 0 && advance) {
		this.news[this.cnews].style.display="none";
		++this.cnews;
		if(this.cnews>=this.news.length) this.cnews=0;
		this.news[this.cnews].style.display="block";
		setTimeout( "aSlideShow.flip()", 8000);
	}

}
oslideshow.prototype.reset=function( start)
{
	advance = false;
	if( this.news.length > 0) {
		this.news[this.cnews].style.display="none";
	}
	this.cnews = start;
	this.news[this.cnews].style.display="block";
	return false;
}
function init() {
	aSlideShow = new oslideshow;
}

init();
