function rprLoad() { var ps = byId('producers').value.split('|||'); for(var i=0; i1; i++) { var val = ps[i].split(',',3); rprAdd(val[0], val[1], val[2]); } rprEmpty(); dsInit(byId('producer_input'), '/xml/producers.xml?q=', function(item, tr) { tr.appendChild(tag('td', {style:'text-align: right; padding-right: 5px'}, 'p'+item.getAttribute('id'))); tr.appendChild(tag('td', shorten(item.firstChild.nodeValue, 40))); }, function(item) { return 'p'+item.getAttribute('id')+':'+item.firstChild.nodeValue; }, rprFormAdd ); byId('producer_add').onclick = rprFormAdd; } function rprAdd(id, role, name) { var roles = byId('producer_role').options; var rl = tag('select', {onchange:rprSerialize}); for(var i=0; i