function validation()
{
	if(document.getElementById("name").value==0)
	{
		alert("Enter your full name.");
		document.getElementById("name").focus();
		return false;
	}
	if(document.getElementById("emailaddress").value==0)
	{
		alert("Enter your Email Id.");
		document.getElementById("emailaddress").focus();
		return false;
	}
	else
	{
		//
		//Email Validation
		//
		var email=document.getElementById("emailaddress").value;
		var splitted = email.match("^(.+)@(.+)$");
		if(splitted == null)
		{
			alert("Enter Valid Email Id.");
			document.getElementById("emailaddress").focus();
			return false;
		}
		else if(splitted[1] != null )
		{
			var regexp_user=/^\"?[\w-_\.]*\"?$/;
			if(splitted[1].match(regexp_user) == null)
			{
				alert("Enter Valid Email Id.");
				document.getElementById("emailaddress").focus();
				return false
			}
		}
		else if(splitted[2] != null)
		{
			var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
			if(splitted[2].match(regexp_domain) == null) 
			{
				var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
				if(splitted[2].match(regexp_ip) == null)
				{
					alert("Enter Valid Email Id.");
					document.getElementById("emailaddress").focus();
					return false;
				}
			}// if
			//return true;
		}
		else
			return true;
	}

}
