ie=document.all?1:0
n=document.layers?1:0

var speed=50
var loop, timer

function makeObj(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.'
    this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style')
	this.scrollHeight=n?this.css.document.height:eval(obj+'.offsetHeight')
	this.up=goUp
	this.down=goDown
    this.obj = obj + "Object"
    eval(this.obj + "=this")
    return this
}

function goDown(move){
	if(parseInt(this.css.top)>-this.scrollHeight+contHeight){
		this.css.top=parseInt(this.css.top)-move
		if(loop) timer=setTimeout(this.obj+".down("+move+")",speed)
	}
}

function goUp(move){
	if(parseInt(this.css.top)<0){
		this.css.top=parseInt(this.css.top)+move
		if(loop) timer=setTimeout(this.obj+".up("+move+")",speed)
	}
}

function noScroll(){
	loop=false
	clearTimeout(timer)
}

function scrollInit(ljs1,ljs2){
	contHeight=ie?divCont_0.style.pixelHeight:document.divCont_0.clip.bottom;
	oScroll=makeObj(ljs1,ljs2)
}

