
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;

n=document.layers?1:0
ie=document.all?1:0

function makeObj(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.'
	this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')                                                    
	this.moveIt=b_moveIt;
}

function b_moveIt(x,y){
	this.x=x; this.y=y
	this.css.left=this.x
	this.css.top=this.y
}

function checkIt(){
	if(ie) 
		oTest.moveIt(90,document.body.scrollTop+pageHeight-gbottom)
	else if(n){
		oTest.moveIt(90, window.pageYOffset+pageHeight-gbottom)
		setTimeout('checkIt()',20)
	}
}

function makeScrollObj(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.'                                                                          
	this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')                                                    
	this.scrollHeight=n?this.css.document.height:eval('document.all.'+obj+'.offsetHeight')                                                  
	this.top=b_gettop                                                                               
	return this
}

function b_gettop(){
	var gleft=(n) ? eval(this.css.top):eval(this.css.pixelTop);
	return gleft;
}

var scrollTim;
var active=0;
var timSpeed=0
var contHeight=100
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(){
	var scrollExist = 0;
	
	if (document.layers) {
		if (document.divControl) {
			document.divControl.visibility = "show";
			scrollExist = 1;
		}
	}
	if (document.all) {
		if (document.all.divControl) {
			document.all.divControl.style.visibility = "visible";
			scrollExist = 1;
		}
	}
	if ( scrollExist ) {
		oScroll=new Array()
		oScroll[0]=new  makeScrollObj('divScroll1','divCont')
	}
}

