function ValidateDate(dd1,mm1,yy1)
{
	dd=dd1.options[dd1.selectedIndex].value
	mm=mm1.options[mm1.selectedIndex].value
	yy=yy1.options[yy1.selectedIndex].value

	if(mm==02 && yy%4!=0 && dd>=29)
	{
		alert("February has only 28 days for the selected year.");
		mm1.focus();
		return false;
	}
	if(mm==02 && yy%4==0 && dd>29)
	{
		alert("February has only 29 days for the selected year.");
		mm1.focus();
		return false;
	}
	if((mm == 02 || mm==04 ||mm ==06 ||mm == 09 || mm ==11)&&(dd ==31))
	{
		alert("Selected month has only 30 days.");
		mm1.focus();
		return false;
	}
	return true
}