function isEmpty(str)
{
 for(var intLoop=0; intLoop<str.length; intLoop++)
   if(str.charAt(intLoop)!=" ")
  return false;

 return true;
} 

function valid(){
	
	if (isEmpty(document.rfqform.company.value)){
		alert("Please specify the name of your company.");
		document.rfqform.company.focus();
		return false;
	}
		
	if(isEmpty(document.rfqform.fname.value)){
		alert("Please specify your first name.");
		document.rfqform.fname.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.lname.value)){
		alert("Please specify your last name.");
		document.rfqform.lname.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.jobtitle.value)){
		alert("Please specify your job title.");
		document.rfqform.jobtitle.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.add1.value)){
		alert("Please specify your address.");
		document.rfqform.add1.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.city.value)){
		alert("Please specify the name of the city.");
		document.rfqform.city.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.state.value)){
		alert("Please specify a state.");
		document.rfqform.state.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.zip.value)){
		alert("Please specify a zip code.");
		document.rfqform.zip.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.country.value)){
		alert("Please specify a country.");
		document.rfqform.country.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.email.value)){
		alert("Please specify your Email address.");
		document.rfqform.email.focus();
		return false;
	} else if ( !isValidEmail(document.rfqform.email.value))
	{
		alert("Please use valid Email address.");
		return false;
	}	
			
	if(isEmpty(document.rfqform.phone.value)){
		alert("Please specify your phone number.");
		document.rfqform.phone.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.fax.value)){
		alert("Please specify your fax number.");
		document.rfqform.fax.focus();
		return false;
	}

	if(isEmpty(document.rfqform.industry.value)){
		alert("Please specify your industry.");
		document.rfqform.industry.focus();
		return false;
	}
	
	if(isEmpty(document.rfqform.project.value)){
		alert("Please specify your project name.");
		document.rfqform.project.focus();
		return false;
	}
	
	return true;
	
}

function isValidEmail(myEmail)
{
	if (myEmail.match(/\w+((-\w+)|(\.\w+)|(_\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z]{2,5}/) )
		return true;
	else
		return false;
}