function addValue()
{
     aa=document.aForm.mortgage1_amount.value;
     bb=document.aForm.mortgage2_amount.value;
     cc=document.aForm.mortgage3_amount.value;
     dd=document.aForm.vehicle1_amount.value;
     ee=document.aForm.vehicle2_amount.value;
     ff=document.aForm.vehicle3_amount.value;
     gg=document.aForm.vehicle4_amount.value;
	 aa=Number(aa);
	 bb=Number(bb);
	 cc=Number(cc);
	 dd=Number(dd);
	 ee=Number(ee);
	 ff=Number(ff);
	 gg=Number(gg);
     totalval = aa + bb + cc + dd + ee + ff + gg;
     document.aForm.total1.value = totalval;
}

function addValues()
{
     a=document.aForm.creditor1_amount.value;
     b=document.aForm.creditor2_amount.value;
     c=document.aForm.creditor3_amount.value;
     d=document.aForm.creditor4_amount.value;
     e=document.aForm.creditor5_amount.value;
     f=document.aForm.creditor6_amount.value;
     g=document.aForm.creditor7_amount.value;
     h=document.aForm.creditor8_amount.value;
     i=document.aForm.creditor9_amount.value;
     j=document.aForm.creditor10_amount.value;
     k=document.aForm.creditor11_amount.value;
     l=document.aForm.creditor12_amount.value;
     m=document.aForm.creditor13_amount.value;
     n=document.aForm.creditor14_amount.value;
     o=document.aForm.creditor15_amount.value;

	 a=Number(a);
	 b=Number(b);
	 c=Number(c);
	 d=Number(d);
	 e=Number(e);
	 f=Number(f);
	 g=Number(g);
	 h=Number(h);
	 i=Number(i);
	 j=Number(j);
	 k=Number(k);
	 l=Number(l);
	 m=Number(m);
	 n=Number(n);
	 o=Number(o);

     x = a + b + c + d + e + f + g + h + i + j + k + l + m + n + o;
     document.aForm.subtotal.value = x;
}

function addValues1()
{
     p=document.aForm.creditor16_amount.value;
     q=document.aForm.creditor17_amount.value;
     r=document.aForm.creditor18_amount.value;
     s=document.aForm.creditor19_amount.value;
     t=document.aForm.creditor20_amount.value;
	 p=Number(p);
	 q=Number(q);
	 r=Number(r);
	 s=Number(s);
	 t=Number(t);
	 y = p + q + r + s + t;
     document.aForm.subtotal1.value = y;
}

function addValues2()
{
	 addValues();
	 addValues1();
	 x1=document.aForm.subtotal.value;
	 x2=document.aForm.subtotal1.value;
	 x1=Number(x1);
	 x2=Number(x2);
	 w = x1 + x2;
	 document.aForm.total2.value = w;
}

function ValidateNumber(oThis)
{
     if (isNaN(oThis.value))
     {
          oThis.value = "";
          alert("Please enter number");
     }
     else
     {
          oThis.value = parseInt(oThis.value);
     }
}
