// JavaScript Document
function valid()
{
if(document.frm1.txtsub.selectedIndex==0)
	{
	alert("Please Select Subject");
	document.frm1.txtsub.focus();
	return false;
	}
var com=document.frm1.txtcompany.value;
	if (com.length == 0 || com == " ")
         {
            alert("Please Enter Your Company.");
            document.frm1.txtcompany.focus();
            return false;
         }
		 
var person=document.frm1.txtperson.value;
	if(person.length==0 || person==" ") 
	{
	alert("Please Enter Name");
	document.frm1.txtperson.focus();
	return false;	
	} 
var addr=document.frm1.txtaddress.value;
	if(addr.length==0 || addr==" ")
	{
	alert("Please Mention Address");
	document.frm1.txtaddress.focus();
	return false;
	}
var city=document.frm1.txtcity.value;
	if(city.length==0 || city=="")
	{
	alert("Please Mention City");
	document.frm1.txtcity.focus();
	return false;
	}
if(document.frm1.txtcountry.selectedIndex==0)
	{
	alert("Please Select Countery");
	document.frm1.txtcountry.focus();
	return false;
	}
var tel=document.frm1.txttele.value;
	if(tel.length==0 || tel=="")
	{
	alert("Please Mention Telephone no.");
	document.frm1.txttele.focus();
	return false;	
	}
var myString = document.frm1.txtemail.value;
		if ((myString.indexOf(".") < 2) || (myString.indexOf("@") < 0) || (myString.lastIndexOf(".") < myString.indexOf("@"))) {
			alert("You must enter a valid email address.");
			document.frm1.txtemail.focus();
			return false;
		}
var detail=document.frm1.txtdetail.value;
	if(detail.length==0 || detail==" ")
	{
	alert("Enter Your Quiry");
	document.frm1.txtdetail.focus();
	return false;	
	}
}
