var sx1=false; var dx1=false; var up1=false; var dn1=false;
var sx2=false; var dx2=false; var up2=false; var dn2=false;
var xpos1=0; var ypos1=0; var xpos2=0; var ypos2=0;
var timer1; var timer2; var t1_on=false; var t2_on=false;
var myplay=true;

function bkg1(){
	document.getElementById('bkg1').style.backgroundPosition=xpos1+'px '+ypos1+'px';
	if(sx1==true) {xpos1++}
	if(dx1==true) {xpos1--}
	if(up1==true) {ypos1++}
	if(dn1==true) {ypos1--}
	timer1=setTimeout("bkg1()",20);
	}
	
function bkg2(){
	document.getElementById('bkg2').style.backgroundPosition=xpos2+'px '+ypos2+'px';
	if(sx2==true) {xpos2++}
	if(dx2==true) {xpos2--}
	if(up2==true) {ypos2++}
	if(dn2==true) {ypos2--}
	timer2=setTimeout("bkg2()",100);
	}

function scroll1() {if(t1_on==false){t1_on=true; bkg1();}}
function scroll2() {if(t2_on==false){t2_on=true; bkg2();}}
function scroll0() {clearTimeout(timer1); t1_on=false; clearTimeout(timer2); t2_on=false;}



