
var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0

var initialize = 0
var Ex, Ey, ContentInfo
var rot = "#FF4444"     <!-- rot //-->
var pin = "#FF44FF"     <!-- pink //-->
var tur = "#44FFFF"     <!-- turq //-->
var grü = "#44FF44"     <!-- grün //-->
var gel = "#FFFF44"     <!-- gelb //-->
var ora = "#FF8800"     <!-- orange //-->
var bla = "#4444FF"     <!-- blau //-->

<!-- zusätzliche farben für expo //-->
var bra = "#C08040"     <!-- braun //-->
var gra = "#888888"     <!-- grau //-->
var wei = "#FFFFFF"     <!-- weiss //-->

if(ns) { doc = "document."; sty = "" ; }

if(ie) { doc = "document.all." ; sty = ".style" ; Ex = "event.x" ; Ey = "event.y" ; }
if(ns) { doc = "document." ; sty = "" ;           Ex = "e.pageX" ; Ey = "e.pageY" ; 
         window.captureEvents(Event.MOUSEMOVE) ;  window.onmousemove=overhere ; }

function MoveToolTip(layerName, FromTop, FromLeft, e) {
   if(ie) { eval(doc + layerName + sty + ".top = "  + (eval(FromTop) + document.body.scrollTop)) ; }
   if(ns) { eval(doc + layerName + sty + ".top = "  +  eval(FromTop)) ; }
   eval(doc + layerName + sty + ".left = " + (eval(FromLeft) + 15)) ; }

function ReplaceContent(layerName) {
   if(ie) { document.all[layerName].innerHTML = ContentInfo ; }
   if(ns) { with(document.layers[layerName].document) 
             { open() ; write(ContentInfo); close(); } }           }

function Activate()   { initialize=1 ; }
function deActivate() { initialize=0 ; }

function overhere(e) {
   if(initialize) { MoveToolTip("ToolTip", Ey, Ex, e) ;
                    eval(doc + "ToolTip" + sty + ".visibility = 'visible'") ; }
   else { MoveToolTip("ToolTip", 0, 0) ;
          eval(doc + "ToolTip" + sty + ".visibility = 'hidden'") ; }               }

function EnterContent(layerName, TTitle, TContent, TColor) { 
switch(TColor) {
   case "rot": TColor=rot; break; 
   case "pin": TColor=pin; break; 
   case "tur": TColor=tur; break; 
   case "grü": TColor=grü; break; 
   case "gel": TColor=gel; break; 
   case "ora": TColor=ora; break; 
   case "bla": TColor=bla; break; 
   case "bra": TColor=bra; break; 
   case "gra": TColor=gra; break; 
   case "wei": TColor=wei; break; }
TTitle = 'geschützter Teilbereich';
TContent = 'Zugang nur mit Userid und Passwort';

ContentInfo = '<table cellspacing="1" cellpadding="0" width="100" border="0" bgcolor="'+TColor+'">'+
   '<tr><td width="100%" bgcolor="'+TColor+'" align="center">'+
   '<div style="color:#000000; font-size:8pt; font-family:Tahoma;"><b>'+TTitle+'</div></td></tr>'+
   '<tr><td width="100%" bgcolor="#000000" align="center">'+
   '<div style="color:'+TColor+'; font-size:8pt; font-family:Tahoma;">'+TContent+'</div></td></tr>'+
   '</table>' ;
ReplaceContent(layerName) ;                                }

