	//set todays date
	Now = new Date();
	NowDay = Now.getDate();
	NowMonth = Now.getMonth();
	NowYear = Now.getYear();
	if (NowYear < 2000) NowYear += 1900; //for Netscape
	//function for returning how many days there are in a month including leap years
	function DaysInMonth(WhichMonth, WhichYear)
	{
	  var DaysInMonth = 31;
	  if (WhichMonth == "3" || WhichMonth == "5" || WhichMonth == "8" || WhichMonth == "10") DaysInMonth = 30;
	  if (WhichMonth == "1" && (WhichYear/4) != Math.floor(WhichYear/4))	DaysInMonth = 28;
	  if (WhichMonth == "1" && (WhichYear/4) == Math.floor(WhichYear/4))	DaysInMonth = 29;
	  return DaysInMonth;
	}
	//function to change the available days in a months
	function ChangeOptionDays(DaysObject,Month,Year)
	{
	  DaysForThisSelection = DaysInMonth(Month, Year);
	  CurrentDaysInSelection = DaysObject.length;
	  if (CurrentDaysInSelection > DaysForThisSelection)
	  {
		for (i=1; i<=(CurrentDaysInSelection-DaysForThisSelection); i++)
		{
		  DaysObject.options[DaysObject.options.length - 1] = null
		}
	  }
	  if (DaysForThisSelection > CurrentDaysInSelection)
	  {
		for (i=1; i<=(DaysForThisSelection-CurrentDaysInSelection); i++)
		{
		  NewOption = new Option(DaysObject.options.length + 1);
		  DaysObject.add(NewOption);
		}
	  }
		if (DaysObject.selectedIndex < 1) DaysObject.selectedIndex == 1;
	}
	//function to write option years plus x
	function WriteYearOptions(from,to)
	{
	  if (from==0){
	  	from=NowYear;
		to=NowYear + 50;
	  }
	  line = "";

	  for (i=from; i<=to; i++)
	  {
		line += "<OPTION VALUE=" + (i) + ">" + i;
	  }
	  return line;
	}