
  
   ns4 = (document.getElementById)? true:false;
   ie4 = (document.all)? true:false;
   mouseX=0;
   mouseY=0;
   bVisible = false;
   myw = 0;

   var h = new Object();
   var hc = new Object();
   var hp = new Object();
   var hr = new Object();
   var hnp = new Object();
   var cat = new Object();

   function init() {
      if (ie4) document.onmousemove=mousemove;
      else {
         document.captureEvents(Event.MOUSEMOVE);
         document.onmousemove=mousemove;
      }
   }

   function mousemove(e) {
      if (ns4 && !ie4) {mouseX=e.pageX; mouseY=e.pageY}
      if (ie4) {
         mouseX=(event.clientX + document.body.scrollLeft);
         mouseY=(event.clientY + document.body.scrollTop);
      }
      if (bVisible) {
         if (ns4) d = self.document.getElementById("altdiv");
         if (ie4) d = eval('document.all.altdiv');
      	 var top = mouseY;
      	 var height = d.scrollHeight;
      	 var maxTop = window.document.body.scrollHeight -height;
      	 if( ie4 ) maxTop -= 20;

         if( top > maxTop ) top = maxTop;
         d.style.top = top +'px';
         d.style.left = mouseX+10+'px';
      }
   }
   function ShowAltdiv( _strHTML, width, disp ) {
      if (ns4) d = self.document.getElementById("altdiv");
      if (ie4) d = eval('document.all.altdiv');

      bVisible = true;

      if (d != null) d.innerHTML = _strHTML;

      var top = mouseY;
      var height = d.scrollHeight;
      var maxTop = window.document.body.scrollHeight -height;
      if( ie4 ) maxTop -= 20;
      if( top > maxTop ) top = maxTop;
      d.style.top = top +'px';
      d.style.left = mouseX+10+'px';
   }

   function HideAltdiv() {
      if (ns4) d = document.getElementById("altdiv");
      if (ie4) d = eval('document.all.altdiv');
      d.innerHTML = '';
      bVisible = false;
      d.style.left = 0;
      d.style.top = 0;
   }

   function MO(name) {
      myname = unescape(name);
      myname = myname.replace(/\+/g , ' ');
      myname = myname.replace(/\\\\/g , '');
      strCLS = 'quick_alt';
      myw = 10 * myname.length;
      strHTML = '<table width="'+myw+'" class="'+strCLS+'"><tr align=center><td><b>'+myname+'</b></td></tr></table>';
      ShowAltdiv(strHTML, myw);
   }

   function MF(name) {
      myw=0;
      HideAltdiv();
   }

  
 
   var loadChain = window.onload;
   window.onload = function () {
     if( loadChain !=null ) loadChain();
     var w = window.parent.document.getElementById("map-frame");
     browser_offset = 2; //for netscape
     if (ie4) browser_offset = 18;
     if( w != null ) w.height = window.document.body.scrollHeight + browser_offset;
   };
   
   init();
  
