var move_timer;
var move_width;

var move1_div;
var move1_posx;
var move2_div;
var move2_posx;

function doMove() {
	var endit;

	endit = 0;

	move1_posx-=1;
	move2_posx-=1;
	if (move1_posx <= -1*move_width)
		endit = 1;

	if (endit == 1)
		finishMove();
	move1_div.style.left = move1_posx+'px';
	move2_div.style.left = move2_posx+'px';
}

function finishMove() {
	move1_posx = 0;
	move2_posx = move_width;
}

function initMove(place, elemid1, elemid2) {
	var g = document.getElementById(place);
	var a = document.getElementById(elemid1);
	var b = document.getElementById(elemid2);
if (g && a && b) {
	move_width = a.offsetWidth;
	move1_div = a;
	move2_div = b;

	move_timer = setInterval(doMove, 20);
	move1_posx = 0;
	move2_posx = move_width;

	move1_div.style.left = move1_posx+'px';
	move2_div.style.left = move2_posx+'px';
}
}

