Guest User

Untitled

a guest
Aug 10th, 2012
355
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <div id="display_info" style="visibility:hidden; position: fixed; top: 10px; left: 3px; width: 400px;  background-color: azure; border: 1px solid black; padding:5px">
  2.         description written here by JavaScript
  3.     </div>
  4.    
  5.     <script type="text/javascript">
  6.         var ps = document.getElementsByTagName("area");
  7.         for (var i = 0; i < ps.length; ++i) {
  8.             ps[i].onmouseover = (function() {
  9.             var ref = this.href.substr(this.href.indexOf("#")+1)
  10.             document.getElementById("display_info").innerHTML = ref;
  11.            
  12.             var as = document.getElementsByTagName("a");
  13.             for (var i = 0; i < as.length; ++i) {
  14.                 if (as[i].name == ref) {
  15.                    var x = as[i]; while (x.tagName.toLowerCase() != "p") {  x = x.nextSibling; }
  16.                    display_info.innerHTML = x.innerHTML;
  17.                    display_info.style.visibility = "visible";
  18.                 }
  19.             }
  20.             });
  21.         }
  22.     </script>
RAW Paste Data