var nn4=(document.layers)?true:false;
var nn6=(document.getElementById)?true:false;
var iex4=(document.all)?true:false;

function hide_layer(id) {
    if (nn4) document.layers[id].visibility='hide';
    if (nn6) document.getElementById(id).style.visibility='hidden'; 
    if (iex4) document.all[id].style.visibility='hidden';
}

function show_layer(id) {
    if (nn4) {
		document.layers[id].visibility='show';
		document.layers[id].left=xMousePos+10;
		document.layers[id].top=yMousePos;
	}
    if (iex4) {
		document.all[id].style.visibility='visible';
		document.all[id].style.left=xMousePos+10;
		document.all[id].style.top=yMousePos;
	}
    if (nn6) {
		document.getElementById(id).style.visibility='visible'; 
		document.getElementById(id).style.left=xMousePos+10;
		document.getElementById(id).style.top=yMousePos;
	}
}

// Global variables
xMousePos = 300; // Horizontal position of the mouse on the screen
yMousePos = 300; // Vertical position of the mouse on the screen
//-->
<!--
/* works with IE 4+, NS4, NS6 and other Gecko, OmniWeb, Opera (4) 5+,
iCab, IceBrowser, Esape 4, HotJava 3, Konqueror and, as long as they
follow the standards, loads more */
function captureMousePosition(e) {
   if( !e ) { e = window.event; } if( !e || ( typeof( e.pageX ) != 'number' && typeof( e.clientX ) != 'number' ) ) { return [ 0, 0 ]; }
   if( typeof( e.pageX ) == 'number' ) { xMousePos = e.pageX; yMousePos = e.pageY; } else {
      xMousePos = e.clientX; yMousePos = e.clientY;
      if( !( ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || window.navigator.vendor == 'KDE' ) ) {
         if( document.documentElement && ( document.documentElement.scrollTop || document.documentElement.scrollLeft ) ) {
            xMousePos += document.documentElement.scrollLeft; yMousePos += document.documentElement.scrollTop;
         } else if( document.body && ( document.body.scrollTop || document.body.scrollLeft ) ) {
            xMousePos += document.body.scrollLeft; yMousePos += document.body.scrollTop;
         }
      }
      return [ xMousePos, yMousePos ];
   }
}

if (nn4) { // Netscape
    document.captureEvents(Event.MOUSEOVER);
    document.onmouseover = captureMousePosition;
} else if (iex4) { // Internet Explorer
    document.onmouseover = captureMousePosition;
} else if (nn6) { // Netcsape 6
    document.onmouseover = captureMousePosition;
}
