<!--
function getElement(f,n){
    for (x=0;x<f.length;x++)
    {
		if (f[x].name.indexOf(n) >-1)
		{
			return f[x];
			break;
		}
    }
}

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,'EMailTextBox');
    if (isWhitespace(t.value) || !isEmail(t.value)){
		alert("Please enter a valid email address.");
		t.focus();
        return false;
    }
}

//-->

