function removeButton(a){num=a.id.match(/del_dest_(.*)/)[1];jQuery('#adv_file_upload_destination_'+num).remove()}function addButton(a,b,c){index_field=jQuery('#index');var d=index_field.val();createBoxes(d,a,b,c).appendTo('#adv_file_upload_destinations');d++;index_field.val(d)}function createBoxes(a,b,c,d,e){b=(typeof b==='undefined')?'':b;c=(typeof c==='undefined')?adv_upload_base_dir:c;d=(typeof d==='undefined')?true:d;d=(d==1)?true:d;var f=jQuery('
',{id:'adv_file_upload_destination_'+a,style:'overflow:hidden;'});if(!e)f.append(jQuery('',{class:'adv_file_upload_destination_index',type:'hidden',value:a,}));f.append(jQuery('',{id:'adv_file_upload_destination_label_'+a,name:'adv_file_upload_destination['+a+'][label]',type:'text',value:b,disabled:e,style:'float:left;width:135px;'}));f.append(jQuery('',{id:'adv_file_upload_destination_destination_'+a,name:'adv_file_upload_destination['+a+'][dest]',type:'text',value:c,disabled:e,style:'float:left;width:285px;'}));f.append(jQuery('',{id:'adv_file_upload_destination_library_'+a,name:'adv_file_upload_destination['+a+'][library]',type:'checkbox',checked:d,value:1,disabled:e,style:'float:left;margin:5px;'}));f.append(jQuery('',{id:'del_dest_'+a,name:'del_dest',type:'button',style:'width:2.5em;float:right;',class:'button button-primary',value:'-',disabled:e,onClick:'removeButton(this)'}));return f}function scanButton(b){var c=jQuery('