//Checks is the date is ok.
function validDOB(text)
{
  if (text.match(/^(0[1-9]|[12][0-9]|3[01])[\/-](0[1-9]|1[012])[\/-](19)\d\d$/) || text.match(/^(0[1-9]|[12][0-9]|3[01])[\/-](0[1-9]|1[012])[\/-]\d\d$/) || text.match(/^[1-9][\/-](0[1-9]|1[012])[\/-]\d\d$/) || text.match(/^[1-9][\/-](0[1-9]|1[012])[\/-](19)\d\d$/) || text.match(/^[1-9][\/-][1-9][\/-]\d\d$/) || text.match(/^[1-9][\/-][1-9][\/-](19)\d\d$/) || text.match(/^(0[1-9]|[12][0-9]|3[01])[\/-][1-9][\/-](19)\d\d$/) || text.match(/^(0[1-9]|[12][0-9]|3[01])[\/-][1-9][\/-]\d\d$/))
  {
    return true;
  }
  else
  {
	return false;
  }
}