w =  2 ;  // 距離
t = 10 ;  // 時間
dirc = 0

/* 画像移動 */

function mov(){
if(dirc==0){
	if (( pic1.style.posLeft -= w) < -pic1.width ) { pic1.style.posLeft += pic1.width + pic2.width } ;
	if (( pic2.style.posLeft -= w) < -( pic2.width + pic1.width )) { pic2.style.posLeft = pic1.style.posLeft } ;
	timerID = setTimeout( "mov()", t ) ;
	} else {
	if ((pic1.style.posLeft += w) > pic2.width ) { pic1.style.posLeft -= ( pic1.width + pic2.width) } ;
	if ((pic2.style.posLeft += w) > 0) { pic2.style.posLeft -= (pic1.width + pic2.width) } ;
	timerID = setTimeout( "mov()", t ) ;
	}
}

function Spd0(){if(w == 0){w = wo} else {wo = w;w = 0 }}
function Spdf(){ w=4 };
function Spdn(){ w=2 };
function Spds(){ w=1 };
function Dirn(){if(dirc==0){dirc=1} else {dirc=0}}

