Sorry this is later than I said. I've just written the attached file. It's heavily commented. See how you get on. Its principles are this:
1) tell the doc to listen for mouse events. the mouse position is constantly tracked as the mouse moves.
2) when a mousedown is detected, find out if it was on an element that we allow to be dragged and dropped (these elements have the classname 'draggable' - see bottom)
3) if it's a draggable element, start the drag procedure: we're tracking the mouse position anyway, so just set the top and left properties of the dragged element equal to those of the mouse position, so it looks like it's being dragged.
4) when mouseup is detected, stop dragging
Buzz me if you have questions.