// JavaScript Document@

function checkInput(form) {
    msg = "Are you sure you want to send the information?\n"
    // Name
    if (!checkInputText(form.Name)) {
        alert("Please input Name.");
        return false;
    }
    //msg += "Name: " + form.Name.value + "\n";
	
    // Phone (Required)
  /* if (!checkInputText(form.Phone)) {
        alert("Please input Phone.");
        return false;
    }
    // Phone (Format)
    if (!checkPhoneNumber(form.Phone.value)) {
        alert("Please input Phone correctly.");
        return false;
    }*/
    //msg += "Phone: " + form.Phone.value + "\n";
	
    // Email (Required)
     if (!checkInputText(form.Email)) {
        alert("Please input Email.");
        return false;
    }
    // Email (Format)
    if (!checkFormatEmail(form.Email)) {
        alert("Please input Email correctly.");
        return false;
    }
   // msg += "Email: " + form.Email.value + "\n";
	
   /* // State
    if (!checkInputSelect(form.State, "")) {
        alert("Please select State.");
        return false;
    }
    var n = form.State.selectedIndex;
    msg += "State: " + form.State.options[n].text + "\n";
    
	// Make & Model
	if (form.Model.value != ""){
    msg += "Make & Model: " + form.Model.value + "\n";
	}
	
    // Year
	if (form.Year.value != ""){
		if (!checkNumber(form.Year.value)) {
        alert("Please input Year correctly.");
        return false;
		}
	    msg += "Year: " + form.Year.value + "\n";
	}
    // Inquiry
	if (form.Inquiry.selectedIndex != 0) {
	    msg += "Inquiry: " + form.Inquiry.options[form.Inquiry.selectedIndex].text + "\n";
	}*/
    // Comment
	
	   if (!checkInputText(form.Comment)) {
        alert("Please input Comment.");
        return false;
    }
	
    if (!confirm(msg)) {
        return false;
    }    
    return true;
}

