// JavaScript Document
function checkInput(form) {
    msg = "Are you sure you want to send the following 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";
	    
	// Area
	if (form.Area.value != ""){
    msg += "Residing Area: " + form.Area.value + "\n";
	}
	
    // Inquiry
	if (form.Inquiry.selectedIndex != 0) {
	    msg += "Inquiry: " + form.Inquiry.options[form.Inquiry.selectedIndex].text + "\n";
	}
    // Comment
	if (form.Comment.value != ""){
	    msg += "Comment: " + form.Comment.value + "\n";
	}    
    if (!confirm(msg)) {
        return false;
    }    
    return true;
}
function checkInput2(form){ 
    // Email (Required)
    if (!checkInputText(form.email_address)) {
        alert("Please input Email.");
        return false;
    }
    // Email (Format)
    if (!checkFormatEmail(form.email_address)) {
        alert("Please input Email correctly.");
        return false;
    }

} 


