function change_date(cresel)
{
  if (cresel.selectedIndex == 0) {
    cresel.selectedIndex = 1;
  }
}

function cre_mod_change(opt)
{
  if (opt == "cre") {
    document.ngmform.moddatebgn.checked = false;
  } else if (opt == "mod") {
    document.ngmform.credatebgn.checked = false;
  }
  if (document.ngmform.moddatebgn.checked ||
      document.ngmform.credatebgn.checked) {
    if ((document.ngmform.cmdaybgn.selectedIndex == -1) ||
        (document.ngmform.cmdaybgn.selectedIndex == 0)) {
      document.ngmform.cmdaybgn.selectedIndex = 1;
    }

    if ((document.ngmform.cmmonbgn.selectedIndex == -1) ||
        (document.ngmform.cmmonbgn.selectedIndex == 0)) {
      document.ngmform.cmmonbgn.selectedIndex = 1;
    }

    if ((document.ngmform.cmyrbgn.selectedIndex == -1) ||
        (document.ngmform.cmyrbgn.selectedIndex == 0)) {
      document.ngmform.cmyrbgn.selectedIndex = 1;
    }
  } else {
    document.ngmform.cmdaybgn.selectedIndex = 0;
    document.ngmform.cmmonbgn.selectedIndex = 0;
    document.ngmform.cmyrbgn.selectedIndex = 0;
  }
}
