
function checkall()
{	
if( document.sam.fname.value=="")
{alert("Please fill in your name")
document.sam.fname.focus();
return false
}

if (document.sam.email.value=="")
{
alert("Enter your E-mail.")
document.sam.email.focus();
return false
}
t=document.sam.email.value;
p=t.indexOf("@");
d=t.indexOf(".");
if(p<1||d<1)
{
	alert ("invalid E-mail I.D");
	document.sam.email.focus();
	return false
}
if( document.sam.company.value=="")
{alert("Please fill in the name of your company")
document.sam.company.focus();
return false
}

if((document.sam.phone_no.value=="")&&(document.sam.phone_no1.value==""))
{	alert("Please fill in your Phone No.")
	document.sam.phone_no.focus();
	return false
}
else
{
	if(document.sam.phone_no.value != '') {
		inputStr = document.sam.phone_no.value
		var value = inputStr ;
		var pattern = /^[0-9\(\)\s-\\\/]+$/ ;
		var result = '' ;
		result = pattern.exec(value) ;
		if (value == "") {
			value = null ;
		}
		if(result == null) {
			alert ("Sorry, Please do not use any alphabets for Phone");
			document.sam.phone_no.focus();
			return false;
		}
	}
	if(document.sam.phone_no1.value != '') {
		inputStr = document.sam.phone_no1.value
		var value = inputStr ;
		var pattern = /^[0-9\(\)\s-\\\/]+$/ ;
		var result = '' ;
		result = pattern.exec(value) ;
		if (value == "") {
			value = null ;
		}
		if(result == null) {
			alert ("Sorry, Please do not use any alphabets for Mobile");
			document.sam.phone_no1.focus();
			return false;
		}
	}
	
}
	if( document.sam.state.value=="")
{alert("Please fill in the name of your state")
document.sam.state.focus();
return false
}
if( document.sam.city.value=="")
{alert("Please fill in the name of your city")
document.sam.city.focus();
return false
}
if( document.sam.cmb_industry.value=="")
{alert("Please fill in your Car Model")
document.sam.cmb_industry.focus();
return false
}
if( document.sam.descrp.value=="")
{alert("Please Fill in Model / Year")
document.sam.descrp.focus();
return false
}
}

