// SCROLLING //////////////////////////////////////////////////////////////

function moveIt(x,y){
	this.x=x;
	this.y=y;
	this.css.left=this.x;
	this.css.top=this.y;
}

function goDown(move){
	if(this.y>-this.scrollHeight+oCont.clipHeight){
		this.moveIt(0,this.y-move);
		if(loop) timer = setTimeout(this.obj+".down("+move+")",this.interval);
	}
}

function goUp(move){
	if(this.y<0){
		this.moveIt(0,this.y-move);
		if(loop) timer = setTimeout(this.obj+".up("+move+")",this.interval);
	}
}

function scroll(speed){
	if(loaded){
		loop=true;
		if(speed>0) oScroll.down(speed);
		else oScroll.up(speed);
	}
}

function noScroll(){
	loop=false;
	//timer = null;
	clearTimeout(timer);
}

var loaded;
function scrollInit(){
	oCont=new makeScrollObj('BDcont');
	oScroll=new makeScrollObj('BDtxt','BDcont');
	oScroll.moveIt(0,0);
	oCont.css.visibility=VISIBLE;
	oScroll.css.visibility=VISIBLE;
	loaded=true;
}

function swapTxt(warph){
	oScroll.css.visibility=HIDDEN;
	oCont=new makeScrollObj('BDCont');
	oScroll=new makeScrollObj('BDtxt'+warph,'divCont');
	oScroll.moveIt(0,0);
	oCont.css.visibility=VISIBLE;
	oScroll.css.visibility=VISIBLE;
	loaded=true;
}

onload=scrollInit;

/*// Windowopeners...

function openWindow() {
	var bd_win = window.open('bd_start.html',
							'bd_main','height=540,width=720,scrollbars=no,toolbars=yes');
	bd_pdfwin.focus();
}

function openPDF(bd_pdf) {
	var bd_pdfwin = window.open(bd_pdf, 'bd_pdfwin','height=540,width=720,scrollbars=no,toolbars=yes');
	bd_pdfwin.focus();
}
//*/
