function formsubmit2()
	{
		var form = document.ccoptin;
		 
 if(form.ea.value == "")
			{
				alert('Enter a email id');
				return false;
			}
			
			else if(!verif_mail2())
			{

				return false;

			}
	}
	function verif_mail2() 
{
	var form = document.ccoptin;
	var id = form.ea.value;
	if(id == ""|| id=="E-Mail" || id=="e-mail")  
	{
	alert("Enter the email id");
	form.ea.select();
	return false;
	}
	else
	{
	var apos=id.indexOf("@");
	var lpos=id.lastIndexOf("@");
	var dotpos=id.lastIndexOf(".");
	var id_len=id.length;
	//alert(dotpos);
	var dif=id_len-dotpos;
	//alert(dif);
	
	
	if(dif<3 || dif>5)
	{
	alert("Enter valid email id");
	form.ea.select();
	return false;
	}
	
	if(apos!=lpos)
	{
	alert("Enter valid email id");
	form.ea.select();
	return false;
	}
	
	if (apos<1||dotpos-apos<2) 
	  {
		alert("Enter valid email id");
		form.ea.select();
		return false;
	  }
	  
	for(i=0;i<=dotpos;i++)
	{
		var str=id;
		var ch=str.substring(i,i+1);
		
		if(ch==' ' || ch==';' || ch==',' || ch=='!' || ch=='#' || ch=='$' || ch=='%' || ch=='^' || ch=='&' || ch=='*' )
		{
			alert("Enter valid email id");
			form.ea.select();
			return false;
		}
	}
	var str=id.substring(dotpos+1,id_len);
	//alert(str);
	
		for (var i = 0; i < str.length; i++) 
		{
			var ch = str.substring(i, i + 1);
		//alert(ch)
			//if ( ((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) && (ch == '.')) 
			if(ch==1 || ch==2 || ch==3 || ch==4 || ch==5 || ch==6 || ch==7 || ch==8 || ch==9 || ch==0 || ch==';' || ch=='$' || ch=='@' || ch=='*' || ch=='^' || ch=='&' || ch=='%' ||ch=='#')
			//if((ch < "0" || "9" < ch))
			{
				alert("Enter valid email id");
				form.ea.select();
				return false;
			}
		}
	}
	return true;
	}
	
	

