<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function over(file_name)
{
img = document.createElement('div');
document.body.appendChild(img);
img.innerHTML = '<img src='+file_name+' />';
img.style.position = 'absolute';
img.style.background = '#FFFFFF';
img.style.border = 'solid 1px #346fdc';
img.style.padding = '4px';
move();
}
function move(e)
{
e = e || window.event
if (e.pageX == null && e.clientX != null )
{
var html = document.documentElement
var body = document.body
e.pageX = e.clientX + (html && html.scrollLeft || body && body.scrollLeft || 0) - (html.clientLeft || 0)
e.pageY = e.clientY + (html && html.scrollTop || body && body.scrollTop || 0) - (html.clientTop || 0)
}
img.style.left = e.pageX + 15 + 'px';
img.style.top = e.pageY + 15 + 'px';
}
function out()
{
document.body.removeChild(img);
}
</script>
</head>
<body>
<div><a href="" onmouseover="over('http://javascript.ru/forum/images/ca_serenity/misc/logo.gif')" onmousemove="move(event)" onmouseout="out()">link</a></div>
</body>
</html>
так правильнее, не забываем про пиксели
+ 'px';:
img.style.left = e.pageX + 15 + 'px';