   function AskPreSelectAccts(){
     var AActGrpName=document.CTSelectGroupAcctsPage.IsNewGroup.value;
     //alert(AActGrpName);
     if (AActGrpName=="true")
       return(0);
     AActGrpName=document.CTSelectGroupAcctsPage.GroupsList.options[document.CTSelectGroupAcctsPage.GroupsList.selectedIndex].text;
     var UserResult = 1;
     //confirm("Are you sure you want to pre-select the accounts from the Scheduled report : " + AActGrpName + "?.");
     //alert(UserResult);
     if(UserResult=="0")
       return(1);
   }

  function DoEditFilter(FilterNo){
    document.CTSelectGroupAcctsPage.CurrFilterNo.value=FilterNo;
  //alert('g');
    __doPostBack('ChangeFilterBtn', 'CLICK');
  }

  function DoDeleteFilter(FilterNo){
    document.CTSelectGroupAcctsPage.CurrFilterNo.value=FilterNo;
    __doPostBack('DeleteFilterBtn', 'CLICK');
  }

   function DoClosePage(){
     //alert("DoClosePage()");
     window.opener.RefreshPage();
     //window.opener.location.reload();
     window.close();
   }


      function InitializeHiddenVars(){
        if (document.CTSelectGroupAcctsPage.CloseAndExit!=null){
          if (document.CTSelectGroupAcctsPage.CloseAndExit.value=="true")
              DoClosePage();
        }
        window.focus();
      }
      
   function AskDeleteGroup(){
     var AActGrpName=document.CTSelectGroupAcctsPage.GroupsList.options[document.CTSelectGroupAcctsPage.GroupsList.selectedIndex].value;
     if (AActGrpName=="NoGroupsSelected")
       return(1);
     AActGrpName=document.CTSelectGroupAcctsPage.GroupsList.options[document.CTSelectGroupAcctsPage.GroupsList.selectedIndex].text;
     var UserResult = confirm("Are you sure you want to delete the account Group : " + AActGrpName + "?.");
     //alert(UserResult);
     if(UserResult=="0")
       return(1);
   }

