Ну вот как-то так, можно в эту сторону размышлять
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<script type="text/javascript">
var target;
var g_target;
function init(){
document.getElementById('b').onmouseover = function(event) {
if (!event) event = window.event;
target = event.target || event.srcElement;
setTimeout(function(){
if (g_target == target) document.getElementById('b').style.backgroundColor = '#00c';
}, 500);
}
document.onmousemove = function(event) {
if (!event) event = window.event;
g_target = event.target || event.srcElement;
}
}
</script>
</head>
<body onload="init()">
<div id="b" style="width: 100px; height: 30px; background: #c00;"></div>
</body>
</html>