function addRowToTable()
{
		  var tbl = document.getElementById('requestTbl');
  var lastRow = tbl.rows.length;
  // if there's no header row in the table, then iteration = lastRow + 1
  var iteration = lastRow;
  
  if(iteration != 21) {
	  var row = tbl.insertRow(lastRow);
	  
	  // cell1
  var cell1 = row.insertCell(0);			  
  var textNode = document.createTextNode(iteration);
  cell1.height=21;
  cell1.appendChild(textNode);
  
  // cell2
  var cell2 = row.insertCell(1);
  var el2 = document.createElement('input');
  el2.type = 'text';
  el2.name = 'memberRqstList[' + (iteration - 1) + '].personNme';
  el2.id = 'cell2' + iteration;
  el2.maxLength = 66;
  
  cell2.appendChild(el2);
  
  // cell2
  var cell3 = row.insertCell(2);
  var el3 = document.createElement('input');
  el3.type = 'text';
  el3.name = 'memberRqstList[' + (iteration - 1) + '].nricNum';
  el3.id = 'cell3' + iteration;
	  el3.maxLength = 9;
	  
	  
	  cell3.appendChild(el3);
  }
}

function removeRowFromTable()
{
  var tbl = document.getElementById('requestTbl');
  var lastRow = tbl.rows.length;
  if (lastRow > 6) tbl.deleteRow(lastRow - 1);
}

function doSubmit()
{
  document.getElementById('ACTION').value = "Submit";
  document.getElementById('genCompRes').disabled = "true";
  //window.open('', 'foo', 'width=750,height=600,status=yes,resizable=yes,scrollbars=yes');
  return true;
}

function doPrint()
{
  window.open('', 'print_company_resolution', 'width=750,height=600,status=yes,resizable=yes,scrollbars=yes');
  return true;
}