function getPageCoords (element) {
    var coords = {
        x: 0,
        y: 0
    };

    do {
        if(element.currentStyle)
        {
            if(element.currentStyle.position!='relative')
            {
                coords.x += element.offsetLeft;
                coords.y += element.offsetTop;
            }
        }
        else
        {
            coords.x += element.offsetLeft;
            coords.y += element.offsetTop;
        }

        element = element.offsetParent;
    }
    while (element)
    return coords;
}

//Funktion zum Zoomen der Bilder
function showZoomPic(element, imgsrc) {
    var coords = getPageCoords(element);

    document.getElementById("pic_zoom_pic").src = eval(imgsrc + ".src");
    var picwidth = document.getElementById("pic_zoom_pic").offsetWidth;
    var picheight = document.getElementById("pic_zoom_pic").offsetHeight;

    document.getElementById("pic_zoom_layer").style.left = (coords.x + element.offsetWidth / 2) - picwidth / 2;
    document.getElementById("pic_zoom_layer").style.top = (coords.y + element.offsetHeight / 2) - picheight / 2;
    document.getElementById("pic_zoom_layer").style.visibility = "visible";
}

function hideZoomPic() {
    document.getElementById("pic_zoom_layer").style.visibility = "hidden";
}



