function Validate()
{
	var x=document.frm;
	str =x.email.value;
	var at="@"
	var dot="."
	var lat=str.indexOf(at);
	var lstr=str.length;
	
	var strValidChars = "-+0123456789";
   	var strChar;
   	var blnResult = true;
	var strStringmobile = document.frm.mobile.value;
	
	var Day = document.frm.day.value;
	var Month = document.frm.month.value;
	var Year = document.frm.year.value;
	
	if(document.frm.name.value=="") 
	{
		alert("Please Enter Your Name");
		document.frm.name.focus();
		return false;	
	}

	
	if
	((Month == 2) && (Day == 29))
	{
	alert('Invalid Date of Birth, Please Correct it');
	document.frm.day.focus();
	return false;	
	}
	else if
	((Month == 2) && (Day == 30))
	{
	alert('Invalid Date of Birth, Please Correct it');
	document.frm.day.focus();
	return false;	
	}
	else if
	((Month == 2) && (Day == 31))
	{
	alert('Invalid Date of Birth, Please Correct it');
	document.frm.day.focus();
	return false;	
	}
	else if
	((Month == 4) && (Day == 31))
	{
	alert('Invalid Date of Birth, Please Correct it');
	document.frm.day.focus();
	return false;	
	}
	else if
	((Month == 6) && (Day == 31))
	{
	alert('Invalid Date of Birth, Please Correct it');
	document.frm.day.focus();
	return false;	
	}
	else if
	((Month == 9) && (Day == 31))
	{
	alert('Invalid Date of Birth, Please Correct it');
	document.frm.day.focus();
	return false;	
	}
	else if
	((Month == 11) && (Day == 31))
	{
	alert('Invalid Date of Birth, Please Correct it');
	document.frm.day.focus();
	return false;
	}
	else
	{
	}	


	
	if(document.frm.company.value=="") 
	{
		alert("Please Enter Your Company Name");
		document.frm.company.focus();
		return false;	
	}

	if(document.frm.mobile.value=="" || document.frm.mobile.value == 0 || document.frm.mobile.value.length <10 )
	{
		alert("Please Enter A Valid Mobile Number");
		document.frm.mobile.focus();
		return false;
	}
	else
    {
		for (i = 0; i < strStringmobile.length && blnResult == true; i++)
      	{
      		strChar = strStringmobile.charAt(i);
      		if (strValidChars.indexOf(strChar) == -1)
         	{
        		alert("Please Enter A Valid Mobile Number");
				document.frm.mobile.focus();
				return false;
         	}
      	}		
	}



	if(x.email.value=="")	//Email Validation Start			
	{ 
		alert("Enter Email ID");
		x.email.focus(); 
		return false;
	}	
	else
	{
		//### Email validation  ###		
		if (str.indexOf(at)==-1)
		{
			alert("Invalid E-mail ID")
			x.email.focus();
			return false
		}
		if(str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
		{
		   alert("Invalid E-mail ID")
		   x.email.focus();
		   return false
		}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
		{
			alert("Invalid E-mail ID")
			x.email.focus();
			return false
		}
		 if (str.indexOf(at,(lat+1))!=-1)
		 {
			alert("Invalid E-mail ID")
			x.email.focus();
			return false
		 }
		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
		 {
			alert("Invalid E-mail ID")
			x.email.focus();
			return false
		 }
		 if (str.indexOf(dot,(lat+2))==-1)
		 {
			alert("Invalid E-mail ID")
			x.email.focus();
			return false
		 }
		 if (str.indexOf(" ")!=-1)
		 {
			alert("Invalid E-mail ID")
			x.email.focus();
			return false
		}				//Email Validation End			
	}	
	
	return true;
}

