add = function() {
  s=document.getElementById('files');
  n=document.getElementById('num');
  input=document.createElement('input');
  input.setAttribute('type','file');
  input.setAttribute('name','userFile'+n.getAttribute('value'));
  s.appendChild(input);
  s.appendChild(document.createElement('br'));
  n.setAttribute('value',parseInt(n.getAttribute('value'))+1);
}