

function ValidateContactUsForm()
{
	var valid = true;
	var alert_msg = "Sorry, some fields are required.\nPlease enter your:\n";

	// determine success or failure
	if (typeof(document.ContactUsForm.Name) != 'undefined')
	if (document.ContactUsForm.Name.value == '') {
		alert_msg = alert_msg + 'Name\n';
		valid = false;
	}

	if (typeof(document.ContactUsForm.Email) != 'undefined')
	if (!IsValidEmail(document.ContactUsForm.Email.value)) {
		//alert_msg = alert_msg + 'Valid Email Address\n';
		alert_msg = alert_msg + 'E-mail\n';
		valid = false;
	}

	if (typeof(document.ContactUsForm.Subject) != 'undefined')
	if (document.ContactUsForm.Subject.value == '') {
		alert_msg = alert_msg + 'Subject\n';
		valid = false;
	}

	if (typeof(document.ContactUsForm.Comment) != 'undefined')
	if (document.ContactUsForm.Comment.value == '') {
		alert_msg = alert_msg + 'Comment';
		valid = false;
	}

	// either return success or failure with a message
	if (!valid) {
		window.alert(alert_msg);
	}
		
	// return true/false
	return valid;
}

function ValidateContactUsFormALTTT()
{
	var valid = true;
	var alert_msg = "Sorry, some fields are required.\nPlease enter your:\n";

	// determine success or failure
	if (typeof(document.ContactUsForm) != 'undefined')
	{
		if (typeof(document.ContactUsForm.Name) != 'undefined')
		{
			if (document.ContactUsForm.Name.value == '')
			{
				alert_msg = alert_msg + 'Name\n';
				valid = false;
			}
		}

		if (typeof(document.ContactUsForm.Email) != 'undefined')
		{
			if (!IsValidEmail(document.ContactUsForm.Email.value))
			{
				alert_msg = alert_msg + 'Valid Email Address\n';
				valid = false;
			}
		}

		if (typeof(document.ContactUsForm.Subject) != 'undefined')
		{
			if (document.ContactUsForm.Subject.value == '')
			{
				alert_msg = alert_msg + 'Subject\n';
				valid = false;
			}
		}

		if (typeof(document.ContactUsForm.Comment) != 'undefined')
		{
			if (document.ContactUsForm.Comment.value == '')
			{
				alert_msg = alert_msg + 'Comment';
				valid = false;
			}
		}
	}
	else
		valid = false;

	// either return success or failure with a message
	if (!valid)
		window.alert(alert_msg);
		
	// return true/false
	return valid;
}

function ClearContactUsForm()
{
	if (typeof(document.ContactUsForm) != 'undefined')
	{
		if (typeof(document.ContactUsForm.Attention) != 'undefined')
			document.ContactUsForm.Attention.selectedIndex = 0;

		if (typeof(document.ContactUsForm.Name) != 'undefined')
			document.ContactUsForm.Name.value = '';

		if (typeof(document.ContactUsForm.Email) != 'undefined')
			document.ContactUsForm.Email.value = '';

		if (typeof(document.ContactUsForm.Subject) != 'undefined')
			document.ContactUsForm.Subject.value = '';

		if (typeof(document.ContactUsForm.Comment) != 'undefined')
			document.ContactUsForm.Comment.value = '';
	}
}