2 function toggleblock(id, link)
4 var block = document.getElementById(id);
10 function addhostfield()
12 var container = document.getElementById('defaulthostlist');
13 var row = document.createElement('div');
14 var input = document.createElement('input');
15 var link = document.createElement('a');
17 input.name = '_default_host[]';
20 link.onclick = function() { removehostfield(this.parentNode); return false };
21 link.className = 'removelink';
22 link.innerHTML = 'remove';
24 row.appendChild(input);
25 row.appendChild(link);
26 container.appendChild(row);
30 function removehostfield(row)
32 var container = document.getElementById('defaulthostlist');
33 container.removeChild(row);