﻿/* Zbox stylez */
function changeheight() {
    if (window.innerHeight && window.scrollMaxY) {
        var yWithScroll = window.innerHeight + window.scrollMaxY;
        var lightBoxOverlayHeight = yWithScroll;
    } else {
        //this really needs some attention
        var yWithScroll = document.body.scrollHeight;
        //var yHeight = document.body.clientHeight;
        var lightBoxOverlayHeight = yWithScroll;
    }
    e = MM_findObj("lightBoxOverlay");
    e.style.height = lightBoxOverlayHeight + 'px';
    //alert(yWithScroll);
    //alert(e.style.height);
}
function showLB(containerId) {
    obj = MM_findObj(containerId);
    if (!obj) return;
    obj.style.display = 'block';
    changeheight();
}
function showLBMain(containerId) {
    obj = MM_findObj(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';*/

    showLB('lightBoxOverlay');
}
function hideLB(containerId) {
    obj2 = MM_findObj(containerId)
    if (!obj2) return;
    obj2.style.display = 'none';
}
function hideAll() {
    ;
    hideLB('lightBox');
    hideLB('lightBox2');
    hideLB('lightBoxOverlay');
}



