// Bildinformationen
var     imgURL          = "../img/pfeilup7.gif"
var     imgWidth        = 72    // Breite
var     imgHeight       = 25    // Hoehe

// Intervall fuer Positionspruefung in ms
var     posInterval     = 25

// Extraabstaende
var     extraX          = 60    // Abstand fuer vertikalen Rollbalken
var     extraY          = 60    // Abstand fuer horizontalen Rollbalken

// Position
var     wPosition       = 3     // 1: oben links, 2: oben rechts, 3: unten rechts, 4: unten links

// Zentrieren des Hintergrundbilds
function positionierung()
{
        var     ntop
        var     nleft

        if(document.Marke)
        {
                with(document.Marke)
                {
                        ntop    = window.pageYOffset
                        nleft   = window.pageXOffset
                        if(wPosition == 3 || wPosition == 4)
                                ntop    += innerHeight - imgHeight
                        if(wPosition == 2 || wPosition == 3)
                                nleft   += innerWidth - imgWidth
                        if(scrollbars.visible)
                        {
                                if(wPosition == 3 || wPosition == 4)
                                        ntop    -= extraX
                                if(wPosition == 2 || wPosition == 3)
                                        nleft   -= extraY
                        }
                        if(ntop != top || nleft != left)
                        {
                                top     = ntop
                                left    = nleft
                        }
                }
        }
        else if(Marke)
        {
                with(Marke)
                {
                        ntop    = document.body.scrollTop
                        nleft   = document.body.scrollLeft
                        if(wPosition == 3 || wPosition == 4)
                                ntop    += Number(document.body.clientHeight) - imgHeight
                        if(wPosition == 2 || wPosition == 3)
                                nleft   += Number(document.body.clientWidth) - imgWidth
                        if(ntop != style.top || nleft != style.left)
                        {
                                style.top       = ntop
                                style.left      = nleft
                        }
                }
        }
        else
                return
}

// Initialisierung der Darstellung
function init()
{
        if(document.Marke)
                with(document.Marke.document)
                {
                        open("text/html")
                        write("><A HREF=\"#top\" onClick=\"positionierung(); return true\"><IMG SRC=\"" + imgURL + "\" " +
                                "BORDER=0 " +
                                "WIDTH=" + imgWidth + " " +
                                "HEIGHT=" + imgHeight + " ALT=\"Seitenanfang\"></A>")
                        close()
                        width   = imgWidth
                        height  = imgHeight
                }
        else if(Marke)
                with(Marke)
                {
                        innerHTML       = "<A HREF=\"#top\" onClick=\"positionierung(); return true\"><IMG SRC=\"" + imgURL + "\" " +
                                        "BORDER=0 " +
                                        "WIDTH=" + imgWidth + " " +
                                        "HEIGHT=" + imgHeight + " ALT=\"Seitenanfang\"></A>"
                        style.width     = imgWidth
                        style.height    = imgHeight
                }
        else
                return
        positionierung()
        if(document.Marke)
                document.Marke.visibility       = "show"
        else
                Marke.visibility        = "visible"
        setInterval("positionierung()", posInterval)
}

