<!--
function strtodate(str) {
  var returndate = new SuperDate();
  if(matches = str.match(/^(\d+)\D(\d+)(\D(\d+))?$/)) {
    if(matches[1].length == 4 && matches[4]) {
      var year = "" + matches[1];
      var month = "" + matches[2];
      var date = "" + matches[4];
    }
    else {
      var year = "" + matches[4];
      var month = "" + matches[1];
      var date = "" + matches[2];
    }

    if(year.length == 2) {
      year *= 1;
      var current_year = (1 * (new String(returndate.getYear()).substr(2)));
      var current_century = (1 * (new String(returndate.getYear()).substr(0, 2)));

      if(current_year < 50)
        var century = current_century + (year >= 0 && year <= current_year + 49 ? 0 : -1);
      else if(current_year > 50)
        var century = current_century + (year >= current_year - 50 && year <= 99 ? 0 : 1);
      else
        var century = current_century;

      returndate.setYear((century * 100) + year);
    }
    else if(year.length == 4) {
      returndate.setYear(1 * year);
    }
    returndate.setMonth(month - 1);
    returndate.setDate(1 * date);
    returndate.setMonth(month - 1);
  }
  else {
    returndate.setTime(0);
  }

  return returndate;
}
-->
