String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
function hasText(objFormField,strMessage) {
if (objFormField.value.trim() == "") {
alert("You must complete the " + strMessage + " field.");
objFormField.focus();
return false ;
}
return true;
}
function hasSelection(objSelect,strMessage) {
var intIdx = objSelect.selectedIndex;
if (intIdx <1) {
alert("You must select an option from the " + strMessage + " field.");
objSelect.focus();
return false ;
}
return true;
}

function validateForm(theForm) {
if(!hasText(theForm.from,"Email Address")){
return false;
}      
// if(!hasText(theForm.elements['name'],"First Name ")){  
// return false;
// }      
return true;
}