// JavaScript Document
function checkInput(form) {
    msg = "Are you sure you want to send the following information?\n"
    // First Name
    if (!checkInputText(form.FirstName)) {
        alert("Please input First Name.");
        return false;
    }
    msg += "First Name : " + form.FirstName.value + "\n";
	
    // Last Name
    if (!checkInputText(form.LastName)) {
        alert("Please input Last Name.");
        return false;
    }
    msg += "Last Name : " + form.LastName.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";

	// Phone (Required)
    if (!checkInputText(form.Phone)) {
        alert("Please input Phone.");
        return false;
    }
    msg += "Phone : " + form.Phone.value + "\n";
    msg += "Fax : " + form.Fax.value + "\n";
    msg += "Company : " + form.Company.value + "\n";
    msg += "Address1 : " + form.Address1.value + "\n";
    msg += "Address2 : " + form.Address2.value + "\n";
    msg += "City : " + form.City.value + "\n";
    msg += "State : " + form.State.value + "\n";
    msg += "Zip : " + form.Zip.value + "\n";
    
    if (form.check1.checked == 1 || form.check2.checked == 1 || form.check3.checked == 1 || form.check4.checked == 1){
      msg += "[Services you are intereseted in]" + "\n";
     }
    if (form.check1.checked == 1){
      msg += "  " + form.check1.value + "\n";
      msg += "  Type of Product : " + form.TypeOfProduct.value + "\n";
    }
    if (form.check2.checked == 1){
      msg += "  " + form.check2.value + "\n";
      msg += "  Product and Qty : " + form.ProductAndQty.value + "\n";
    }
    if (form.check3.checked == 1){
      msg += "  " + form.check3.value + "\n";
      msg += "  Model Name : " + form.ModelName.value + "\n";
    }
    if (form.check4.checked == 1){
      msg += "  " + form.check4.value + "\n";
    }
    
    // Inquiry
    if (!checkInputText(form.Inquiry)) {
        alert("Please input Inquiry.");
        return false;
    }
    msg += "  Inquiry: " + form.Inquiry.value + "\n";
    if (!confirm(msg)) {
        return false;
    }    
    return true;
}
