function valid_mail() 
{
	if(document.frm_email.name.value=="" || document.frm_email.name.value=="Enter your name")
	{
		alert("Please, enter your Name");
		document.frm_email.name.focus();
		return false;
	}
	
	if(document.frm_email.user_email.value=="" || document.frm_email.user_email.value=="Enter your email")
	{
		alert("Please, enter you Email ID");
		document.frm_email.user_email.focus();
		return false;
	}
	
	if(!email(document.frm_email.user_email.value))
	{
		alert("Not an Valied Email ID");
		document.frm_email.user_email.select();
		return false;
	}
	
	if(document.frm_email.comments.value=="" || document.frm_email.comments.value=="Please enter your project description")
	{
		alert("Please, some comments");
		document.frm_email.comments.focus();
		return false;
	}
	if(document.frm_email.code.value=="" || document.frm_email.code.value=="Enter Characters")
		{
			alert("Plese Enter Characters ");
			document.frm_email.code.focus();
			return false;
		}
	
	
	return true;
}


//	email validation - copy from lifi

function email(strval)
{

 if (typeof(strval) == "object")
 {
    objtrim(strval);
	emailStr = strval.value;
 }
 else
 {
    emailStr = strtrim(strval);
 }

 
 /* Whether to verify email ends in two-letter country or well-known TLD.  1 means check it, 0 means don't. */
 var checkTLD=1;

 /* List of known TLDs that email must end with. */
 var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|shop)$/;

 /* Pattern used to check if email fits 'user@domain' format.Also is to separate the username from the domain */
 var emailPat=/^(.+)@(.+)$/;

 /* Pattern for matching all special chars.Not allowedchars includes ( ) < > @ , ; : \ " . [ ] */
 var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]'";

 /* Range of chars allowed in a user/domain name.It really states which chars aren't allowed.*/
 var validChars="\[^\\s" + specialChars + "\]";

 /* Pattern that applies if the "user" is a quoted string (in which case, anything goes).  E.g. "jiminy cricket"@disney.com is a legal e-mail address. */
 var quotedUser="(\"[^\"]*\")";

 /* Domains that are IP addresses, rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
 e-mail address,square brackets reqred. */
 var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

 /* The following string represents an atom (basically a series of non-special characters.) */
 var atom=validChars + '+';

 /* Represents one word in the typical username. Eg, in john.doe@somewhere.com, john & doe are words.
 I.e., a word is either an atom or quoted string. */
 var word="(" + atom + "|" + quotedUser + ")";

 // Pattern describes the structure of the user
 var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

 /* Pattern describes structure of normal symbolic domain, as opposed to ipDomainPat, shown above. */
 var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

 /* Finally, check if the email is valid. Begin with coarse pattern to simply break up user@domain into diff pieces easy to analyze. */
 var matchArray=emailStr.match(emailPat);

 if (matchArray==null) 
 {
    /* Too many/few @'s or something; ie, this email doesn't even fit the general mould of a valid mail addr. */
    // alert("Email address seems incorrect (check @ and .'s)");
    return false;
 }
 
 var user=matchArray[1];
 var domain=matchArray[2];

 // Start by checking that only basic ASCII characters are in the strings (0-127).
 for (i=0; i<user.length; i++) 
 {
     if (user.charCodeAt(i) > 127) 
	 {
	    // alert("Ths username contains invalid characters.");
		return false;
	  }
 }
 
 for (i=0; i<domain.length; i++) 
 {
    if (domain.charCodeAt(i) > 127) 
	{
	   // alert("This domain name contains invalid characters.");
	   return false;
	}
 }

 // If valid "user"
 if (user.match(userPat) == null) 
 { 
    // alert("The username doesn't seem to be valid.");
	return false;
 }

 /* If email is at an IP addr (not symbolic hostname) make sure valid IP */
 var IPArray=domain.match(ipDomainPat);
 if (IPArray!=null) 
 {// this is an IP address
    for (var i=1;i<=4;i++) 
	{
	   if (IPArray[i]>255) 
	   {
	      // alert("Destination IP address is invalid!");
		  return false;
	   }
	}
	return true;
 }

 // Domain is symbolic name.  Check if it's valid.
 var atomPat=new RegExp("^" + atom + "$");
 var domArr=domain.split(".");
 var len=domArr.length;
 
 for (i=0;i<len;i++) 
 {
    if (domArr[i].search(atomPat)==-1) 
	{
	   // alert("The domain name does not seem to be valid.");
	   return false;
	}
 }

 /* If Dom name valid, make sure it ends in a known TLD or a 2-letter country name, and that there's a hostname preceding the TLD. */
 if (checkTLD && domArr[domArr.length-1].length!=2 && domArr[domArr.length-1].search(knownDomsPat)==-1) 
 {
    // alert("The address must end in a well-known domain or two letter " + "country.");
	return false;
 }

 // Make sure there's a host name preceding the domain.
 if (len<2) 
 {
    // alert("This address is missing a hostname!");
	return false;
 }

 // If we've gotten this far, everything's valid!
 return true;
}