Loop through your images, get their position and determine if they fall
into the selected area.
Make use of the offsetTop and offsetLeft properties of the image but
beware that it will give you the offset of their respective parents so
you have to do a recursive calculation but it depends on how you design
your layout.
Another good link that offers you a solution would be:
http://www.quirksmode.org/js/findpos.html
You simply calculate:
if (findPosX(img) >= dragStartX && findPosY(img) >= dragStartY) {
//it's selected }
you can do additional check to be inside completly the selected area.
The variables are self explanatory.
A good idea is to implement some kind of a grid layout to bring some
order into the chaos, to have some rules for displaying images.
Regards