

function uValidDate(pForm)
{
var bChk;
bChk=true;	
//if(pForm.lstYr.length<1)
if(document.getElementsByName("lstYr").length==1)
{
	if(pForm.lstDy.value!="" && pForm.lstMth.value!="" && pForm.lstYr.value!="")
		{
					
			if(pForm.lstMth.selectedIndex==2)
				{
					leapYr=pForm.lstYr.value%4
					if(leapYr!=0)
						{
							if(pForm.lstDy.selectedIndex>28)
							{
								alert("Enter the valid date");
								pForm.lstDy.focus();
								bChk=false;
							} 
						}
					else
						{
							if(pForm.lstDy.selectedIndex>29)
							{
								alert("Enter the valid date");
								pForm.lstDy.focus();
								bChk=false;
							} 
						}
						
				}
					
		}
			return(bChk);
			
}
else
{
	for(i=0;i<document.getElementsByName("lstYr").length;i++)
			{
		
				if(pForm.lstDy(i).value!="" && pForm.lstMth(i).value!="" && pForm.lstYr(i).value!="")
				{
					
					if(pForm.lstMth(i).selectedIndex==2)
					{
						
						leapYr=pForm.lstYr(i).value%4
						if(leapYr!=0)
						{
							
							if(pForm.lstDy(i).selectedIndex>28)
							{
								alert("Enter the valid date");
								pForm.lstDy(i).focus();
								bChk=false;
							} 
						}
						else
						{
							if(pForm.lstDy(i).selectedIndex>29)
							{
								alert("Enter the valid date");
								pForm.lstDy(i).focus();
								bChk=false;
							} 
						}
						
					}
					
				}
			}
			return(bChk);
			
	}
}