function submitContact()
{
	var errorAlert = "";
	var highlightFields = new Array();

	if(! document.getElementById('FirstName').value)
	{
		highlightFields.push("FirstName");
		errorAlert += "\nYou must include your first name.";
	}
	if(! document.getElementById('LastName').value)
	{
		highlightFields.push("LastName");
		errorAlert += "\nYou must include your last name.";
	}
	if(! document.getElementById('CompanyName').value)
	{
		highlightFields.push("CompanyName");
		errorAlert += "\nYou must include your company name.";
	}
	if(! document.getElementById('Telephone').value)
	{
		highlightFields.push("Telephone");
		errorAlert += "\nYou must include your telphone number.";
	}
	if(! document.getElementById('Emailaddress').value)
	{
		highlightFields.push("Emailaddress");
		errorAlert += "\nYou must include your email address.";
	}
	if(! document.getElementById('ConfirmEmailaddress').value)
	{
		highlightFields.push("ConfirmEmailaddress");
		errorAlert += "\nYou must confirm your email address.";
	}

	if(document.getElementById('Emailaddress').value != document.getElementById('ConfirmEmailaddress').value)
	{
		highlightFields.push("Emailaddress");
		highlightFields.push("ConfirmEmailaddress");
		errorAlert += "\nThe email address you entered does not equal the email confirmation entered.";
	}

	if(errorAlert)
	{
		alert("There were errors while attempting to submit the form:" + errorAlert);
		do_unhighlightFields();
		do_highlightFields(highlightFields);
	}
	else
	{
		do_unhighlightFields();
		document.getElementById('frmContactForm').submit();
	}
}

function resetContact()
{
	do_unhighlightFields();
	document.getElementById('frmContactForm').reset();
}

function do_unhighlightFields()
{
	for(var i=0; i < document.getElementsByTagName('input').length; i++)
	{
		document.getElementsByTagName('input')[i].style.backgroundColor="#6b90c6";
	}
}

function do_unhighlightField(fieldObj)
{
	fieldObj.style.backgroundColor="#6b90c6";
}

function do_highlightFields(fieldsArr)
{
	for(var i=0; i < fieldsArr.length; i++)
	{
		document.getElementById(fieldsArr[i]).style.backgroundColor="#d00a12";
	}
}