ie = document.all ? 1 : 0;
ns4 = document.layers ? 1 : 0;
ns6 = (document.getElementById && (!ie)) ? 1 : 0;
timSpeed = 1;
contHeight = 100;

function makeScrollObj(obj,nest) {
	nest = (!nest) ? '' : 'document.' + nest + '.';
	if (ns4) {
		this.css = eval(nest + 'document.' + obj);
		//alert(this.css);
	} else if (ns6) {
		this.css = eval('document.getElementById' + '(' + obj + ')' + '.style');
		//alert(this.css);
	} else {
		this.css = eval('document.all.' + obj + '.style');
		//alert(this.css);
	}
	if (ns4) {
		this.scrollHeight = this.css.document.height;
		//alert(this.scrollHeight);
	} else if (ns6) {
		this.scrollHeight = eval('document.getElementById' + '(' + obj + ')' + '.height');
		//alert(this.scrollHeight);
	} else {
		this.scrollHeight = eval('document.all.' + obj + '.offsetHeight');
		//alert(this.scrollHeight);
	} this.top = b_gettop;
	return this;
}

function b_gettop() {
	var gleft
	if (ns4) {
		gleft = eval(this.css.top);
	} else if (ns6) {
		gleft = eval(this.css.top);
	} else {
		gleft = eval(this.css.pixelTop);
	} return gleft;
	
}

//Variables
var scrollTim;
var active = 0;

function scroll(speed) {
	clearTimeout(scrollTim);
	way = (speed > 0) ? 1 : 0;
	if ((!way && oScroll[active].top() > - oScroll[active].scrollHeight + contHeight) || (oScroll[active].top() < 0 && way)) {
		oScroll[active].css.top = oScroll[active].top() + speed;
		scrollTim = setTimeout("scroll(" + speed + ")",timSpeed);
	}
}

function noScroll() {
	clearTimeout(scrollTim);
}

function scrollInit() {
	oScroll = new Array();
	oScroll[0] = new makeScrollObj('divScroll1','divCont');
	oScroll[0].css.visibility = 'visible';
	//ShowWindow('content/flash.htm');
}

function ShowWindow(info) {
	Stats=window.open(info,"Stats","width=250,height=250"); 
	Stats.window.focus() 
}

window.onload = scrollInit;