<script>
var offset_x;
var offset_y;
function Milan_StartMove(oEvent,oBj)
{
var whichButton;
if(document.all&&oEvent.button==1) whichButton=true;
else { if(oEvent.button==0)whichButton=true;}
if(whichButton)
{
//var oDiv=document.getElementById("oDiv");
var oDiv=oBj;
offset_x=parseInt(oEvent.clientX-oDiv.offsetLeft);
offset_y=parseInt(oEvent.clientY-oDiv.offsetTop);
document.documentElement.οnmοusemοve=function(mEvent)
{
var eEvent;
if(document.all) eEvent=event;
else{eEvent=mEvent;}
//var oDiv=document.getElementById("oDiv");
var oDiv=oBj;
var x=eEvent.clientX-offset_x;
var y=eEvent.clientY-offset_y;
oDiv.style.left=(x)+"px";
oDiv.style.top=(y)+"px";
}
}
}
function Milan_StopMove(oEvent){document.documentElement.οnmοusemοve=null; }
</script>
<div id="oDiv" οnmοusedοwn="Milan_StartMove(event,this)" οnmοuseup="Milan_StopMove(event)" style="cursor:move;position:absolute;width:300px;height:300px;border:3px solid silver;left:300px;top:300px;background:white;z-index:9999;">
sss </div>
<div id="oDiv1" οnmοusedοwn="Milan_StartMove(event,this)" οnmοuseup="Milan_StopMove(event)" style="cursor:move;position:absolute;width:200px;height:100px;border:3px solid silver;left:300px;top:300px;background:white;z-index:9999;">
sss </div>