// Globals
var g_master_progressTimer = null;
var g_master_progressIndicationOn = false;

// Progress indication
function beginProgressIndication()
{
  g_master_progressIndicationOn = true;
  master_beginModal();
  g_master_extmodBlock.show();    
  g_master_progressTimer = setTimeout( "master_showProgressIndicator()", 500 );      
}
function endProgressIndication()
{
  if ( null != g_master_progressTimer )
  {
    clearTimeout( g_master_progressTimer );
    g_master_progressTimer = null;
    g_master_extmodBlock.hide();
  }
  else
    g_master_extmodProgress.hide();
  master_endModal();
  g_master_progressIndicationOn = false;
}
function master_showProgressIndicator()
{
  g_master_extmodBlock.hide();
  g_master_extmodProgress.show();  
  g_master_progressTimer = null;
}
function master_beginModal()
{
  g_master_divHeaderContainer.style.visibility = "hidden";
}
function master_endModal()
{
  g_master_divHeaderContainer.style.visibility = "";
}