  </div>
  </td>
  </tr>
  </table>

  <script type="text/javascript">

  // textbox highlighting functions..

  function hiLite(me) {
    me.style.backgroundColor = "#ffffc0";
  }

  function loLite(me) {
    me.style.backgroundColor = "#ffffff";
  }

  // accept numeric (0-9) only..

  function integerOnly() {
    var key = window.event.keyCode;
    if (key > 47 && key < 58)
      return;
    else
      window.event.returnValue = null; 
  }

  // accept numeric (0-9) and decimal (.)..

  function decimalOnly() {
    var key = window.event.keyCode;
    if ( (key > 47 && key < 58) || key == 46 )
      return;
    else
      window.event.returnValue = null; 
  }

  // accept numeric (0-9) and colon (:)..

  function timeOnly() {
    var key = window.event.keyCode;
    if (key > 47 && key < 59)
      return;
    else
      window.event.returnValue = null; 
  }

  // accept numeric (0-9) and dash (-) or /..

  function dateOnly() {
    var key = window.event.keyCode;
    if ( (key > 47 && key < 58) || key == 45 || key == 47 )
      return;
    else
      window.event.returnValue = null; 
  }

  // accept numeric (0-9) and dash (-)..

  function nricOnly() {
    var key = window.event.keyCode;
    if ( (key > 47 && key < 58) || key == 45 )
      return;
    else
      window.event.returnValue = null; 
  }

  // alphanumeric only and lowercase (a-z,0-9)..

  function alphanumericOnly() {
    var key = window.event.keyCode;
    if ( (key > 47 && key < 58) || (key > 96 && key < 123) )
      return;
    else
      window.event.returnValue = null; 
  }

  // check if numeric..

  function isNumeric(input) {
    return (input-0) == input && input.length > 0;
  }

  function isValidTimeHHmm(timeval) {
    if (timeval!="") {
      //var re = new RegExp('([0-1][0-9]|2[0-3]):[0-5][0-9]$');
      var re = /([0-1][0-9]|2[0-3]):[0-5][0-9]$/;
      //var m = re.exec(timeval);
      //if (m == null) {
      if (re.test(timeval)) {
        return true;	//false;
      } else {
        return false;	//true;
      }
    } else {
      return true;
    }
  }

  function isValidTime(timeval) {
    if (timeval!="") {
      //var re = new RegExp('([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$');
      var re = /([0-1][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/;
      //var m = re.exec(timeval);
      //if (m == null) {
      if (re.test(timeval)) {
        return true;	//false;
      } else {
        return false;	//true;
      }
    } else {
      return true;
    }
  }

  function isValidDate(dateval) {
    if (dateval!="") {
      var re = /(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/;
      //var m = re.exec(dateval);
      //if (m == null) {
      //if (dateval.match(re)!=null) {
      if (re.test(dateval)) {
        return true;	//false;
      } else {
        return false;	//true;
      }
    } else {
      return true;
    }
    /*
      if ($3 == 31 and ($2 == 4 or $2 == 6 or $2 == 9 or $2 == 11)) {
        return 0; # 31st of a month with 30 days
      } elsif ($3 >= 30 and $2 == 2) {
        return 0; # February 30th or 31st
      } elsif ($2 == 2 and $3 == 29 and not ($1 % 4 == 0 and ($1 % 100 != 0 or $1 % 400 == 0))) {
        return 0; # February 29th outside a leap year
      } else {
        return 1; # Valid date
      }
    */
  }

  </script>
