<!--
function checkWhitespace(f, clientID, name, text){
    var t = getElement(f, clientID, name);
    if (isWhitespace(t.value)){
        alert("Please complete the " + text + " field.");
        t.focus();
        return true;
    }    
    return false;
}

function checkContactUs(f, clientID){
	var formType=f.formType.value;
	switch(formType)
	{
		case "ContactForm":
			return checkContactForm(f,clientID);
		default: return true;
	
	}
}

function checkContactForm(f,clientID)
{
    var t = getElement(f, clientID, "FirstNameTextBox");
    checkWhitespace(f, clientID, "FirstNameTextBox","First name");
    t = getElement(f, clientID, "LastNameTextBox");
    checkWhitespace(f, clientID, "LastNameTextBox","Last name");
    t = getElement(f, clientID, "PhoneNumberTextBox");
    checkWhitespace(f, clientID, "PhoneNumberTextBox","Phone");
	var email1 = getElement(f, clientID, "EMailTextBox");
	if (!isEmail(email1.value))
	{
		alert("Please enter a valid email address.");
		email1.focus();
		return false;
	}
	var email2 = getElement(f, clientID, "EMailTextBox2");
	if (!isEmail(email2.value))
	{
		alert("Please enter a valid email address.");
		email2.focus();
		return false;
	}
	if (email1.value !=email2.value)
	{
		alert("The two email addresses entered do not match.");
		return false;
	}
    t = getElement(f, clientID, "Inquiry");
    checkWhitespace(f, clientID, "Inquiry","Inquiry");
	return true;
}

//-->

