function checkProdInterest() {

//get variables
var p = document.getElementById('product_interest');
var tool_div = document.getElementById('tool_div');

//if tool then display tool div
if (p.value == 'Tools')
{
	tool_div.style.display = 'inline';
} else {
	tool_div.style.display = 'none';
}	

if (p.value == 'RFID Tag Inserter')
	{
	rfid_div.style.display = 'inline';
} else {
	rfid_div.style.display = 'none';
}	

}

function textLimit(field, maxlen) {
	if (field.value.length > maxlen + 1)
		alert('Please shorten your message, you have reached the maximum '+maxlen+' characters.');
	if (field.value.length > maxlen)
		field.value = field.value.substring(0, maxlen);
	}


function validate(form) {
	if (form.name.value.length < 1) 
	{
		alert('Please complete the Name field');
		form.name.focus();
		return false;
	}
	if (form.email.value.length < 1) 
	{
		alert('Please complete the Email field');
		form.email.focus();
		return false;
	}
	if (form.phone.value.length < 1) 
	{
		alert('Please complete the Phone field');
		form.phone.focus();
		return false;
	}
	if (form.fax.value.length < 1) 
	{
		alert('Please complete the fax field');
		form.fax.focus();
		return false;
	}
	if (form.company.value.length < 1) 
	{
		alert('Please complete the Company field');
		form.company.focus();
		return false;
	}
	if (form.address.value.length < 1) 
	{
		alert('Please complete the address field');
		form.address.focus();
		return false;
	}
if (form.city.value.length < 1) 
	{
		alert('Please complete the city field');
		form.city.focus();
		return false;
	}
if (form.state.value.length < 1) 
	{
		alert('Please complete the state field');
		form.state.focus();
		return false;
	}
if (form.zipcode.value.length < 1) 
	{
		alert('Please complete the zipcode field');
		form.zipcode.focus();
		return false;
	}
//	if (form.technology_interest.value == '') 
//	{
//		alert('Please select an option in the Technology Interest dropdown');
//		form.technology_interest.focus();
//		return false;
//	}
//	if (form.product_interest.value == '') 
//	{
//		alert('Please select an option in the Product Interest dropdown');
//		form.product_interest.focus();
//		return false;
//	}
return true;
}

