function tooltip_newelement(newid) { 
 if(document.createElement) { 
  var el = document.createElement('div'); 
  el.id = newid;     
  el.style.display = 'none';
  el.style.position = 'absolute';
  el.innerHTML = '&nbsp;'; 
  document.body.appendChild(el); 
 } 
} 
function tooltip_getmouseposition(e) {
 var offsetx = 12;
 var offsety =  8;
 var ie5 = (document.getElementById && document.all); 
 var ns6 = (document.getElementById && !document.all); 
 var ua = navigator.userAgent.toLowerCase();
 var isapple = (ua.indexOf('applewebkit') != -1 ? 1 : 0);
 if(document.getElementById) {
  var iebody=(document.compatMode && document.compatMode != 'BackCompat') ? document.documentElement : document.body;
  pagex = (isapple==1 ? 0:(ie5)?iebody.scrollLeft:window.pageXOffset);
  pagey = (isapple==1 ? 0:(ie5)?iebody.scrollTop:window.pageYOffset);
  mousex = (ie5)?event.x:(ns6)?clientX = e.clientX:false;
  mousey = (ie5)?event.y:(ns6)?clientY = e.clientY:false;
  var T = document.getElementById('tooltip');
  T.style.left = (mousex+pagex+offsetx) + 'px';
  T.style.top = (mousey+pagey+offsety) + 'px';
 }
}
function tooltip_show(tip) {
 if(!document.getElementById('tooltip')) tooltip_newelement('tooltip');
 var T = document.getElementById('tooltip');
 T.innerHTML = tip;
 T.style.display = 'block';
 document.onmousemove = tooltip_getmouseposition;
}
function tooltip_hide() {
 document.getElementById('tooltip').style.display = 'none';
}
 
document.write('<style type="text/css" >');
document.write('span.tool { position: relative; cursor: pointer; border-bottom: 1px dashed #0000FF; color: #000080; }');
document.write('#tooltip { padding: 5px; background: #C8C8FF; border: 1px solid #909090; text-align: left; font-size: smaller; opacity: 0.9; filter: alpha(opacity=90); }');
document.write('span.tip { cursor: help; border-bottom: 1px dashed #0000FF; color: #000080;  }');
document.write('</style>');



