// User DLE info by BENQ but for chat by JavaNet //

var SelectedItem;

var SelectedX, SelectedY;

var aMouseX, aMouseY;



function Move(ClickedItem) {

  SelectedItem = ClickedItem;

  SelectedX = SelectedItem.style.pixelLeft;

  SelectedY = SelectedItem.style.pixelTop;

  aMouseX = event.clientX;

  aMouseY = event.clientY;

  document.onmousemove = Drag;

  document.onmouseup = Drop;

}



function Drag() {

  SelectedItem.style.left = SelectedX + (event.clientX - aMouseX);

  SelectedItem.style.top = SelectedY + (event.clientY - aMouseY);

  return false;

}



function Drop() {

  document.onmousemove = null;

  document.onmouseup = null;

}



function show_bar(ev, id) {

  MouseX = ev.clientX + document.body.scrollLeft;

  MouseY = ev.clientY + document.body.scrollTop;

  obj = document.getElementById("win_" + id);

  

  obj.style.top = MouseY + 10;

  obj.style.left = MouseX;

  obj.style.visibility = "visible";

}



function hide_bar(id) {

  document.getElementById("win_" + id).style.visibility="hidden"

}



function show_opac(real, id) {

 if (real==0) {

   document.getElementById("win_" + id).style.filter = "alpha(opacity=100)";

   document.getElementById("win_" + id).style.opacity = 1;

 } else {

   document.getElementById("win_" + id).style.filter = "alpha(opacity=95)";

   document.getElementById("win_" + id).style.opacity = 0.95;

 }

}