

function validateForm(){
	//frm = document.forms[0];
	//errorFlag=0;//0 means no erros and allow submission, >0 means errors output error message
	//errorMsg='Please correct the following errors:\n';
	
	if (!validateTextBox('fname')) {alert('First Name is missing.'); return false;}
	if (!validateTextBox('lname')) {alert('Last Name is missing.'); return false;}
	if (!validateTextBox('email')) {alert('Email Address is missing.'); return false;}
	if (checkTextNotEmailAddress(document.forms[0].email)) {alert('Email Address is invalid.'); return false;}
	if (!validateTextBox('subject')) {alert('Subject is missing.'); return false;}
	if (!validateTextBox('email_body')) {alert('Your Question? is missing.'); return false;}
	document.forms[0].submit();	
}


function validateTextBox(txt_id) {
	if (eval(document.getElementById(txt_id)) != null)  {
		if (document.forms[0].elements[txt_id].value != '')
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	else {
		return true;
	}
}