function changeCalendarType(type) {
      document.filters.calendarType.value=type;
      $('calendar').setAttribute("lang", type);
      $$('#calendar_popup li > a').each(function(index) {
      if (index.getAttribute("lang") == type) {
          $('calendar').innerHTML = index.innerHTML;
      };
      });
      if (type == 0) {
          $('allId').show();
          $('insuranceId').hide();
          $('taxId').hide();
          document.filters.normative.value=$('normative_all').getAttribute("lang");
      } else if (type == 1) {
          $('insuranceId').show();
          $('taxId').hide();
          $('allId').hide();
          document.filters.normative.value=$('normative_insurance').getAttribute("lang");
      } else if (type == 2) {
          $('insuranceId').hide();
          $('taxId').show();
          $('allId').hide();
          document.filters.normative.value=$('normative_tax').getAttribute("lang");
      }
      $('calendar_popup').toggle();
     }
      function changeNormativeType(type) {
      document.filters.normative.value=type;
      if ($('calendar').getAttribute("lang") == 1) { //Insurance
        $('normative_insurance').setAttribute("lang", type);
        $$('#normative_insurance_popup li > a').each(function(index) {
          if (index.getAttribute("lang") == type) {
              $('normative_insurance').innerHTML = index.innerHTML;
          };
        });
        $('normative_insurance_popup').toggle();
      } else if ($('calendar').getAttribute("lang") == 2) { //Tax
        $('normative_tax').setAttribute("lang", type);
        $$('#normative_tax_popup li > a').each(function(index) {
          if (index.getAttribute("lang") == type) {
              $('normative_tax').innerHTML = index.innerHTML;
          };
        });
        $('normative_tax_popup').toggle();
      } else { //All
        $('normative_all').setAttribute("lang", type);
        $$('#normative_all_popup li > a').each(function(index) {
          if (index.getAttribute("lang") == type) {
              $('normative_all').innerHTML = index.innerHTML;
          };
        });
        $('normative_all_popup').toggle();
      }
     }
     function changeCalendarPage(pageNumber) {
       document.filters.page.value=pageNumber;
       document.filters.submit();
     }
