<!-- Begin

Now = new Date();
NowDay = Now.getDate();
Month = Now.getMonth();
NowYear = Now.getFullYear();
NowMonth = SortMonth(Month, NowYear);

//function for sorting out the years
function SortMonth(Month, NowYear)
{
	var SortMonth = Month;
	if (NowYear == 2008) SortMonth = Month;
	return SortMonth;
}

//function for returning how many days there are in a month including leap years
function DaysInMonth(WhichMonth)
{
  var DaysInMonth = 31;
  if (WhichMonth == "Apr 2007" || WhichMonth == "Jun 2007" || WhichMonth == "Sep 2007" || WhichMonth == "Nov 2007" || WhichMonth == "Apr 2008" || WhichMonth == "Jun 2008" || WhichMonth == "Sep 2008" || WhichMonth == "Nov 2008") DaysInMonth = 30;
  if (WhichMonth == "Feb 2007")	DaysInMonth = 28;
  if (WhichMonth == "Feb 2008")	DaysInMonth = 29;
  return DaysInMonth;
}

//function to change the available days in a months
function ChangeOptionDays()
{
  DaysObject = eval("document.aform.day");
  MonthObject = eval("document.aform.monthyear");

  Month = MonthObject[MonthObject.selectedIndex].text;

  DaysForThisSelection = DaysInMonth(Month);
  CurrentDaysInSelection = DaysObject.length;
  if (CurrentDaysInSelection > DaysForThisSelection)
  {
    for (i=0; i<(CurrentDaysInSelection-DaysForThisSelection); i++)
    {
      DaysObject.options[DaysObject.options.length - 1] = null
    }
  }
  if (DaysForThisSelection > CurrentDaysInSelection)
  {
    for (i=0; i<(DaysForThisSelection-CurrentDaysInSelection); i++)
    {
		  
      NewOption = document.createElement('option');
	  NewOption.text = DaysObject.options.length + 1;
	  NewOption.value = DaysObject.options.length + 1;
	  
	  try {
    DaysObject.add(NewOption, null); // standards compliant; doesn't work in IE
  }
  catch(ex) {
    DaysObject.add(NewOption); // IE only
  }
      
    }
  }
    if (DaysObject.selectedIndex < 0) DaysObject.selectedIndex == 0;
}

//function to set options to today
function SetToToday()
{
    /*
  DaysObject = eval("document.aform.day");
  MonthObject = eval("document.aform.monthyear");

  MonthObject[NowMonth].selected = true;

  ChangeOptionDays();

  DaysObject[NowDay-1].selected = true;
  
  this.aform=document.getElementById('aform');
  aform.alldates.checked = false;
  */
}
//  End -->