if (document.layers) { // Netscape document.captureEvents(Event.MOUSEMOVE); document.onmousemove = captureMousePosition; } else if (document.all) { // Internet Explorer document.onmousemove = captureMousePosition; } else if (document.getElementById) { // Netcsape 6 document.onmousemove = captureMousePosition; } xMousePos = 0; // Horizontal position of the mouse on the screen yMousePos = 0; // Vertical position of the mouse on the screen xMousePosMax = 0; // Width of the page yMousePosMax = 0; // Height of the page function showLocation(LocationID) { mdiv = document.getElementById('locationInfo'); mdiv.innerHTML = locations[LocationID]; mdiv.style.top = (yMousePos + 10) + 'px'; mdiv.style.left = (xMousePos - 100) + 'px'; mdiv.style.display = ""; } function hideLocation() { document.getElementById('locationInfo').style.display = 'none'; } function captureMousePosition(e) { if (document.layers) { xMousePos = e.pageX; yMousePos = e.pageY; xMousePosMax = window.innerWidth+window.pageXOffset; yMousePosMax = window.innerHeight+window.pageYOffset; } else if (document.all) { xMousePos = window.event.x+document.body.scrollLeft; yMousePos = window.event.y+document.body.scrollTop; xMousePosMax = document.body.clientWidth+document.body.scrollLeft; yMousePosMax = document.body.clientHeight+document.body.scrollTop; } else if (document.getElementById) { xMousePos = e.pageX; yMousePos = e.pageY; xMousePosMax = window.innerWidth+window.pageXOffset; yMousePosMax = window.innerHeight+window.pageYOffset; } }