
var ProgressShowInfo = function(message)
{	
    alerter.block();	
    var divProgress = $get("divProgress");   
    
    ProgressCenter(divProgress);
    
    if(message == null || message == '')
    {
        message = "Processing, please wait...";
    }
    
	write($get("spnProgressInfo"),message);		 
}
var ProgressHideInfo = function()
{
    var divProgress = $get("divProgress");   
	divProgress.style.display = "none";		
	alerter.unblock();
}

function ProgressCenter(divProgress)
{
   
    var mainBody = $get('aspnetForm'); 
    var mainBodyBounds = Sys.UI.DomElement.getBounds(mainBody);   
    //divProgress.style.display = 'block';        
    //divProgress.style.display = '';
    var control = new Sys.UI.Control(divProgress);
    control.set_visible(true);
    divProgress.focus();
    var divProgressBounds = Sys.UI.DomElement.getBounds(divProgress);
    
    var x = mainBodyBounds.x + Math.round(mainBodyBounds.width / 2) - Math.round(divProgressBounds.width / 2);
    var y = mainBodyBounds.y + Math.round(mainBodyBounds.height / 2) - Math.round(divProgressBounds.height / 2);  
    Sys.UI.DomElement.setLocation(divProgress, x, y);        
}