// JavaScript Document
function validatecontact()
	{
				
		if(document.frm.txtname.value=="")
			{
				alert("Enter Name ");
				document.frm.txtname.focus();
				return false;
			}	
			
		if( document.frm.txtemail.value.length == 0 ) {
				alert('Please enter a valid email address');
					document.frm.txtemail.focus();
					return false;
			}
			else {
				//check email format
					var mail_id=document.frm.txtemail.value;
					var validEmail=true;
					if (mail_id.indexOf("@") < 1) validEmail=false;
					if (mail_id.indexOf(".") == -1) validEmail=false;
					if ((mail_id.indexOf(".") - mail_id.indexOf("@")) < 2) validEmail=false;
					if (!validEmail)
					{
						alert('Please enter a valid email address');
						document.frm.txtemail.focus();
						return false;
					}
				}
			if(document.frm.txtcomments.value=="")
			{
				alert("Insert Comments ");
				document.frm.txtcomments.focus();
				return false;
			}
				
			return true;
			
	}
