function setCoverColorAndMargin(){
  var browser = navigator.appName;
  var coverStyle = new Array();
  if (browser == 'Netscape'){
    coverStyle[0] = 'background-color:#F7F4DD;opacity:0.7;';
    coverStyle[1] = $('calendar').getStyle('margin-left');
  }else{
    coverStyle[0] = 'background-color:#F7F4DD;filter: alpha(opacity = 70);';
    coverStyle[1] = '0px';
  }
  return coverStyle;
}

function buildCalendarCover(){
  var coverStyle = setCoverColorAndMargin();
  var height = $('calendar').getHeight();
  var width = $('month').getWidth();
  var cover = Builder.node(
      'div', {id: 'cover', style: 'margin-top:15px;  margin-left:'+coverStyle[1]+'; text-align: center; position: absolute; z-index:99999; width: '+width+'px; height:'+height+'px;'+ coverStyle[0] +'background-image: url("/extension/ezcalendar/design/standard/images/ajax_loading.gif"); background-repeat:no-repeat; background-position:center;'}
  );
  $('calendar-cover').appendChild(cover);
}

function removeCalendarCover(){
  $('cover').remove();
}