function clearTB(theText) {
	if (theText.value == theText.defaultValue) {
		theText.value = "";
		theText.style.color = "#000000";
		theText.style.fontWeight = 'bold';
	}
}

function resetTB(theText) {
	if (theText.value == "") {
		theText.value = theText.defaultValue;
		theText.style.color = "#414E61";
		theText.style.fontWeight = 'normal';
	}
}


function validateForm(form_elem) {
	var why = "";
	var elem;
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
	
	elem = form_elem.Name;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "Please enter your name.\n";
			elem.style.color = "#CD1101";
		}
	}
	
	elem = form_elem.PhoneNumber;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "Please enter your phone number.\n";
			elem.style.color = "#CD1101";
		}
	}
	
	elem = form_elem.EmailAddress;
	if (elem) {
		if (elem.value=='' || elem.value==elem.defaultValue) {
			why += "Please enter your e-mail address.\n";
			elem.style.color = "#CD1101";
		}
		else if (!emailFilter.test(elem.value) || elem.value.match(illegalChars)) { 
			why += "Please enter a valid e-mail address.\n";
		}
	}
	
	if (why != "") {
		alert('There are problems with your request:\n\n'+why);
		return false;
	}
	else {
		return true;
	}	
}
