﻿function ShowOverlay_Click() {
    try {
        var overlay, content, value, busyGraphic, overlayWidth, overlayHeight, overlayTop, overlayLeft;
        //overlay = $('#overlay');
        overlay = document.getElementById('overlay');
        content = document.getElementById('pp_wrapper');
        //content = $('#mainContent');

        //set the location of the overlay
        overlayHeight = content.offsetHeight;
        overlay.style.height = overlayHeight + 'px';

        overlayWidth = content.offsetWidth;
        overlay.style.width = overlayWidth + 'px';


        overlayTop = content.offsetTop + 1;
        overlay.style.top = overlayTop + 'px';

        overlayLeft = content.offsetLeft + 1;
        overlay.style.left = overlayLeft + 'px';

        //set the position of the image
        //note the height & width of the graphic is 84px
        busyGraphic = document.getElementById('overlay_busy');

        value = (overlayWidth - 84) / 2;
        busyGraphic.style.left = value + 'px';


        value = (overlayHeight - 84) / 2;
        busyGraphic.style.top = value + 'px';

        overlay.style.display = 'block';
    }
    catch (err) {
        alert(err.toString());
    }
}

function HideOverlay_Click() {
    document.getElementById('overlay').style.display = 'none';
}

function HideInfo_Click() {
    document.getElementById('infoBox').style.display = 'none';
}

function ShowInfo_Click(event,ind) {
   try { var infobox = document.getElementById('infoBox');
    //infobox.style.top = event.clic
    jQuery('.infoBox_content').hide();
    jQuery('.event_'+ind).show();
    infobox.style.top = event.clientY + document.body.scrollTop + document.documentElement.scrollTop - 20 + "px";
    infobox.style.left = event.clientX - 380 + "px";
    infobox.style.display = 'block';
   } catch (exception){alert(exception.toString());}
			
}
