You need to use the viewport functions.
CocoonJS adjusts the screen for a few ticks, so best is to check if it has changed and if it has then set the positions again.
On start of layout:
<img src="https://dl.dropbox.com/u/19625130/C2_scWscH.JPG" border="0" />
Then set your x,y of the images to (0,0); (0,ScreenHeight); (ScreenWidth,0);(ScreenWidth,ScreenHeight).
Then every tick you have a condition to check if the variable is still equal to the viewport function.
if it has changed then redo this:
Then set your x,y of the images to (0,0); (0,ScreenHeight); (ScreenWidth,0);(ScreenWidth,ScreenHeight).