function fncDateCheck(strDC_ElementName) {
	//alert("date check running...")
	intDay   = document.getElementById(strDC_ElementName+"Day").value;
	strMonth = document.getElementById(strDC_ElementName+"Month").value;
	intYear  = document.getElementById(strDC_ElementName+"Year").value;
	//alert("using " + intDay + strMonth + intYear)
	intReminder = (intYear % 4);
	if ((strMonth == "4") || (strMonth == "5") || (strMonth == "9") || (strMonth == "11")) 
		{
			if	(intDay > 30)
				{
					alert("There are only 30 days maximum for this month"); 
					document.getElementById(strDC_ElementName+"Day").value = 30;
				}
		}
	else 
		{
			if (strMonth == "2") 
				{
					if (intReminder == 0) 
						{
							if (intDay > 29) 
								{
									alert("There are only 29 days maximum for this month as it is a leap year.");
									document.getElementById(strDC_ElementName+"Day").value = 29;		
								}		
						}
					else 
						{
							if (intDay > 28) 
								{
									alert("There are only 28 days maximum for this month");
									document.getElementById(strDC_ElementName+"Day").value = 28;		
								}	
						}
				}
		}
}
