check the parent div boundary value for draggable element,If it satisfies the condition ,allow to move the element.
Try this code:
var boun=document.getElementById("parent").offsetWidth-document.getElementById("elem").offsetWidth;
if((aX>0)&&(aX<boun)&&(aY>0)&&(aY<boun))
tzdragg.move('elem',aX,aY);