function checkform()
{
	var f1 = document.contactus.First_Name;
	var f2 = document.contactus.Email;
	var f3 = document.contactus.Phone;
	var f4 = document.contactus.topic;

	if(isAlpha(f1,"Enter Valid Name"))
		if(isValidMail(f2,"Enter Valid Email Address"))
			if(isEmpty(f4,"Enter Valid Topic Name"))
				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 isValidMail(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;
	}
}
