function frmvalidate(frm)
{
	with(frm)
	{
		if((txtName.value=="") && (txtEmail.value==""))
		{
			alert("-Please enter name.\n-Please enter email address.");
			txtName.focus();
			return false;
		}
		if(txtName.value=="")
		{
		alert("-Please enter your name. ");
		txtName.focus();
		return false;
		}
		if(txtName.value != "")
		{
			var ValidChar = "0123456789~`!@#$%^&*()_+|\=-][{}:';?><,./'";
			var ValidChars = ValidChar+'"';
			for (j = 0; j < txtName.value.length; j++) 
     	 	{ 
     		 var Char = txtName.value.charAt(j); 
     		 if (ValidChars.indexOf(Char) != -1) 
         		{
         		alert('-Name : Only a to z, A to Z, and space is allowed.');
	 	 		txtName.focus();
	 	 		return  false;
         		}
           }
		}
		if(txtEmail.value=="")
		{
		alert(" -Please enter email address. ");
		txtEmail.focus();
		return false;
		}
			if(txtEmail.value != '')
			{
			var emails=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]		{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
			var membermailid = eval("txtEmail.value");
			
			result1=membermailid.search(emails);
			if(result1==-1)
			{
			alert('-Please enter valid email address.');
			eval("txtEmail.focus()");
			return false;
			}
		}
		
			if(txtEmail.value != "")
			{
			var ValidChar = "~`!@#$%^&*()_+|\=-][{}:';?><,./";
			var ValidChars = ValidChar+'"';
			for (j = 0; j < 1; j++) 
     	 	{ 
     		 Char = txtEmail.value.charAt(j); 
     		 if (ValidChars.indexOf(Char) != -1) 
         	{
         	alert('-Email address should start with a character or digit');
	 	 	txtEmail.focus();
	 	 	return  false;
         	}
         	}
		}
		
	}
	return true;
}









/*function frmvalidate(frm)
{   
	 with(frm)
	 {

		if(txtName.value != "")
		{
			var ValidChar = "0123456789~`!@#$%^&*()_+|\=-][{}:';?><,./'";
			var ValidChars = ValidChar+'"';
			for (j = 0; j < txtName.value.length; j++) 
     	 	{ 
     		 var Char = txtName.value.charAt(j); 
     		 if (ValidChars.indexOf(Char) != -1) 
         		{
         		alert('Special characters or integers are not allowed in name');
	 	 		txtName.focus();
	 	 		return  false;
         		}
           }
		}
		if(txtEmail.value != '')
		{
			var emails=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]		{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
			var membermailid = eval("txtEmail.value");
			
			result1=membermailid.search(emails);
			if(result1==-1)
			{
			alert('Enter valid Email-id');
			eval("txtEmail.focus()");
			return false;
			}
		}
		
		if(txtEmail.value != "")
		{
			var ValidChar = "~`!@#$%^&*()_+|\=-][{}:';?><,./";
			var ValidChars = ValidChar+'"';
			for (j = 0; j < 1; j++) 
     	 	{ 
     		 Char = txtEmail.value.charAt(j); 
     		 if (ValidChars.indexOf(Char) != -1) 
         	{
         	alert('Email address should start with a character or digit');
	 	 	txtEmail.focus();
	 	 	return  false;
         	}
         	}
		}
	}
	 return true;
} */