// JavaScript Document
function validapp()
{
	dt = new Date();
	yy = dt.getFullYear();
		
	if(document.appointment.txtname.value=="")
	{
		alert("Please Enter Your Name");
		document.appointment.txtname.focus();
		return(false);
	}
	if(document.appointment.txtYage.value=="")
	{
		alert("Please Enter Your Age");
		document.appointment.txtYage.focus();
		document.appointment.txtYage.select();
		return(false);
	}
	
		if (isNaN(document.appointment.txtYage.value))
	{
	 	alert("Your Age can only be in digits[0-9]");
		document.appointment.txtYage.focus();
		document.appointment.txtYage.select();
		return (false);
	}
	
	
	if (document.appointment.txttel.value=="")
	{
		alert("Please Enter Your Phone No");
		document.appointment.txttel.focus();
		return(false);
	}

	if (isNaN(document.appointment.txttel.value))
	{
	 	alert("Phone Number can only be in digits[0-9]");
		document.appointment.txttel.focus();
		document.appointment.txttel.select();
		return (false);
	}
	
	
	if (isNaN(document.appointment.txtmbl.value))
	{
	 	alert("Mobile Number can only be in digits[0-9]");
		document.appointment.txtmbl.focus();
		document.appointment.txtmbl.select();
		return (false);
	}
	
	if (document.appointment.txtpdyear.value=="") 
	{
		alert("Please Enter Your Preferred Date");    
		document.appointment.txtpdyear.focus();
		document.appointment.txtpdyear.select();
		return(false);
	}
	
	if (document.appointment.txtpdyear.value < yy) 
	{
		alert("Please Enter Correct Date");    
		document.appointment.txtpdyear.focus();
		document.appointment.txtpdyear.select();
		return(false);
	}
	
	
	
	if (document.appointment.txtemail.value=="") 
	{
		alert("Please Enter Your E-mail Address");    
		document.appointment.txtemail.focus();
		return(false);
	}
	if ((document.appointment.txtemail.value.length < 3)||(document.appointment.txtemail.value.indexOf("@") == 1)||(document.appointment.txtemail.value.indexOf(".") == -1)||(document.appointment.txtemail.value.indexOf("'")!= -1))
	{
				alert("Please enter a valid E-mail Address ");
				document.appointment.txtemail.focus();
				document.appointment.txtemail.select();
				return (false);
	}

	
return(true);
}

