// JScript 文件

 <!--
  var move_obj_x0=0,move_obj_y0=0,move_obj_x1=0,move_obj_y1=0;//(x0,y0)为开始拖动时鼠标的位置(x1,y1)为开始拖动时对象的位置  
var obj_moveable=false;  

//开始拖动;  
function startDrag(obj,id)  
{  
  if(event.button==1)  
  {  
  obj.setCapture();  
  win=document.getElementById(id)  
  move_obj_x0 = event.clientX;  
  move_obj_y0 = event.clientY;  
  move_obj_x1 = parseInt(win.style.left);  
  move_obj_y1 = parseInt(win.style.top);  
  obj_moveable = true;  
  }  
}  
//拖动;  
function drag(id)  
{  
  if(obj_moveable)  
  {  
  win=document.getElementById(id)  
  win.style.left = (move_obj_x1 + event.clientX - move_obj_x0>0)?move_obj_x1 + event.clientX - move_obj_x0:0;  
  win.style.top = (move_obj_y1 + event.clientY - move_obj_y0>0)?move_obj_y1 + event.clientY - move_obj_y0:0;  
  }  
}  
//停止拖动;  
function stopDrag(obj,id)  
{  
  if(obj_moveable)  
  {  
  obj.releaseCapture();  
  obj_moveable = false;  
  }  
}  
-->
  