var isie4 = 0;
var isns4 = 0;
var isdom = 0;

if(document.all){
	isie4 = 1;
} else if(document.layers){
	isns4 = 1;
} else if(document.getElementById){
	isdom = 1;
}

var mscroll=0;
var mdir=0;
function scroll() {
	if(isns4) {
		with(document.layers.Text){
			if(((mdir>0)&&(-top<clip.height-60))||((mdir<0)&&(top<20))) top-=mdir;
			if(-top>clip.height-60) top=-clip.height+60;
			if(top>20) top=20;
		}
	}
	if(isie4) {
		with(document.all.Text){
			if(((mdir>0)&&(-style.pixelTop<scrollHeight-60))||((mdir<0)&&(style.pixelTop<20))) style.pixelTop-=mdir;
			if(-style.pixelTop>scrollHeight-60) style.pixelTop=-scrollHeight+60;
			if(style.pixelTop>20) style.pixelTop=20;
		}
	}
	if(isdom) {
		with(document.getElementById('Text')){
			if(((mdir>0)&&(-offsetTop<offsetHeight-60))||((mdir<0)&&(offsetTop<20))) style.top=(offsetTop-mdir)+'px';
			if(-offsetTop>offsetHeight-60) style.top=(-clip.height+60)+'px';
			if(offsetTop>20) style.top='20px';
		}
	}
}

function doscroll(dir) {
	mdir=dir;
	if(dir)mscroll = window.setInterval("scroll()",10);
	else window.clearInterval(mscroll);
}

