var mouseX = 0;
var mouseY = 0;
if (document.layers) 
document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getCursor; 
function getCursor(e) {
if (document.all) {
mouseX = event.clientX + document.body.scrollLeft;
mouseY = event.clientY + document.body.scrollTop;
}
else
{
  if (document.getElementById) {
  mouseX = e.pageX;
  mouseY = e.pageY;
  }
}
}

function visibile_ev(idel, widthimg, heightimg){
var rpx, rpy, x1, y1;
  if (document.all){
  rpx = (mouseX / document.body.clientWidth);
  rpy = (mouseY / document.body.clientHeight);
  x1 = (widthimg * rpx);
  y1 = (heightimg * rpy);
  document.getElementById(idel).style.pixelLeft = mouseX - x1;
  document.getElementById(idel).style.pixelTop = mouseY - y1;
  document.getElementById(idel).style.visibility = "visible";

  }
  
  else
  {
    if (document.layers){
    //bx = (window.innerWidth / 2) - 350;
    rpx = (mouseX / window.innerWidth);
	rpy = (mouseY / window.innerHeight);
	x1 = (widthimg * rpx);
	y1 = (heightimg * rpy);
    document.idel.left = mouseX  - x1;
	document.idel.top = mousey - y1;
    }
    else
    {
      if(document.getElementById) {
	  rpx = (mouseX / window.innerWidth);
	  rpy = (mouseY / window.innerHeight);
	  x1 = (widthimg * rpx);
	  y1 = (heightimg * rpy);
      document.getElementById(idel).style.left = mouseX  - x1;
	  document.getElementById(idel).style.top = mouseY - y1;
	  document.getElementById(idel).style.visibility = "visible";
      }
    }
  }
}