function contactValidation()
{
	var fname = document.contactus.fname;
	var lname = document.contactus.lname;
	var email = document.contactus.Email;
	var Phone = document.contactus.Phone;
	
	if(isAlpha(fname,"Enter Valid First Name"))
		if(isAlpha(lname,"Enter Valid Last Name"))
			if(isNumeric(Phone,"Enter Valid Phone Number"))
				if(isEmail(email,"Enter Valid Email Id"))
					return true;	
	return false;
}
function isAlpha(elem,alertmsg)
{
	var alpha = /^[a-zA-Z\ ]+$/;
	if(isEmpty(elem,alertmsg))
	{
		if(elem.value.match(alpha))
		{
			return true;
		}
		else
		{
			alert(alertmsg);
			elem.select();
			return false;
		}
	}
	return false;
}
function isAlphaNumeric(elem,alertmsg)
{
	var alphanumeric = /^[a-zA-Z0-9\.\-\,\_\ ]+$/;
	if(isEmpty(elem,alertmsg))
	{
		if(elem.value.match(alphanumeric))
		{
			return true;
		}
		else
		{
			alert(alertmsg);
			elem.select();
			return false;
		}
	}
	return false;
}
function isNumeric(elem,alertmsg)
{
	var numeric = /^[0-9]+$/;
	if(elem.value.match(numeric))
	{
		return true;
	}
	else
	{
		alert(alertmsg);
		elem.select();
		return false;
	}
}
function isEmail(elem,alertmsg)
{
	var mail = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
	if(isEmpty(elem,alertmsg))
	{
		if(elem.value.match(mail))
		{
			return true;
		}
		else
		{
			alert(alertmsg);
			elem.select();
			return false;
		}
	}
	return false;
}
function isEmpty(elem,alertmsg)
{
	if(elem.value == "")
	{
		alert(alertmsg)
		elem.focus();
		return false;
	}
	else
	{
		return true;
	}
}