var randomnumber=Math.floor(Math.random()*9);
var randomnumber1=Math.floor(Math.random()*9);
var result=parseInt(randomnumber) + parseInt(randomnumber1);


function check(form2){

if(form2.name.value=="")
{alert("please enter Your Name");form2.name.focus();return(false);}


if(form2.companyname.value=="")
{alert("please enter Your Company Name");form2.companyname.focus();return(false);}

if(form2.address.value=="")
{alert("please enter Your Address");form2.address.focus();return(false);}


if(form2.country.value=="")
{alert("please select your country");form2.country.focus();return(false);}



if(form2.email.value=="")
{alert("please enter Your E-Mail");form2.email.focus();return(false);}
if(form2.email.value!="")
{pass=form2.email.value.indexOf('@',0);if(pass==-1)
{alert("not a valid email address");form2.email.focus();return(false);}}

if(form2.country.value=="")
{alert("please select Your Country Name");form2.country.focus();return(false);}

if(form2.phone.value=="")
{
	alert("please enter Your Contact Number");
	form2.phone.focus();
	return(false);
}
else if(isNaN(form2.phone.value))
{
	alert("please enter valid Contact Number ");
	form2.phone.focus();
	return(false);
}


if(form2.comments.value=="")
{alert("please enter your comments");form2.comments.focus();return(false);}
if(form2.captcha_text.value!=result){
	alert("please enter correct result");
	form2.captcha_text.focus();
	return(false);
}

}



