Because you are fixing the position with style.left in move1(), don't try to fix position with style.right in move3()
Instead, you should still change style.left
with pos1 -= 1 in move3()
A fix for you:
Try same concept for moving up along the left edge in a move4()
The reference point of canvas (x,y) is its left upper corner (0,0). Therefore, the distances between the left and the upper side of a shape was defined (determined) for its position. Thus style.right do not work.