function jsmarty_function_html_image(x,Z){if(!x.file){Z.trigger_error("html_image: missing 'file' parameter");return "";}var a,s;var C;var S="";var R="";var o="";var d=[];var G="";var z="";var W="";var j="";var H="";for(k in x){if(!x.hasOwnProperty(k)){continue;}switch(k){case "dpi":C=x[k];break;case "file":R=x[k];break;case "width":o=x[k];break;case "height":G=paramas[k];break;case "basedir":j=x[k];break;case "path_prefix":H=x[k];break;case "link":case "href":z="<a href=\""+x[k]+"\">";W="</a>";break;case "alt":S=x[k];break;default:d.push(x[k]);break;}}if(R.charAt(0)=="/"){s=j+R;}else{s=R;}if(x.width==void (0)||x.height==void (0)){a=new Image();a.src=s;if(x.width==void (0)){o=a.width;}if(x.height==void (0)){G=a.height;}}return z+"<img src=\""+H+R+"\" width=\""+o+"\" height=\""+G+"\""+d.join(" ")+" />"+W;}