add:  mydir = mydir ? mydir:'';  path = _url_prefix + '/pds/_swfupload/' + mydir + filename;  if (preview.className=="previewTag") { jspreview=1; }  if (jspreview) { tag_open="attachment:"; tag_close="";   }  var m=filename.match(/\.(.{1,4})$/); var ext=m[1].toLowerCase(); var isImg=0; if (ext && ext.match(/gif|png|jpeg|jpg|bmp/)) { fname="<img src='" + path + "' width='" + preview_width + ' ' + alt + " />"; isImg=1; } else { if (ext.match(/^(wmv|avi|mpeg|mpg|swf|wav|mp3|ogg|midi|mid|mov)$/)) { tag_open='[[Media('; tag_close=')]]'; alt=tag_open + filename + tag_close; } else if (!ext.match(/^(bmp|c|h|java|py|bak|diff|doc|css|php|xml|html|mod|rpm|deb|pdf|ppt|xls|tgz|gz|bz2|zip)$/)) { ext='unknown'; } fname="<img src='" + icon_dir + "/" + ext + ".png' " +  alt + " />"; } if (jspreview) {  link="javascript:insertTags('" + tag_open + "','" +  tag_close + "','" + filename + "',true)"; href_open="<a href=\""+ link + "\">";href_close="</a>"; } else if (isImg && form.use_lightbox.value) { var myclick='myLightbox.start(this)'; if (form.use_lightbox.value == 2) { myclick='LightBox._show(1)'; } href_open="<a href=\""+ path + "\" rel=\"lightbox\" onclick=\"" + myclick + "; return false;\">";href_close="</a>"; }  preview.innerHTML=href_open + fname + href_close; 
context: function showImgPreview(filename) {    var preview = document.getElementById("filePreview");    if (preview) {        preview.innerHTML='<img src="' + _url_prefix + '/pds/_swfupload/' + filename + '" width="100px" />';    }}
meta: 2836	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2836/be9e88daa81d2936bac21b729fed9191f03856e9/moni.js/buggy/local/SWFUpload/moni.js