<html>
<head>
<script>
var isMove = false;
var leftInDialog = 0;
var topInDialog = 0;
function mouseMove(e)
{
if(isMove)
{
document.getElementById("dialog").style.left = ((e.pageX || e.x) - leftInDialog) + "px";
document.getElementById("dialog").style.top = ((e.pageY || e.y) - topInDialog) + "px";
}
}
function beginMove(e)
{
isMove = true;
leftInDialog = (e.pageX||e.x) - parseInt(document.getElementById("dialog").style.left);
topInDialog = (e.pageY||e.y) - parseInt(document.getElementById("dialog").style.top);
}
function endMove()
{
isMove = false;
}
</script>
</head>
<body οnmοusemοve="mouseMove(event)">
<div id="dialog" οnmοusedοwn="beginMove(event)" οnmοuseup="endMove()" style="background:white;width:500px;height:200px;border:10px solid #CCCCCC;position:absolute;z-index:9999;left:0px;top:0px;">
<div style="height:30px;background:#75717A;">
</div>
</div>
</body>
</html>