var _tags=[];
function tagsInit(B,A){_tags[B]={};
Ext.apply(_tags[B],A)
}function showEditTagsDialog(J,I,G,L){var A=_tags[G];
var D,C,M;
var K=function(){var O="";
if(M){for(var P=0;
P<M.length;
P++){if(M[P].checked){O+=M[P].inputValue+","
}}}else{O=C.getValue()
}var N=function(Q){ug.ppr({render:["tagsDiv-"+I+"-"+G,"sidelet-feature-"+G],params:{item:I}});
D.hide()
};
ug.rpc({rpc:"TagsRpc.setTags",disable:D,params:{tags:O,context:A.site,item:I,feature:G},callback:N});
return false
};
var E=new Ext.form.Label({text:A.instructions||"???tag_editTags_instructions_html???"});
C=new Ext.form.TextField({maxLength:"255",allowBlank:true,hideLabel:true,msgTarget:"side",width:260,value:(L=="")?"":(L+", ")});
var H=[];
if(A.taxonomy&&(A.taxonomy!="")){M=[];
for(var F=0;
F<A.taxonomy.length;
F++){M.push(new Ext.form.Checkbox({inputValue:A.taxonomy[F],boxLabel:A.taxonomy[F],hideLabel:true,checked:(L.indexOf(A.taxonomy[F])!=-1)}));
H=[M]
}}else{H=[E,C]
}var B=new Ext.form.FormPanel({items:H,bodyStyle:"padding:10px",onSubmit:function(N){N.stopEvent();
K()
}});
D=new ug.Dialog({id:"addTagsDialog-"+I+"-"+G,title:A.title||"???tag_tags_editTags_title_default???",autoScroll:true,width:300,destroyOnHide:true,items:B,defaultButton:C,okay:{text:"Submit",handler:K},cancel:"Cancel"});
D.show(J)
};

