a = XCircuit.arc(0,0,100);
c = a.center;
direction = 1;
stopflag = 0;
delay = 50;
stopdelay = 10000;

/*
function move_a() {
	if (a.cx > 400 || a.cx < -400)
		direction = -direction;
	if (direction > 0)
		a.cx += 50;
	else
		a.cx -= 50;
	if (stopflag == 0)
		XCircuit.setTimeout('move_a()', delay);
}
*/

function move_c() {
	if (c.x > 400 || c.x < -400)
		direction = -direction;
	if (direction > 0)
		c.x += 50;
	else
		c.x -= 50;
	if (stopflag == 0)
		XCircuit.setTimeout('move_c()', delay);
}

/*
XCircuit.setTimeout('move_a()', delay);
*/
XCircuit.setTimeout('move_c()', delay);
XCircuit.setTimeout('stopflag = 1', stopdelay);
