﻿var PopupPanel;
function ShowProgressBar()
{           
    // make it visible
    PopupPanel.style.display = '';	    
    
    // Gets Bounds for both the window and the popup
    var WindowViewBounds = Sys.UI.DomElement.getBounds(document.documentElement);
    var pnlPopupBounds = Sys.UI.DomElement.getBounds(PopupPanel);
    
    //  determine the top left corner of the Popup
    var x = WindowViewBounds.x + Math.round(WindowViewBounds.width / 2) - Math.round(pnlPopupBounds.width / 2);
    var y = WindowViewBounds.y + Math.round(WindowViewBounds.height / 2) - Math.round(pnlPopupBounds.width / 2);	    

    //	set the progress element to this position
    Sys.UI.DomElement.setLocation(PopupPanel, x, y);           
}
function HideProgressBar() 
{
    PopupPanel.style.display = 'none';
}            
