function scheduleofcreditors() {

d = document.scheduleofcreditors;


// declare variables

var personal_name;
var personal_address;
var personal_occupation;

var creditor_name1;
var creditor_name2;
var creditor_name3;
var creditor_name4;
var creditor_name5;
var creditor_name6;
var creditor_name7;
var creditor_name8;
var creditor_name9;
var creditor_name10;

var creditor_ref1;
var creditor_ref2;
var creditor_ref3;
var creditor_ref4;
var creditor_ref5;
var creditor_ref6;
var creditor_ref7;
var creditor_ref8;
var creditor_ref9;
var creditor_ref10;

var creditor_outstanding1;
var creditor_outstanding2;
var creditor_outstanding3;
var creditor_outstanding4;
var creditor_outstanding5;
var creditor_outstanding6;
var creditor_outstanding7;
var creditor_outstanding8;
var creditor_outstanding9;
var creditor_outstanding10;

var creditor_total;


// asign values to variables

personal_name = d.a1.value;
personal_address = d.a2.value;
personal_occupation = d.a3.value;

creditor_name1 = d.i1.value;
creditor_name2 = d.i2.value;
creditor_name3 = d.i3.value;
creditor_name4 = d.i4.value;
creditor_name5 = d.i5.value;
creditor_name6 = d.i6.value;
creditor_name7 = d.i7.value;
creditor_name8 = d.i8.value;
creditor_name9 = d.i9.value;
creditor_name10 = d.i10.value;

creditor_ref1 = d.j1.value;
creditor_ref2 = d.j2.value;
creditor_ref3 = d.j3.value;
creditor_ref4 = d.j4.value;
creditor_ref5 = d.j5.value;
creditor_ref6 = d.j6.value;
creditor_ref7 = d.j7.value;
creditor_ref8 = d.j8.value;
creditor_ref9 = d.j9.value;
creditor_ref10 = d.j10.value;

creditor_outstanding1 = d.k1.value - 0;
creditor_outstanding2 = d.k2.value - 0;
creditor_outstanding3 = d.k3.value - 0;
creditor_outstanding4 = d.k4.value - 0;
creditor_outstanding5 = d.k5.value - 0;
creditor_outstanding6 = d.k6.value - 0;
creditor_outstanding7 = d.k7.value - 0;
creditor_outstanding8 = d.k8.value - 0;
creditor_outstanding9 = d.k9.value - 0;
creditor_outstanding10 = d.k10.value - 0;

creditor_total = creditor_outstanding1 + creditor_outstanding2 + creditor_outstanding3 + creditor_outstanding4 + creditor_outstanding5 + creditor_outstanding6 + creditor_outstanding7 + creditor_outstanding8 + creditor_outstanding9 + creditor_outstanding10;

document.open();

document.write('<table width="600" border="0">');
document.write('<td> ');
      document.write('<p align="center"><b>STATEMENT OF MEANS</b></p>');
      document.write('<p align="center"><b>STRICTLY PRIVATE AND CONFIDENTIAL</b></p>');
      document.write('<table width="600" border="0" cellspacing="0" cellpadding="0">');
        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<p class="tabletop"> <b>PERSONAL DETAILS</b></p>');
          document.write('</td>');
          document.write('<td width="400">&nbsp;</td>');
        document.write('</tr>');
        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<div align="left">Name: </div>');
          document.write('</td>');
          document.write('<td width="400">' + personal_name + ' </td>');
        document.write('</tr>');
        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<div align="left">Address :</div>');
          document.write('</td>');
          document.write('<td width="400">' + personal_address + ' </td>');
        document.write('</tr>');
        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<div align="left">Occupation: </div>');
          document.write('</td>');
          document.write('<td width="400">' + personal_occupation + ' </td>');
        document.write('</tr>');
      document.write('</table>');
  
      document.write('<br>');
    
      document.write('<table width="600" border="0" cellspacing="0" cellpadding="0">');
        document.write('<tr> ');
          document.write('<td width="200" class="tabletop"><b>CREDITORS</b></td>');
          document.write('<td width="200">&nbsp;</td>');
          document.write('<td width="200">&nbsp;</td>');
        document.write('</tr>');
        document.write('<tr> ');
          document.write('<td width="200"> ');
           document.write(' <div align="left"><b>Creditor</b></div>');
          document.write('</td>');
          document.write('<td width="200"> ');
           document.write(' <div align="left"><b>Account / Ref No.</b></div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left"><b>Amount Outstanding</b></div>');
          document.write('</td>');
        document.write('</tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_name1 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_ref1 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">£ ' + creditor_outstanding1 + '</div>');
          document.write('</td>');
        document.write('</tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_name2 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_ref2 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
           document.write(' <div align="left">£ ' + creditor_outstanding2 + '</div>');
          document.write('</td>');
      document.write('  </tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
           document.write(' <div align="left">' + creditor_name3 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_ref3 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">£ ' + creditor_outstanding3 + '</div>');
          document.write('</td>');
        document.write('</tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_name4 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_ref4 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">£ ' + creditor_outstanding4 + '</div>');
          document.write('</td>');
        document.write('</tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_name5 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
           document.write(' <div align="left">' + creditor_ref5 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">£ ' + creditor_outstanding5 + '</div>');
          document.write('</td>');
       document.write(' </tr>');

        document.write('<tr> ');
         document.write(' <td width="200"> ');
          document.write('  <div align="left">' + creditor_name6 + '</div>');
         document.write(' </td>');
          document.write('<td width="200"> ');
          document.write('  <div align="left">' + creditor_ref6 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
           document.write(' <div align="left">£ ' + creditor_outstanding6 + '</div>');
          document.write('</td>');
        document.write('</tr>');

        document.write('<tr> ');
         document.write(' <td width="200"> ');
           document.write(' <div align="left">' + creditor_name7 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">' + creditor_ref7 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">£ ' + creditor_outstanding7 + '</div>');
          document.write('</td>');
        document.write('</tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
           document.write(' <div align="left">' + creditor_name8 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
           document.write(' <div align="left">' + creditor_ref8 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
            document.write('<div align="left">£ ' + creditor_outstanding8 + '</div>');
         document.write(' </td>');
       document.write(' </tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
          document.write('  <div align="left">' + creditor_name9 + '</div>');
         document.write(' </td>');
         document.write(' <td width="200"> ');
          document.write(' <div align="left">' + creditor_ref9 + '</div>');
          document.write('</td>');
          document.write('<td width="200"> ');
          document.write('  <div align="left">£ ' + creditor_outstanding9 + '</div>');
         document.write(' </td>');
        document.write('</tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
           document.write(' <div align="left">' + creditor_name10 + '</div>');
          document.write('</td>');
         document.write(' <td width="200"> ');
           document.write(' <div align="left">' + creditor_ref10 + '</div>');
          document.write('</td>');
         document.write(' <td width="200"> ');
          document.write('  <div align="left">£ ' + creditor_outstanding10 + '</div>');
         document.write(' </td>');
        document.write('</tr>');

        document.write('<tr> ');
          document.write('<td width="200"> ');
           document.write(' <div align="left"></div>');
          document.write('</td>');
         document.write(' <td width="200"> ');
           document.write(' <div align="left"><b>TOTAL</b> </div>');
          document.write('</td>');
         document.write(' <td width="200"> ');
          document.write('  <div align="left"><b>£ ' + creditor_total + '</b></div>');
         document.write(' </td>');
        document.write('</tr>');

      document.write('</table>');

      document.write('<p>This is an accurate record of my financial position as at: ___________________________</p>');
      document.write('<table width="600" border="0" cellspacing="0" cellpadding="0">');
      document.write('  <tr> ');
         document.write(' <td width="200">Signed:</td>');
          document.write('<td width="400">____________________________________________</td>');
        document.write('</tr>');
        document.write('<tr> ');
        document.write('  <td width="200">&nbsp;</td>');
        document.write('  <td width="400">&nbsp;</td>');
        document.write('</tr>');
        document.write('<tr>');
        document.write('  <td width="200">Signed:</td>');
        document.write('  <td width="400">____________________________________________</td>');
        document.write('</tr>');
      document.write('</table>');
    document.write('</td>');
document.write('</table>');

document.close();
}
