Need help with a card swapping game

hi friends,
Eventhough this is gonna be a pain for a lot of you, i am posting my dilemma anyways.
I have made a game where four cards are in a row along three columns.

    basic idea is to arrange in order the cards  i have placed the cards in an array as below

[[_lvl0.c0_0,_lvl0.c0_1,_lvl0.[COLOR=black]c0_2[/COLOR],_lvl0.c0_3], [_lvl0.c1_0,_lvl0.c1_1,_lvl0.c1_2,_lvl0.c1_3], [_lvl0.c2_0,_lvl0.c2_1,_lvl0.c2_2,_lvl0.c2_3]]

If I move card [0][0] to [1][2] then the array wud look like

[0_1[COLOR=DarkRed],[/COLOR]0_2[COLOR=DarkRed],[/COLOR]0_3[COLOR=DarkRed],[/COLOR][COLOR=Blue]1_0[/COLOR]], [1_1[COLOR=DarkRed],[/COLOR]1_2[COLOR=DarkRed],[/COLOR][COLOR=Blue]0_0[/COLOR][COLOR=DarkRed],[/COLOR]1_3], [2_0[COLOR=DarkRed],[/COLOR]2_1[COLOR=DarkRed],[/COLOR]2_2[COLOR=DarkRed],[/COLOR]2_3]

lly [2][0] to [0][2] the array wud look like

[0_1[COLOR=DarkRed],[/COLOR]0_2[COLOR=DarkRed],[/COLOR][COLOR=Blue]2_0[/COLOR][COLOR=DarkRed],[/COLOR]0_3], [[COLOR=Blue]1_0,[/COLOR]1_1[COLOR=DarkRed],[/COLOR]1_2[COLOR=DarkRed],[/COLOR][COLOR=Blue]0_0[/COLOR][COLOR=DarkRed],[/COLOR]], [[COLOR=Blue]1_3[/COLOR][COLOR=DarkRed],[/COLOR]2_1[COLOR=DarkRed],[/COLOR]2_2[COLOR=DarkRed],[/COLOR]2_3]

I got it all working the array shuffling and all but one problem persists unable to solve it
For ex:
Drag card number [0][1] to [1][2] … all the cards shift their positions ….
Now try dragging [0][2] over [0][3] … The card don’t shift
Click on reset
[COLOR=#ff6600]Do the same thing as above again[/COLOR]
[COLOR=#ff6600]But before the second step click on the card [0][3][/COLOR]
[COLOR=#ff6600]The do the second step[/COLOR]

Same way
Drag card no [0][0] directly to [2][0] last coloum in a straight horizont line
Now try drgging [0][0] over [1][0] noting happens
Click on reset
[COLOR=#ff6600]Do the same thing as above again[/COLOR]
[COLOR=#ff6600]But before the second step click on the card [2][0][/COLOR]
[COLOR=#ff6600]The do the second step[/COLOR]

  The idea is to first shuffle the cards in the dynamic array then place the cards onstage accordingly… then assign rowId  and colId  to these cards previously it was set in the “storevalues” function but the ids don’t get assigned to the 

cards on stage cards on mousemove… it gets assigned later when you click on the card
this happens only on across column shuffle so same row shuffle works fine .

**since i have already posted this query in another section i am not able to attach the file
**
**Please find it here
**


**Would appreciate any help you can provide
**
**Thanks in advance… **