function addRowToTable()
{var tbl=document.getElementById('tblAddress');var lastRow=tbl.rows.length;var iteration=lastRow;var row=tbl.insertRow(lastRow);var cell0=row.insertCell(0);var el=document.createElement('input');el.type="file";el.name="file_upload[]";cell0.appendChild(el);var cell1=row.insertCell(1);var el=document.createElement('input');el.type="text";el.name="caption[]";el.size=30;cell1.appendChild(el);var cell2=row.insertCell(2);var el=document.createElement('input');el.type='button';el.value='Usuń';el.onclick=function(){return removeRowFromTable(this.parentNode.parentNode.rowIndex);}
cell2.appendChild(el);}
function removeRowFromTable(i){document.getElementById('tblAddress').deleteRow(i);}
function addRowToTableOrder()
{var tbl=document.getElementById('tblAddress');var lastRow=tbl.rows.length;var iteration=lastRow;var row=tbl.insertRow(lastRow);var cell0=row.insertCell(0);var el=document.createElement('input');el.type="read";el.name="nrpoz[]";el.size=3;el.value=lastRow-1;cell0.appendChild(el);var cell1=row.insertCell(1);var el=document.createElement('input');el.type="text";el.name="index[]";el.size=15;cell1.appendChild(el);var cell2=row.insertCell(2);var el=document.createElement('input');el.type="text";el.name="opis[]";el.size=30;cell2.appendChild(el);var cell3=row.insertCell(3);var el=document.createElement('input');el.type="text";el.name="jednostka[]";el.size=10;cell3.appendChild(el);var cell4=row.insertCell(4);var el=document.createElement('input');el.type="text";el.name="netto[]";el.size=10;cell4.appendChild(el);var cell5=row.insertCell(5);var el=document.createElement('input');el.type="text";el.name="liczba[]";el.size=10;cell5.appendChild(el);var cell6=row.insertCell(6);var el=document.createElement('input');el.type='button';el.value='Usuń';el.onclick=function(){return removeRowFromTable(this.parentNode.parentNode.rowIndex);}
cell6.appendChild(el);}
