========================================================================================================================
function initFreeMove(e,isCalc){ //called onmousedown of the calculator "Hold down & Drag to Move" button
isCal = isCalc;
cMI = true;
getMouseXY(e);
if(isCal){
tmpErrX=75;
tmpErrY=20;
hitCal = true;
}
mIO = (isCal) ? getDOMObj("calculator") : ((IE==true) ? e.srcElement : e.target);
}
function processFreeMove(ev){ //called onmousemove of the calculator "Hold down & Drag to Move" button
if(cMI == true){
getMouseXY(ev);
if (isCal){
mIO.style.left= (tmpX - tmpErrX) + 'px';
mIO.style.top= (tmpY - tmpErrY) + 'px';
if (bH < (mIO.style.pixelHeight + mIO.style.pixelTop)){
mIO.style.pixelTop = bH - mIO.style.pixelHeight - 15;
cMI = false;
}
if (bW < (mIO.style.pixelWidth/2 + mIO.style.pixelLeft)){
mIO.style.pixelLeft = bW - mIO.style.pixelWidth - 15;
cMI = false;
}
}
}
}
-------------------------
function stopFreeMove(e){ //called onmouseup of the calculator "Hold down & Drag to Move" button
cMI=false;
hitCal = false;
}
---------------------HTML Code----------------------------
<div id="calculator" align="center" style="background-color:#cccccc;position:absolute;width:195px;height:150px;border:0px dotted gray;display:none;padding:0px;z-index:50;">
<TABLE BORDER=4 cellspacing=0>
<TR>
<TD align="left">
<INPUT TYPE="button" style="background-color:#000000;color:#ffffff;font-size:10;" Size="23" value="Hold down & Drag to Move " />& Drag to Move</label> <button style="font-size:10;font-weight:bold;background-color:#ff3300;" title="Click to Close">X</button>
........
.....
========================================================================================================================
Any help would be appreciated.
Thanks,
Raghavender.