function isValidEmail(str) {
return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}
function CheckData()
{
with(document.frm)
{
	
if(txtName.value == "" || txtName.value =="Name")
{
alert("Please enter your name.");
txtName.focus();
return false;
}

if(txtEmail.value == "")
{
alert("Please enter your email address.");
txtEmail.focus();
txtEmail.value="";
return false;
}
if (!isValidEmail(txtEmail.value)) 
{
alert("Please enter a valid email address.");
txtEmail.focus();
txtEmail.value="";
return false;
}
if(txtPhone.value == "" || txtPhone.value =="Phone")
{
alert("Please enter your Phone Number.");
txtPhone.focus();
return false;
}

if(txtComments.value == "" || txtComments.value =="Comments")
{
alert("Please enter Message/Query.");
txtComments.focus();
return false;
}
}
return true;
}















function isValidEmail(str) {
return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
}
function CheckData1()
{
with(document.frm)
{
if(txtName.value == "")
{
alert("Please enter your name.");
txtName.focus();
return false;
}

if(txtEmail.value == "")
{
alert("Please enter your email address.");
txtEmail.focus();
txtEmail.value="";
return false;
}
if (!isValidEmail(txtEmail.value)) 
{
alert("Please enter a valid email address");
txtEmail.focus();
txtEmail.value="";
return false;
}


if(txtComments.value == "")
{
alert("Please enter Message/Query.");
txtComments.focus();
return false;
}
}
return true;
}
