// JavaScript Document to Validate Refinance Commitment Form
function validate_form ( )
{
    if ( document.refinance_commitment_form.LenderName.value == "" )
    {
        alert ( "Please fill in the 'Lender Name' box." );
        return false;
    }
	if ( document.refinance_commitment_form.LenderStreet.value == "" )
    {
        alert ( "Please fill in the 'Lender Street Address' box." );
        return false;
    }
	if ( document.refinance_commitment_form.LenderCity.value == "" )
    {
        alert ( "Please fill in the 'Lender City' box." );
        return false;
    }
	if ( document.refinance_commitment_form.LenderState.value == "" )
    {
        alert ( "Please fill in the 'Lender State' box." );
        return false;
    }
	if ( document.refinance_commitment_form.LenderZip.value == "" )
    {
        alert ( "Please fill in the 'Lender Zip Code' box." );
        return false;
    }
	if ( document.refinance_commitment_form.SenderEmail.value == "" )
    {
        alert ( "Please fill in 'Your E-mail Address' box." );
        return false;
    }
	if ( document.refinance_commitment_form.LenderContactPerson.value == "" )
    {
        alert ( "Please fill in the 'Lender Agent' box." );
        return false;
    }
	if ( document.refinance_commitment_form.LenderPh.value == "" )
    {
        alert ( "Please fill in the 'Lender Phone Number' box." );
        return false;
    }
	if ( document.refinance_commitment_form.NeedDate.value == "" )
    {
        alert ( "Please fill in the 'Need by Date' box." );
        return false;
    }
	if ( document.refinance_commitment_form.Borrower1Name.value == "" )
    {
        alert ( "Please fill in the 'Borrower 1 Name' box." );
        return false;
    }
	if ( document.refinance_commitment_form.PropertyStreet.value == "" )
    {
        alert ( "Please fill in the 'Property Street Address' box." );
        return false;
    }
	if ( document.refinance_commitment_form.PropertyCity.value == "" )
    {
        alert ( "Please fill in the 'Property City' box." );
        return false;
    }
	if ( document.refinance_commitment_form.PropertyState.value == "" )
    {
        alert ( "Please fill in the 'Property State' box." );
        return false;
    }
	if ( document.refinance_commitment_form.PropertyZip.value == "" )
    {
        alert ( "Please fill in the 'Property Zip Code' box." );
        return false;
    }
	if ( document.refinance_commitment_form.theDate.value == "" )
    {
        alert ( "Please fill in the 'Estimated Closing Date' box." );
        return false;
    }
	if ( document.refinance_commitment_form.LoanAmount.value == "" )
    {
        alert ( "Please fill in the 'Loan Amount' box." );
        return false;
    }
	if ( ( document.refinance_commitment_form.close[0].checked == false )
    && ( document.refinance_commitment_form.close[1].checked == false ) )
    {
        alert ( "Please select if Abstract & Title to Close, Yes or No" );
        return false;
    }
	if ( ( document.refinance_commitment_form.TaxCertificate[0].checked == false )
    && ( document.refinance_commitment_form.TaxCertificate[1].checked == false ) )
    {
        alert ( "Please select if there is a Tax Certificate, Yes or No" );
        return false;
    }
    return true;
}
