 var x =0;
 var xx=0;
 var yy=20;
 var y = 0;
 var showit = 0;
 var wid=0;
 var hei=0;

    // Welchen Browser haben wir denn...
    // ----------------------------------
    ns = (document.layers)? true:false
    ie4 = (document.all)? true:false
    ie5 = true;
    if (ie4) {
     if (navigator.userAgent.indexOf('MSIE 5')>0) {
      ie5 = true;
     }
    }

   // Welche Plattform? bei IE auf MAC keine popi-Fenster

 if ( navigator.platform.substring(0,3).toUpperCase() == "MAC" && (ie4 || ie5) )
 {
    mac = true;
    } else {
    mac = false;
    }

    if ( (ns) || (ie4) ) {
     if (ns) over = document.popDiv
     if (ie4) over = popDiv.style
     document.onmousemove = mouseMove
     if (ns) document.captureEvents(Event.MOUSEMOVE)
    }

    function wtl(txt) {
     if (ns) {
      var lll = document.popDiv.document
      lll.write(txt)
      lll.close()
     } else {
      if (ie4) document.all["popDiv"].innerHTML = txt
     }
    }

    function show(obj) {
     if (ns) obj.visibility = "show"
     else if (ie4) obj.visibility = "visible"
    }

    function hide(obj) {
     if (ns) obj.visibility = "hide"
     else if (ie4) obj.visibility = "hidden"
    }

    function moveTo(obj,lx,ly) {
     obj.left = lx
     obj.top = ly
    }

    function hideit() {
     if (mac) {
        return;
     }
     if ( (ns) || (ie4) )  {
        showit = 0;
        hide(over);
     }
    }

    // Popup zusammenbasteln
    // ---------------------
    function rpopi(content,image) {
        if(image=='1') {
            //if(y) y=0;
            //if(x) x=0;
            txt = "<TABLE BORDER=0 CELLPADDING=2 CELLSPACING=0 BGCOLOR=\"#000000\"><TR><TD><image src=\""+content+"\"></TD></TR></TABLE>"
        } else {
            if(!yy) yy=-10;
            if(!xx) xx=10;
            hei = (hei>0) ? " height=\""+hei+"\"" : "";
            wid = (wid>0) ? " width=\""+wid+"\"" : " width=\"220\"";
            txt = "<table border=0 bgcolor=D27E00><tr><td><TABLE BORDER=0 CELLPADDING=3 CELLSPACING=1 BGCOLOR=\"#D27E00\""+wid+hei+"><TR><TD BGCOLOR=\"#D27E00\" VALIGN=\"TOP\"><img src=\"pictures/d/help_icon.gif\"></TD><TD BGCOLOR=\"#FFF8D2\">"+content+"</TD></TR></TABLE></td></tr></table>"
        }
        wtl(txt);
     display_it();
    }

    function popi(i,xm,content,image,w,h) {
     if (mac) {return;}
     xx=i;
     yy=xm;
     wid=(w) ? w : 0;
     hei=(h) ? h : 0;
     rpopi(content,image);
    }

    // ...und jetzt anzeigen
    // ---------------
    function display_it() {
     if ( (ns) || (ie4) ) {
      if (showit == 0)  {
       moveTo(over,x+xx,y+yy);
       show(over);
       showit = 1;
      }
     }
    }

    // Auf mousemoves reagieren
    // -----------------------
    function mouseMove(e) {
     if (ns) {x=e.pageX; y=e.pageY;}
     if (ie4) {x=event.x; y=event.y;}
     if (ie5) {x=event.x+document.body.scrollLeft; y=event.y+document.body.scrollTop;}
     if (showit) {
      moveTo(over,x+xx,y+yy);
     }
    }
