// JavaScript Document
function checkInput(form) {
    msg = "Are you sure you want to send the following information?\n"
    // Last Name
    if (!checkInputText(form.LastName)) {
        alert("Please input Last Name.");
        return false;
    }
    msg += "Last Name: " + form.LastName.value + "\n";
    // First Name
    if (!checkInputText(form.FirstName)) {
        alert("Please input First Name.");
        return false;
    }
    msg += "First Name: " + form.FirstName.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";
	
    // Comment
    if (!checkInputText(form.Comment)) {
        alert("Please input Comment.");
        return false;
    }
    msg += "Comment: " + form.Comment.value + "\n";
    if (!confirm(msg)) {
        return false;
    }    
    return true;
}
