<!--
function validateForm(objForm) {
//Validates form. Returns true if form field data is valid, otherwise returns false.
	var strAlertMsg = "";
	var blnSelectText = false;
	var blnInvalidPhone = false;
	
	for (i=0; i<=objForm.elements.length-1; i++) {
		var objField = objForm.elements[i];
		var strType = objField.type;
		var strName = objField.name;
		var strValue = objField.value;
		
		if (strType == "text" || strType == "textarea") {
			if (!validateNotEmpty(strValue)) {
				switch(strName) {
					case "Name":
						strAlertMsg = "Please enter your Name.";
						break;
					case "Email":
						strAlertMsg = "Please enter your Email Address.";
						break;
					case "InHandsDate":
						strAlertMsg = "Please select an In-Hands Date.";
						break;
					case "Comments":
						strAlertMsg = "Please enter your Comments in the space provided.";
						break;
				}
			}
			else {
				switch(strName) {
					case "Name":
						if (!validateIllegalChars(trimAll(strValue), true)) {
							strAlertMsg = strIllegalCharsMsg;
						}
						break;
					case "Phone":
					    if (!validateFullPhoneNumber(strValue))
					    {
					        strAlertMsg = "Please enter a valid Phone Number.";
					    }
					    break;
					case "Email":
						if (!validateEmail(trimAll(strValue))) {
							strAlertMsg = "Please enter a valid Email Address.";
						}
						break;
					case "InHandsDate":
					    if (!validateDate(strValue))
					    {
					        strAlertMsg = "Please enter a valid Date.";
					    }
					    break;
					case "Comments":
						if (!validateTextArea(strValue, 1, 2500)) {
							strAlertMsg = "Please enter your Comments in the space provided.";
						}
						else if (!validateIllegalChars(trimAll(strValue), false)) {
							strAlertMsg = strIllegalCharsMsg;
						}
						break;
					default:
						if (!validateIllegalChars(trimAll(strValue), true)) {
							strAlertMsg = strIllegalCharsMsg;
						}
						break;
				}
				
				if (strAlertMsg != "") {
					blnSelectText = true;
				}
			}
		}
		if(strType == "select-one")
		{
		    switch(strName)
		    {
		        case "AmountInterestedIn":
		            if(objField.selectedIndex == 0)
		            {
		                strAlertMsg = "Please select the amount you are interested in.";	
		            }
		            break;
		        case "LiteCubesColor":
		            if(objField.selectedIndex == 0)
		            {
		                strAlertMsg = "Please select the LiteCubes color you are interested in.";
                    }
                    break;
		        case "LogoOptions":
		            if(objField.selectedIndex == 0)
		            {
		                strAlertMsg = "Please select a Logo Option";
		            }
		            break;
		    }
		}
		
		if (strAlertMsg != "") {
			alert(strAlertMsg);
			objField.focus();
			if (blnSelectText) {
				objField.select();
			}
			return false;
		}
	}
	
	return true;
}
//-->