function mymail()
{
	
	var i=0;
	var j=0;
	var str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
	var strchr = "!#$%^&*()=+''?><{}[]|\/:;~` "
	var strat = "@";
	var strdot = ".";
	var flag = 0;	
	var countat = 0;
	var countdt = 0;			
	if (document.myform.email.value.length < 6)
	{
		flc=1;
		alert("Please Enter Valid E-mail Address");
		document.myform.email.focus();
		document.myform.email.value="";
	}
	else 
	{
		flag = 0;			
		for(i=0; i<=document.myform.email.value.length-1; i++)
		{
			if(document.myform.email.value.substring(i,i+1) == strat)
			{						
				flag = 1;
				break;	
			}
			countat = countat +1;
		}
			
		if (flag == 0 ) 
		{
			flc=1;
			alert("Please Check Your email Address, There Must be an @");
			document.myform.email.focus();		
			document.myform.email.value="";		
		}
		else
		{
			flag = 0;
		
			for(i=0; i<=document.myform.email.value.length-1; i++)
			{
				if(document.myform.email.value.substring(i,i+1) == strdot)
				{
					flag = 1;
					break;	
				}
			countdt = countdt + 1;
			}
			
			if (flag == 0 ) 
			{
				flc=1;
				alert("Please Check Your email Address,There must be atleast one dot");
				document.myform.email.focus();
				document.myform.email.value="";				
			}
			else if (countat > countdt)
			{
				flc=1;
				alert("Please Check Your E-Mail Address, @ must before dot");
				document.myform.email.focus();
				document.myform.email.value="";
			}
			else if (countdt == document.myform.email.value.length - 1)
			{
				flc=1;
				alert("Not a Vaild E-mail Address");
				document.myform.email.focus();
				document.myform.email.value="";
			}
			else if (countat == countdt-1)
			{
				flc=1;
				alert("Not a Valid E-mail Address VERY NEXT");
				document.myform.email.focus();
				document.myform.email.value="";
			}
			else 
			{					
				for (i=0; i<document.myform.email.value.length; i++)
				{
					for (j=0; j<strchr.length-1; j++)
					{
						if (document.myform.email.value.substring(i,i+1) == strchr.substring(j,j+1))
						{					
							flc=1;
							alert("Not a valid character " + strchr.substring(j,j+1));
							document.myform.email.focus();
							document.myform.email.value="";
							break;
						}
					}
				}
			}																	
		}							
	}
}
