﻿function validate()
{
	if (Trim(document.frm.txt_name))
	{
		alert("Enter the name");
		document.frm.txt_name.focus();
		return false;
	}
	if (Trim(document.frm.txt_email))
	{
		alert("Enter the mail id");
		document.frm.txt_email.focus();
		return false;
	}
	if(email(document.frm.txt_email))
	{
		alert("Enter valid mail id");
		document.frm.txt_email.focus();
		return false;
	}
	if (Trim(document.frm.txt_message))
	{
		alert("Enter the message");
		document.frm.txt_message.focus();
		return false;
	}
	document.frm.submit();
}
