today      = new Date;
thisYear   = today.getFullYear() ;
thisMonth  = today.getMonth() + 1;
thisDate   = today.getDate();

myYear     = new Array(18);
myMonth    = new Array(18);
myDate     = new Array(18);

month      = new Array(13)
  month[1] = "januari"
  month[2] = "februari"
  month[3] = "maart"
  month[4] = "april"
  month[5] = "mei"
  month[6] = "juni"
  month[7] = "juli"
  month[8] = "augustus"
  month[9] = "september"
  month[10]= "oktober"
  month[11]= "november"
  month[12]= "december"


  monthArray = new Array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
  maxDays    = monthArray[thisMonth-1];

  if (thisMonth==2) {
    if ((thisYear/4)!=parseInt(thisYear/4)) maxDays=28;
    else maxDays=29;
    }

 
myYear[0]  = thisYear;
myMonth[0] = thisMonth;
myDate[0]  = thisDate;

for(i = 0 ; i < 129 ; i++){
  if (myMonth[i] != 12){
    if (myDate[i] != maxDays){
      myMonth[i+1] = myMonth[i]
    }
    else {
      myMonth[i+1] = myMonth[i] + 1
    }
    myYear[i+1] = myYear[i]
  }
  else {
    if (myDate[i] != maxDays){
      myMonth[i+1] = myMonth[i]
      myYear[i+1] = myYear[i]
    }
    else {
      myMonth[i+1] = 1
      myYear[i+1] =myYear[i] + 1
    }
  }

  if (myDate[i] != maxDays) {
    myDate[i+1] = (myDate[i] + 1)
  }
  else {
    myDate[i+1] = 1
  }
}

document.write("<SELECT NAME='datum' SIZE=1>");
for(j = 4 ; j < 130 ; j++) {
  document.write("<OPTION VALUE=" + myDate[j] + "-" + month[myMonth[j]] + "-" + myYear[j]);
  if (j == 4) {
    document.write(" SELECTED");
  }
  myDate[j] = "" + myDate[j];
  if (myDate[j].length == 1) {
    myDate[j] = "0" + myDate[j];
  }
  document.write(">");
  document.write(myDate[j] + " " + month[myMonth[j]] + " " + myYear[j]);
}
document.write("</SELECT>");

