delay--;
if delay > 0
	exit;

switch(state)
{
	case "move_up":
		y -= spd;
		spd -= acc;
	    if abs(y - anchor_up) < spd
	    {
	        y = anchor_up;
	        state = "wait_up";
	    }
	    break;

	case "move_down":
		y += spd;
		spd += acc;
	    if abs(y - anchor_down) < spd
	    {
	        y = anchor_down;
	        state = "wait_down";
	    }
	    break;
}