Javascript dragging
<p>i was trying to make a drag able  element but i failed...
i don't want to use jquery.</p>

<p>i got the following html code:</p>

<pre><code>&lt;div id='area'&gt;
  &lt;div id='drag'&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>i want to drag id='drag' inside id='area' and not going out of it.</p>

<p>sorry for my bad English and for my newbie question.</p>

<p>EDIT:</p>

<pre><code>Area.addEventListener("mousemove", function (e) {
    var X, Y;
    X = e.offsetX;
    Y = e.offsetY;
    Information.innerHTML = 'X:' + X + ' - ' + 'Y:' + Y;
});

img.addEventListener("mouseover", function () {
    this.style.cursor = 'move';
    this.addEventListener("mousemove", function (e) {
        var X, Y;
        X = e.offsetX;
        Y = e.offsetY;
        Information2.innerHTML = 'X:' + X + ' - ' + 'Y:' + Y;
    });
});
</code></pre>

<p>idk how to get the X and Y of the Area to add it to img</p>
