function calcear(form){
  var total= form.mnthly_earn.value -(-1 * form.spouse_earn.value);
  form.total_mnthly_earn.value = total;
}
function cal_debt(form){
 var total_debt=form.car_debt.value -(-1* form.loan_debt.value) - (-1*form.ccard_debt.value) - (-1*form.living_debt.value);
 form.total_mnthly_debt.value= total_debt;
 form.total.value = form.total_mnthly_earn.value - form.total_mnthly_debt.value;
}
function cal_total(form){
 var total_in= form.total_mnthly_earn.value - form.total_mnthly_debt.value;
 form.total.value=total_in;
} 
function clearform(form) {

        form.mnthly_earn.value="";

        form.spouse_earn.value="";

        form.total_mnthly_earn.value="";
        form.car_debt.value="";
        form.loan_debt.value="";
        form.ccard_debt.value="";
        form.living_debt.value="";
        form.total_mnthly_debt.value="";
        form.total.value="";
}

