function valid(){
a = document.frm;

if(a.txtname.value==""){
alert("Please enter your Name");
a.txtname.style.background='#FFFFFF';
a.txtname.focus();
a.txtname.select();
return false;
}
if(a.txtmail.value==""){
alert("Please enter your Email");
a.txtmail.focus();
a.txtmail.select();
return false;
}
else
{
	var emailfilter=/^\w+[\+\.\w-]*@([\w-]+\.)*\w+[\w-]*\.([a-z]{2,4}|\d+)$/i
	var returnval=emailfilter.test(document.frm.txtmail.value)
	if (returnval==false){
		alert("Please enter a valid email address.")
		a.txtmail.select()
		a.txtmail.focus()		
		
		return false;
}
}
if(isNaN(a.txtphone.value) || a.txtphone.value==""){
alert("Please enter your Phone");
a.txtphone.focus();
a.txtphone.select();
return false;
}
if(isNaN(a.txtmobile.value) || a.txtmobile.value==""){
alert("Please enter your Mobile Number");
a.txtmobile.focus();
a.txtmobile.select();
return false;
}
if(a.txtadd.value==""){
alert("Please enter your Address");
a.txtadd.focus();
a.txtadd.select();
return false;
}
if(a.acceptterms.checked == false){
alert("Please accept our terms and conditions");

return false;
}

/*if(a.txtcomments.value==""){
alert("Please enter your Comments");
a.txtcomments.focus();
a.txtcomments.select();
return false;
}*/
return;
}