var thisyear = new Date;
thisyear = thisyear.getYear();
  if (thisyear < 2000) {
  thisyear = 1900 + thisyear;
  }
document.write(thisyear);
