﻿var bv_anthem_count = 0;
function Anthem_PreCallBack() { 
    bv_anthem_count++;
    setTimeout("CallBackStarted()", 500); 
}
function Anthem_PostCallBack() { CallBackFinished(); }

function CallBackStarted() {
  if (bv_anthem_count > 0){  
    var item = document.getElementById('wait');
    if (item != null) {
        if ((!window.XMLHttpRequest) && (document.documentElement)) {
            item.style.position = 'absolute';
            //code to make ie6 behave
            if (document.documentElement.scrollTop) {
                item.style.top = document.documentElement.scrollTop + 15;
            }
            else { item.style.top = 15; }
            item.style.right = 15;
        }
        item.style.display = 'block';
    } 
  }
}
 
function CallBackFinished(){
  bv_anthem_count--;
  if (bv_anthem_count == 0){
    var item = document.getElementById('wait');
    if (item != null){
        item.style.display = 'none';
    }
  }
}
