function clearTextfeild(theText) {
	if (theText.value == theText.defaultValue) {
		theText.value = "";
	}
}

function resetTextfeild(theText) {
	if (theText.value == "") {
		theText.value = theText.defaultValue;
	}
}

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 += "Please enter your name.\n";
		}
	}
	
	elem = felem.Email;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "Please enter your e-mail address.\n";
		}
		else if (!emailFilter.test(elem.value) || elem.value.match(illegalChars)) { 
			why += "Please enter a valid e-mail address.\n";
		}
	}
		
	elem = felem.Phone;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "Please enter your phone number.\n";
		}
	}
	
	elem = felem.captcha;
	if (elem) {
		if (elem.value.length != 5) {
			why += "Please enter the security code exactly how it appears.\n";
		}
	}

	if (why != "") {
		alert('There are problems with your request:\n\n'+why);
		return false;
	}
	else {
		return true;
	}	
}