/* Zbox stylez */
lightbox = {
    updateheight: function() {
        if (window.innerHeight && window.scrollMaxY) {
            var yWithScroll = window.innerHeight + window.scrollMaxY;
            var lightBoxOverlayHeight = yWithScroll;
        } else {
            var yWithScroll = document.body.scrollHeight;
            var yHeight = document.body.clientHeight;
            var lightBoxOverlayHeight = yWithScroll + yHeight;
        }
        e = $("lightBoxOverlay");
        e.style.height = lightBoxOverlayHeight + 'px';
    },
    showPanel: function(containerId) {
        util.show(containerId);
        lightbox.updateheight();
    },
    show: function(containerId) {
        obj = $(containerId);
        if (!obj) return;
        obj.style.display = 'block';
        
        var whatsTheWidth = (obj.offsetWidth) / 2;
        obj.style.marginLeft = '-' + whatsTheWidth + 'px';

        var whatsTheHeight = (obj.offsetHeight) / 2;
        obj.style.marginTop = '-' + whatsTheHeight + 'px';

        lightbox.showPanel('lightBoxOverlay');
    },
    hidePanel: function(containerId) {
        util.hide(containerId);
    },
    hide: function() {
        lightbox.hidePanel('lightBox');
        lightbox.hidePanel('lightBoxOverlay');
    }
};