// Tooltips von Oliver Kertesz NOV-2000
// Nicht für MSIE4 und NS4 oder älter!!
// Im BODY Bereich als "JavaScript1.3" einbinden!

// Ebene schreiben
if (document.getElementById)
 document.writeln("<div id=\"tt_tip\" style=\"position: absolute; background: white; border: 1px solid #001573; color: #001573; padding: 3px; font: 12px Arial; visibility: hidden; width: 340px; margin-top:-10px; margin-left: 10px; z-index:100;\"> </div>");

// Ebenentext einsetzen und Ebene sichtbar machen
function tooltip(text){
 if (document.getElementById){  // geht das überhaupt?
  document.getElementById("tt_tip").innerHTML=text;
  document.getElementById("tt_tip").style.visibility="visible";
 }
}

// Ebene unsichtbar machen
function hidetip(){
 if (document.getElementById){
  document.getElementById("tt_tip").style.visibility="hidden";
  document.getElementById("tt_tip").style.top="-200";
  document.getElementById("tt_tip").style.left="-200";
 }
}

// Ebene dauernd auf aktuelle Mausposition bringen
function toolt(Ereignis){
 if (document.getElementById("tt_tip").style.visibility == "visible"){
  if (document.all){  // MSIE5
   document.getElementById("tt_tip").style.left = (window.event.clientX + document.body.scrollLeft);
   document.getElementById("tt_tip").style.top = (window.event.clientY + document.body.scrollTop);
  }
  else {  // Netscape6
   document.getElementById("tt_tip").style.left = (Ereignis.clientX + window.pageXOffset);
   document.getElementById("tt_tip").style.top = (Ereignis.clientY + window.pageYOffset);
  }
 }
}

// Aktualisierungsroutinen bei Ereignissen aufrufen
document.onmouseout = hidetip;
document.onkeypress = hidetip;
document.onmousemove = toolt;

