function validateForm(felem) {
	var why = "";
	var elem;
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
	
	elem = felem.Name;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "   * Name\n";
		}
	}
		
	elem = felem.Phone;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "   * Phone\n";
		}
	}
	
	elem = felem.Email;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "   * E-mail Address\n";
		}
		else if (!emailFilter.test(elem.value) || elem.value.match(illegalChars)) { 
			why += "   * E-mail Address\n";
		}
	}
	
	elem = felem.captcha;
	if (elem) {
		if (elem.value.length != 5) {
			why += "   * Security Code\n";
		}
	}

	if (why != "") {
		alert('There are problems with your request.\nThe following fields are mandatory: \n'+why);
		return false;
	}
	else {
		return true;
	}	
}
// Clear textfield
function ctf(theText) {
	if (theText.value == theText.defaultValue) {
		theText.value = "";
		theText.style.color = "#000000";
	}
}
// Reset textfield
function rtf(theText) {
	if (theText.value == "") {
		theText.value = theText.defaultValue;
		theText.style.color = "#a7a7a7";
	}
}
// Prevent default searches
function l2s(theForm) {
	if (theForm.q.value == theForm.q.defaultValue) {
		theForm.q.focus();
		return false;
	}
	return true;
}
