When i drag the right part of uploaded image in mask1 , than uploaded image in mask2 is dragging, but that should\'t happen....
Here is video link
Why are you defining the ondragover attribute twice? In any case, after defining onDragOverSec, you are later rewriting it as onDragOver, thereby triggering the event handler that you are using for the first element.
As a side note, this code could be rewritten to be be more DRY, by passing the differences between the two cases as variables to the same function, rather than two copies of each function