function validateForm(formElem,good_color) {
	var inputElem = null;
	var why = '';
	
	inputElem = formElem.nombre;
	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 = good_color;
		}
	}
	
	inputElem = formElem.telefono;
	if( inputElem ) {
		if(inputElem.value == inputElem.defaultValue) {
			why += " * Your Phone Number\n";
			document.getElementById(inputElem.id + '_label').style.color = '#FE0202';
		}
		else {
			document.getElementById(inputElem.id + '_label').style.color = good_color;
		}
	}
	
	inputElem = formElem.mail;
	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 = good_color;
		}
	}
	
	inputElem = formElem.captcha;
	if( inputElem ) {
		if(inputElem.value.length != 5) {
			why += " * The Code\n";
			document.getElementById(inputElem.id + '_label').style.color = '#FE0202';
		}
		else {
			document.getElementById(inputElem.id + '_label').style.color = good_color;
		}
	}
	
	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;
}
