// JavaScript Document
function autoYear() {
  var time = new Date();
  var year = time.getYear();
 
  if (year < 1900) {
    year = year + 1900;
  }

  var date = year - 100; /*change the '25' to the number of years in the past you want to show */
  var future = year - 18; /*change the '10' to the number of years in the future you want to show */ 

  document.writeln ("<select name='year' id='dob'><option value=\"\">Select Year");
  do {
    date++;
    document.write ("<option value=\"" +date+"\">" +date+ "");
  }
  while (date < future)
  document.write ("</select>");
}
