As indicated, you cannot set the mouse position using Javascript.
Since you asked about implementing this on mousedown, I assume the user is dragging something onto the screen. That way you can make the element they drag show this behavior. You need two elements in order to act as regions where you can freely drag the target and the other to determine the size of the border. I would do it with jQuery to shorten the code, but basically you will have something like this. (Unverified code)
HTML:
<div class='borderLand'>
<div class='freeZone'>
<img class='draggable'>
</div>
</div>
CSS
.borderLand {position: relative; width: 110px; height: 110px;}
.freeZone {position: relative; top: 10px; left:10px; height: 100px; width: 100px;}
JS:
, -
onmousedown{
check for click location
if it over the draggable (watch for bubbling) begin dragging, set dragging flag
}
onmouseup{
clear dragging flag if it set
}
borderland onmouseover{
if dragging, stop the movement of the draggable (watch for bubbling here too)
}
borderland onmouseout{
start dragging again (if they move back in or out it doesn't matter, you want to drag)
}
, , JS , , .