? para.setAttribute(onclick, "myFunction1(para.id)")

hehe, I thought you had this!
You should have been able to drag as many elelemnts as you wanted with the old one.
Anywayz, I havent tried this one but theres one obvious mistake just glancing at the code.
In dragElement you define pos1-4 and then try to access them in other functions. They only exist in the scope of dragElement, move them to above the definition of dragElement…no idea if this will make it work.