function checkInfo(frmObject){
  with (frmObject){
  
    if (!chkCRLDate(frmObject)){
      return false;
    }

    sy.value = year[year.selectedIndex].text;
    sm.value = month[month.selectedIndex].text; 
    sd.value = day[day.selectedIndex].text; 
    st.value = time[time.selectedIndex].value; 
    dt.value = time[time.selectedIndex].text; 
    document.forms[0].submit();
    return true;
  }
}
function showYearSel(frmObject){
  with (frmObject){
    var dt=new Date();
    var dy=dt.getFullYear();
    if (dy<2008)
       dy=2008;

    for (loopi=dy;loopi>=2001;loopi--)
    {
     if (loopi==dy)
       document.write("<option selected>" + loopi + "</option>");
     else 
       document.write("<option>" + loopi + "</option>");
    }
  }
}

function showMDSel(frmObject, NoOfSel){
  with(frmObject){
     for (loopi=1;loopi<=NoOfSel;loopi++)
     {
       if (loopi==1)
          document.write("<option selected>0" + loopi + "</option>");
       else 
          if (loopi>=10)
             document.write("<option>" + loopi + "</option>");
          else
             document.write("<option>0" + loopi + "</option>");
     }
  }
}

function chkCRLDate(frmObject){
  with (frmObject){
    var today = new Date();
    ty = today.getYear();
    ty = ( ty >= 2000 ? ty : ty + 1900 );
    tm = today.getMonth()  + 1;
    td = today.getDate();
    yy = year[year.selectedIndex].text;
    yy = parseInt(yy);
    mm = parseInt(month[month.selectedIndex].text,10);
    dd =parseInt(day[day.selectedIndex].text,10);
    tt =time[time.selectedIndex].value;

    var maxDay = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
    if (mm == 2) {
     if ((yy % 4) == 0) {
          if (((yy % 100) != 0) || ((yy % 400) == 0)) {
              maxDay[1] = 29
          }
     }
    }

    if ([mm - 1]>11 || [mm - 1]<0 ) {
     return false;
    }
    if (!(maxDay[mm - 1] >= dd)) {
       alert("Invalid Generation Date of CRL! Please select the correct date!");
       day.focus();
       return false;
    }

    if (yy > ty) {
       alert("Invalid Year of Generation Date! Please select the correct Year!");
       year.focus();
       return false;
    }
    return true;
  }
}

