/*
* created by LxcJie 2005.04.12
* 可以实现表格内容的内部拖动
* 确保中间过度层的存在,id为tempDiv
* 在table的onMouseDown事件中引入showDiv()
*/
/*--------全局变量-----------*/
var x0,y0,x1,y1;
var movable = false;
var preCell = null;
var normalColor = null;
var preColor = "lavender";
var endColor = "#FFCCFF";
/*--------全局变量-----------*/
//得到控件的绝对位置
function getPos(cell)
{
var pos = new Array();
var t=cell.offsetTop;
var l=cell.offsetLeft;
while(cell=cell.offsetParent)
{
t+=cell.offsetTop;
l+=cell.offsetLeft;
}
pos[0] = t;
pos[1] = l;
return pos;
}