function validateForm(formElem) {
	var inputElem = null;
	var why = '';
	
	inputElem = formElem.first_name;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your Name\n";
			document.getElementById(inputElem.id + '_label').style.color = '#FE0202';
		}
		else {
			document.getElementById(inputElem.id + '_label').style.color = '#000000';
		}
	}
	
	inputElem = formElem.last_name;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your Company's Name\n";
			document.getElementById(inputElem.id + '_label').style.color = '#FE0202';
		}
		else {
			document.getElementById(inputElem.id + '_label').style.color = '#000000';
		}
	}
	
	inputElem = formElem.email;
	if( inputElem ) {
		if(!isValidEmail(inputElem.value)) {
			why += " * Your Email Address\n";
			document.getElementById(inputElem.id + '_label').style.color = '#FE0202';
		}
		else {
			document.getElementById(inputElem.id + '_label').style.color = '#000000';
		}
	}
	
	if( why != "" ) {
		why = "There is an error with your request.\nPlease fill out the following required fields:\n" + why;
		alert(why);
		return false;
	}
	else {
		return true;
	}
}

function isValidEmail(the_email) {
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\'\>\,\;\:\\\/\"\[\]]/;
	if (!emailFilter.test(the_email) || the_email.match(illegalChars)) {
		return false;
	}
	return true;
}

