function checkfrm(theForm)
{
	if(theForm.fname.value == '')
	{
		alert("Please enter your First name");
		theForm.fname.focus();
		return false;
		
	}
	if(theForm.email.value == '')
	{
		alert("Please enter your email");
		theForm.email.focus();
		return false;
		
	}
	if(theForm.lname.value == '')
	{
		alert("Please enter your Last Name");
		theForm.lname.focus();
		return false;
		
	}
	if(isvalidemail(theForm.email.value))
	{
		return true;
	}
	else
	{
		alert("Please enter Valid email");
		theForm.email.focus();
		return false;
		
	}
	return true;
}
function isvalidemail(emailStr) {


var emailPat=/^(.+)@(.+)$/


var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var specialChars1="\\(\\)<>@_,;:\\\\\\\"\\.\\[\\]"

/* The following string represents the range of characters allowed in a 
   username or domainname.  It really states which chars aren't allowed. */
var validChars="\[^\\s" + specialChars + "\]"
var validChars1="\[^\\s" + specialChars1 + "\]"


var quotedUser="(\"[^\"]*\")"


var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/


var atom=validChars + '+'
var atom1=validChars1 + '+'


var word="(" + atom + "|" + quotedUser + ")"

// The following pattern describes the structure of the user
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")

/* The following pattern describes the structure of a normal symbolic
   domain, as opposed to ipDomainPat, shown above. */
var domainPat=new RegExp("^" + atom1 + "(\\." + atom1 +")*$")


var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
 
	return false
}
return true;
}