function jsmarty_function_html_radios(x,C){JSmarty.Plugin.add("shared.escape_special_chars",C.plugins_dir);var a,z=0,W=[];var G=jsmarty_function_html_radios_outputf;var o="radio";var R=[];var H=true;var s=null;var Z=null;var D=null;var S=null;var j="";var d=false;for(a in x){if(!x.hasOwnProperty(a)){continue;}switch(a){case "name":o=x[a];break;case "separator":j=x[a];break;case "checked":case "selected":if(x[a] instanceof Array){C.trigger_error("html_radios: the \""+a+"\" attribute cannot be an array");}else{S=x[a];}break;case "labels":H=x[a];break;case "label_ids":d=x[a];break;case "options":D=x[a];break;case "radios":C.trigger_error("html_radios: the use of the \"radios\" attribute is deprecated, use \"options\" instead");D=x[a];break;case "assign":break;default:if(typeof (x[a])!="object"){R.push(a+"=\""+x[a]+"\"");}else{C.trigger_error("html_radios: extra attribute \""+z+"\" cannot be an array");}break;}}if(!D&&!s){return "";}if(D){for(a in D){if(!D.hasOwnProperty(a)){break;}W[z++]=G(o,a,D[a],S,R,j,H,d);}}else{for(a in s){if(!s.hasOwnProperty(a)){break;}value=(Z[a])?Z[a]:"";W[z++]=G(o,a,value,S,R,j,H,d);}}if(x.assign){C.assign(x.assign,W);}else{return W.join("\n");}}function jsmarty_function_html_radios_outputf(k,j,Z,R,d,a,S,C){var o,x=new JSmarty.Classes.Buffer();var z=JSmarty.Plugin.get("shared.escape_special_chars");if(S){if(C){o=z((k+"_"+j).replace(/[^\w\-\.]/g,"_"));x.append("<label for=\"",o,"\">");}else{x.append("<label>");}}x.append("<input type=\"radio\" name=\"",z(k),"\" value=\"",z(j),"\"");x.appendIf(o)(" id=\"",o,"\"");x.appendIf(j==R)(" checked=\"checked\"");x.append(d.join("")," />",Z);x.appendIf(S)("</label>");x.append(a);return x.toString("");}